diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d0db472afab..bd0aeef1146 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -249,3 +249,7 @@ /src/traffic-collector/ @rmodh @japani @kukulkarni1 /src/nginx/ @liftr-nginx + +/src/elastic-san/ @calvinhzy + +/src/reservation/ @gaoyp830 @rkapso @msft-adrianma @sornaks @juhee0202 diff --git a/src/connectedk8s/HISTORY.rst b/src/connectedk8s/HISTORY.rst index 5b4676873cd..55a95ef31ec 100644 --- a/src/connectedk8s/HISTORY.rst +++ b/src/connectedk8s/HISTORY.rst @@ -2,6 +2,11 @@ Release History =============== +1.3.4 +++++++ + +* Fixed a proxy related bug in connectedk8s upgrade + 1.3.3 ++++++ diff --git a/src/connectedk8s/azext_connectedk8s/custom.py b/src/connectedk8s/azext_connectedk8s/custom.py index 2a17277ad62..d7f1a133ae3 100644 --- a/src/connectedk8s/azext_connectedk8s/custom.py +++ b/src/connectedk8s/azext_connectedk8s/custom.py @@ -1232,6 +1232,7 @@ def upgrade_agents(cmd, client, resource_group_name, cluster_name, kube_config=N if key == "global.isProxyEnabled": proxy_enabled_param_added = True if (key == "global.httpProxy" or key == "global.httpsProxy" or key == "global.noProxy"): + value = escape_proxy_settings(value) if value and not proxy_enabled_param_added: cmd_helm_upgrade.extend(["--set", "global.isProxyEnabled={}".format(True)]) proxy_enabled_param_added = True diff --git a/src/connectedk8s/setup.py b/src/connectedk8s/setup.py index 2c128be1fa2..961b610dddf 100644 --- a/src/connectedk8s/setup.py +++ b/src/connectedk8s/setup.py @@ -17,7 +17,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '1.3.3' +VERSION = '1.3.4' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/cosmosdb-preview/HISTORY.rst b/src/cosmosdb-preview/HISTORY.rst index 9d9e0bc307b..825e11aeeac 100644 --- a/src/cosmosdb-preview/HISTORY.rst +++ b/src/cosmosdb-preview/HISTORY.rst @@ -6,6 +6,11 @@ Release History ++++++ * Modify parameter for Managed Identity name. +0.19.0 +++++++ +* Add support for performing in-account restore of deleted databases and containers for a Sql database account. +* Add support for performing in-account restore of deleted databases and collections for a MongoDB database account. + 0.18.0 ++++++ * Add support for retrieving and redistributing throughput at physical partition level. diff --git a/src/cosmosdb-preview/README.md b/src/cosmosdb-preview/README.md index 46bcf52c2fc..a6d12d67dac 100644 --- a/src/cosmosdb-preview/README.md +++ b/src/cosmosdb-preview/README.md @@ -262,3 +262,37 @@ az cosmosdb service delete \ --account-name "MyAccount" --name "MaterializedViewsBuilder" \ ``` + +#### Restore a deleted database within same account for a Sql database account #### + +```sh +az cosmosdb sql database restore --account-name "account-name" \ + --name "database-name" + --restore-timestamp "2020-07-20T16:09:53+0000" \ +``` + +#### Restore a deleted container within same account for a Sql database account #### + +```sh +az cosmosdb sql container restore --account-name "account-name" \ + --database-name "database-name" + --name "container-name" + --restore-timestamp "2020-07-20T16:09:53+0000" \ +``` + +#### Restore a deleted database within same account for a MongoDB database account #### + +```sh +az cosmosdb mongodb database restore --account-name "account-name" \ + --name "database-name" + --restore-timestamp "2020-07-20T16:09:53+0000" \ +``` + +#### Restore a deleted collection within same account for a MongoDB database account #### + +```sh +az cosmosdb mongodb collection restore --account-name "account-name" \ + --database-name "database-name" + --collection-name "collection-name" + --restore-timestamp "2020-07-20T16:09:53+0000" \ +``` diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/_help.py b/src/cosmosdb-preview/azext_cosmosdb_preview/_help.py index 7fbc484def9..8f145fabfd6 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/_help.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/_help.py @@ -692,3 +692,43 @@ text: |- az cosmosdb mongodb collection redistribute-partition-throughput --account-name account_name --database-name db_name --name container_name --resource-group rg_name --target-partition-info 8=1200 6=1200' --source-partition-info 9' """ + +# in-account restore of a deleted sql database +helps['cosmosdb sql database restore'] = """ + type: command + short-summary: "Restore a deleted sql database within the same account." + examples: + - name: Restore a deleted sql database within the same account. + text: |- + az cosmosdb sql database restore --resource-group resource_group --account-name database_account_name --name name_of_database_needs_to_be_restored --restore-timestamp 2020-07-13T16:03:41+0000 +""" + +# in-account restore of a deleted sql container +helps['cosmosdb sql container restore'] = """ + type: command + short-summary: "Restore a deleted sql container within the same account." + examples: + - name: Restore a deleted sql container within the same account. + text: |- + az cosmosdb sql container restore --resource-group resource_group --account-name database_account_name --database-name parent_database_name --name name_of_container_needs_to_be_restored --restore-timestamp 2020-07-13T16:03:41+0000 +""" + +# in-account restore of a deleted mongodb database +helps['cosmosdb mongodb database restore'] = """ + type: command + short-summary: "Restore a deleted mongodb database within the same account." + examples: + - name: Restore a deleted mongodb database within the same account. + text: |- + az cosmosdb mongodb database restore --resource-group resource_group --account-name database_account_name --name name_of_database_needs_to_be_restored --restore-timestamp 2020-07-13T16:03:41+0000 +""" + +# in-account restore of a deleted mongodb collection +helps['cosmosdb mongodb collection restore'] = """ + type: command + short-summary: "Restore a deleted mongodb collection within the same account." + examples: + - name: Restore a deleted mongodb collection within the same account. + text: |- + az cosmosdb mongodb collection restore --resource-group resource_group --account-name database_account_name --database-name parent_database_name --name name_of_collection_needs_to_be_restored --restore-timestamp 2020-07-13T16:03:41+0000 +""" diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/_params.py b/src/cosmosdb-preview/azext_cosmosdb_preview/_params.py index 4a65d602e13..5e770d316fa 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/_params.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/_params.py @@ -371,3 +371,29 @@ def load_arguments(self, _): c.argument('evenly_distribute', arg_type=get_three_state_flag(), help="switch to distribute throughput equally among all physical partitions") c.argument('target_partition_info', nargs='+', action=CreateTargetPhysicalPartitionThroughputInfoAction, required=False, help="information about desired target physical partition throughput eg: '0=1200 1=1200'") c.argument('source_partition_info', nargs='+', action=CreateSourcePhysicalPartitionThroughputInfoAction, required=False, help="space separated source physical partition ids eg: 1 2") + + # SQL database restore + with self.argument_context('cosmosdb sql database restore') as c: + c.argument('account_name', account_name_type, id_part=None, required=True) + c.argument('database_name', options_list=['--name', '-n'], help="Database name", required=True) + c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the database needs to be restored to.", required=True) + + # SQL collection restore + with self.argument_context('cosmosdb sql container restore') as c: + c.argument('account_name', account_name_type, id_part=None, required=True) + c.argument('database_name', database_name_type, required=True) + c.argument('container_name', options_list=['--name', '-n'], help="Container name", required=True) + c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the container needs to be restored to.", required=True) + + # MongoDB database restore + with self.argument_context('cosmosdb mongodb database restore') as c: + c.argument('account_name', account_name_type, id_part=None, required=True) + c.argument('database_name', options_list=['--name', '-n'], help="Database name", required=True) + c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the database needs to be restored to.", required=True) + + # MongoDB collection restore + with self.argument_context('cosmosdb mongodb collection restore') as c: + c.argument('account_name', account_name_type, id_part=None, required=True) + c.argument('database_name', database_name_type, required=True) + c.argument('collection_name', options_list=['--name', '-n'], help="Collection name", required=True) + c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the collection needs to be restored to.", required=True) diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/commands.py b/src/cosmosdb-preview/azext_cosmosdb_preview/commands.py index 15968f7ef27..c93d6d88840 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/commands.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/commands.py @@ -219,3 +219,15 @@ def load_command_table(self, _): # Redistribute partition throughput for Mongo collection with self.command_group('cosmosdb mongodb collection', cosmosdb_mongo_sdk, client_factory=cf_mongo_db_resources) as g: g.custom_command('redistribute-partition-throughput', 'cli_begin_redistribute_mongo_container_partition_throughput', is_preview=True) + + with self.command_group('cosmosdb sql database', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: + g.custom_command('restore', 'cli_cosmosdb_sql_database_restore', is_preview=True) + + with self.command_group('cosmosdb sql container', cosmosdb_sql_sdk, client_factory=cf_sql_resources) as g: + g.custom_command('restore', 'cli_cosmosdb_sql_container_restore', is_preview=True) + + with self.command_group('cosmosdb mongodb database', cosmosdb_mongo_sdk, client_factory=cf_mongo_db_resources) as g: + g.custom_command('restore', 'cli_cosmosdb_mongodb_database_restore', is_preview=True) + + with self.command_group('cosmosdb mongodb collection', cosmosdb_mongo_sdk, client_factory=cf_mongo_db_resources) as g: + g.custom_command('restore', 'cli_cosmosdb_mongodb_collection_restore', is_preview=True) diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/custom.py b/src/cosmosdb-preview/azext_cosmosdb_preview/custom.py index 96ae21279ca..3b26aff6fd3 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/custom.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/custom.py @@ -31,7 +31,22 @@ PhysicalPartitionId, RedistributeThroughputParameters, RedistributeThroughputPropertiesResource, - ThroughputPolicyType + ThroughputPolicyType, + SqlDatabaseResource, + SqlDatabaseCreateUpdateParameters, + SqlContainerResource, + SqlContainerCreateUpdateParameters, + MongoDBDatabaseResource, + MongoDBDatabaseCreateUpdateParameters, + MongoDBCollectionResource, + MongoDBCollectionCreateUpdateParameters, + Location, + CreateMode, + ConsistencyPolicy, + ResourceIdentityType, + ManagedServiceIdentity, + AnalyticalStorageConfiguration, + ManagedServiceIdentityUserAssignedIdentity ) from azext_cosmosdb_preview._client_factory import ( @@ -41,26 +56,14 @@ ) from azure.cli.core.azclierror import InvalidArgumentValueError -from azure.core.exceptions import ResourceNotFoundError - -from azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models import ( - Location, - CreateMode, - ConsistencyPolicy, - ResourceIdentityType, - ManagedServiceIdentity, - AnalyticalStorageConfiguration, - Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties -) - from azure.cli.command_modules.cosmosdb.custom import _convert_to_utc_timestamp +from azure.core.exceptions import ResourceNotFoundError from azure.cli.command_modules.cosmosdb._client_factory import ( cf_restorable_sql_resources, cf_restorable_mongodb_resources ) - logger = get_logger(__name__) @@ -360,12 +363,6 @@ def cli_cosmosdb_managed_cassandra_datacenter_update(client, return client.begin_create_update(resource_group_name, cluster_name, data_center_name, data_center_resource) -def _handle_exists_exception(http_response_error): - if http_response_error.status_code == 404: - return False - raise http_response_error - - def cli_cosmosdb_service_create(client, account_name, resource_group_name, @@ -927,7 +924,7 @@ def _create_database_account(client, user_identities = {} for x in assign_identity: if x != SYSTEM_ID: - user_identities[x] = Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties() # pylint: disable=line-too-long + user_identities[x] = ManagedServiceIdentityUserAssignedIdentity() # pylint: disable=line-too-long else: enable_system = True if enable_system: @@ -1204,6 +1201,202 @@ def cli_begin_list_mongo_db_collection_partition_merge(client, return async_partition_merge_result.result() +def _handle_exists_exception(http_response_error): + if http_response_error.status_code == 404: + return False + raise http_response_error + + +def cli_cosmosdb_sql_database_restore(cmd, + client, + resource_group_name, + account_name, + database_name, + restore_timestamp=None): + restorable_database_accounts_client = cf_restorable_database_accounts(cmd.cli_ctx, []) + restorable_database_accounts = restorable_database_accounts_client.list() + restorable_database_accounts_list = list(restorable_database_accounts) + restore_timestamp_datetime_utc = _convert_to_utc_timestamp(restore_timestamp) + restorable_database_account = None + + for account in restorable_database_accounts_list: + if account.account_name == account_name: + if account.deletion_time is not None: + if account.deletion_time >= restore_timestamp_datetime_utc >= account.creation_time: + raise CLIError("Cannot perform inaccount restore on a deleted database account {}".format(account_name)) + else: + if restore_timestamp_datetime_utc >= account.creation_time: + restorable_database_account = account + break + + if restorable_database_account is None: + raise CLIError("Cannot find a database account with name {} that is online at {}".format(account_name, restore_timestamp)) + + # """Restores the deleted Azure Cosmos DB SQL database""" + create_mode = CreateMode.restore.value + restore_parameters = RestoreParameters( + restore_source=restorable_database_account.id, + restore_timestamp_in_utc=restore_timestamp + ) + + sql_database_resource = SqlDatabaseCreateUpdateParameters( + resource=SqlDatabaseResource( + id=database_name, + create_mode=create_mode, + restore_parameters=restore_parameters) + ) + + return client.begin_create_update_sql_database(resource_group_name, + account_name, + database_name, + sql_database_resource) + + +def cli_cosmosdb_sql_container_restore(cmd, + client, + resource_group_name, + account_name, + database_name, + container_name, + restore_timestamp=None): + # """Restores the deleted Azure Cosmos DB SQL container """ + restorable_database_accounts_client = cf_restorable_database_accounts(cmd.cli_ctx, []) + restorable_database_accounts = restorable_database_accounts_client.list() + restorable_database_accounts_list = list(restorable_database_accounts) + restore_timestamp_datetime_utc = _convert_to_utc_timestamp(restore_timestamp) + restorable_database_account = None + + for account in restorable_database_accounts_list: + if account.account_name == account_name: + if account.deletion_time is not None: + if account.deletion_time >= restore_timestamp_datetime_utc >= account.creation_time: + raise CLIError("Cannot perform inaccount restore on a deleted database account {}".format(account_name)) + else: + if restore_timestamp_datetime_utc >= account.creation_time: + restorable_database_account = account + break + + if restorable_database_account is None: + raise CLIError("Cannot find a database account with name {} that is online at {}".format(account_name, restore_timestamp)) + + # """Restores the deleted Azure Cosmos DB SQL container""" + create_mode = CreateMode.restore.value + restore_parameters = RestoreParameters( + restore_source=restorable_database_account.id, + restore_timestamp_in_utc=restore_timestamp + ) + + sql_container_resource = SqlContainerResource( + id=container_name, + create_mode=create_mode, + restore_parameters=restore_parameters) + + sql_container_create_update_resource = SqlContainerCreateUpdateParameters( + resource=sql_container_resource, + options={}) + + return client.begin_create_update_sql_container(resource_group_name, + account_name, + database_name, + container_name, + sql_container_create_update_resource) + + +def cli_cosmosdb_mongodb_database_restore(cmd, + client, + resource_group_name, + account_name, + database_name, + restore_timestamp=None): + # """Restores the deleted Azure Cosmos DB MongoDB database""" + restorable_database_accounts_client = cf_restorable_database_accounts(cmd.cli_ctx, []) + restorable_database_accounts = restorable_database_accounts_client.list() + restorable_database_accounts_list = list(restorable_database_accounts) + restore_timestamp_datetime_utc = _convert_to_utc_timestamp(restore_timestamp) + restorable_database_account = None + + for account in restorable_database_accounts_list: + if account.account_name == account_name: + if account.deletion_time is not None: + if account.deletion_time >= restore_timestamp_datetime_utc >= account.creation_time: + raise CLIError("Cannot perform inaccount restore on a deleted database account {}".format(account_name)) + else: + if restore_timestamp_datetime_utc >= account.creation_time: + restorable_database_account = account + break + + if restorable_database_account is None: + raise CLIError("Cannot find a database account with name {} that is online at {}".format(account_name, restore_timestamp)) + + # """Restores the deleted Azure Cosmos DB MongoDB database""" + create_mode = CreateMode.restore.value + restore_parameters = RestoreParameters( + restore_source=restorable_database_account.id, + restore_timestamp_in_utc=restore_timestamp + ) + + mongodb_database_resource = MongoDBDatabaseCreateUpdateParameters( + resource=MongoDBDatabaseResource(id=database_name, + create_mode=create_mode, + restore_parameters=restore_parameters), + options={}) + + return client.begin_create_update_mongo_db_database(resource_group_name, + account_name, + database_name, + mongodb_database_resource) + + +def cli_cosmosdb_mongodb_collection_restore(cmd, + client, + resource_group_name, + account_name, + database_name, + collection_name, + restore_timestamp=None): + # """Restores the Azure Cosmos DB MongoDB collection """ + restorable_database_accounts_client = cf_restorable_database_accounts(cmd.cli_ctx, []) + restorable_database_accounts = restorable_database_accounts_client.list() + restorable_database_accounts_list = list(restorable_database_accounts) + restore_timestamp_datetime_utc = _convert_to_utc_timestamp(restore_timestamp) + restorable_database_account = None + + for account in restorable_database_accounts_list: + if account.account_name == account_name: + if account.deletion_time is not None: + if account.deletion_time >= restore_timestamp_datetime_utc >= account.creation_time: + raise CLIError("Cannot perform inaccount restore on a deleted database account {}".format(account_name)) + else: + if restore_timestamp_datetime_utc >= account.creation_time: + restorable_database_account = account + break + + if restorable_database_account is None: + raise CLIError("Cannot find a database account with name {} that is online at {}".format(account_name, restore_timestamp)) + + # """Restores the deleted Azure Cosmos DB MongoDB collection""" + create_mode = CreateMode.restore.value + restore_parameters = RestoreParameters( + restore_source=restorable_database_account.id, + restore_timestamp_in_utc=restore_timestamp + ) + + mongodb_collection_resource = MongoDBCollectionResource(id=collection_name, + create_mode=create_mode, + restore_parameters=restore_parameters + ) + + mongodb_collection_create_update_resource = MongoDBCollectionCreateUpdateParameters( + resource=mongodb_collection_resource, + options={}) + + return client.begin_create_update_mongo_db_collection(resource_group_name, + account_name, + database_name, + collection_name, + mongodb_collection_create_update_resource) + + # pylint: disable=dangerous-default-value def cli_begin_retrieve_sql_container_partition_throughput(client, resource_group_name, diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_collection.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_collection.yaml new file mode 100644 index 00000000000..ab29dc90746 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_collection.yaml @@ -0,0 +1,3586 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_collection000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001","name":"cli_test_cosmosdb_collection000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-26T17:04:01Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '346' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 26 Sep 2022 17:04:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "westus", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '244' + Content-Type: + - application/json + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:04:08.9378785Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Invalid"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-26T17:04:08.9378785Z"},"secondaryMasterKey":{"generationTime":"2022-09-26T17:04:08.9378785Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:04:08.9378785Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:04:08.9378785Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/542e90ca-53c9-4f2b-b1c9-ef37ca5f36a1?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2261' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:04:11 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/542e90ca-53c9-4f2b-b1c9-ef37ca5f36a1?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/542e90ca-53c9-4f2b-b1c9-ef37ca5f36a1?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:04:41 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/542e90ca-53c9-4f2b-b1c9-ef37ca5f36a1?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:05:11 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/542e90ca-53c9-4f2b-b1c9-ef37ca5f36a1?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:05:41 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/542e90ca-53c9-4f2b-b1c9-ef37ca5f36a1?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:10 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/542e90ca-53c9-4f2b-b1c9-ef37ca5f36a1?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:45.1802282Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-26T17:05:45.1802282Z"},"secondaryMasterKey":{"generationTime":"2022-09-26T17:05:45.1802282Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:05:45.1802282Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:05:45.1802282Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2556' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:41 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:45.1802282Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-26T17:05:45.1802282Z"},"secondaryMasterKey":{"generationTime":"2022-09-26T17:05:45.1802282Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:05:45.1802282Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:05:45.1802282Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2556' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:41 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database create + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"sYXrv0NYwPKhSKhPINej6gGQ5dsAJhALqqcpFRVKzsTE4IBTfyGyLm5srAG9XANvHMg1GkTnU90Byccg9kCQZA==","secondaryMasterKey":"NBkzbnMkxXKJx29Gt4tZnHgMnoAbctD2bE2PqxP7cw9Y4cRsqdtzOaGlKlAih0uA3MYBCSjiJvx6TiBZnlFycQ==","primaryReadonlyMasterKey":"KeyAAWDcS4n0Mp9YCoodi4i8QTOg2nTCJl7t6tkwOik0mVuxhPJypNF2hIXSQjEQlwAqpveBl35Qn8aHcJcRZw==","secondaryReadonlyMasterKey":"WUu9HqhZVI22PsEB1etVWdd4Op3exRHfy2WA5xNfeL9mHLXG8TJ3CaRFKAbXJMu4FxN7vQdF2V50yNt5UKyceA=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:41 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database create + Connection: + - keep-alive + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:45.1802282Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2159' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:41 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: '{"id":"cli000004"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '18' + Content-Type: + - application/json + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:41 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: POST + uri: https://cli000003-westus.documents.azure.com/dbs + response: + body: + string: '{"id":"cli000004","_rid":"AoY8AA==","_self":"dbs\/AoY8AA==\/","_etag":"\"00007207-0000-0700-0000-6331dc230000\"","_colls":"colls\/","_users":"users\/","_ts":1664212003}' + headers: + cache-control: + - no-store, no-cache + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:42 GMT + etag: + - '"00007207-0000-0700-0000-6331dc230000"' + lsn: + - '8' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 658e0c54-a7d9-4e3b-a791-3b109279fd37 + x-ms-cosmos-llsn: + - '8' + x-ms-cosmos-quorum-acked-llsn: + - '7' + x-ms-current-replica-set-size: + - '4' + x-ms-current-write-quorum: + - '3' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '7' + x-ms-last-state-change-utc: + - Sun, 18 Sep 2022 03:15:02.919 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-quorum-acked-lsn: + - '7' + x-ms-request-charge: + - '4.95' + x-ms-request-duration-ms: + - '17.751' + x-ms-resource-quota: + - databases=1000; + x-ms-resource-usage: + - databases=1; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#8 + x-ms-transport-request-id: + - '189942' + x-ms-xp-role: + - '1' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection create + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d -c --default-ttl + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"sYXrv0NYwPKhSKhPINej6gGQ5dsAJhALqqcpFRVKzsTE4IBTfyGyLm5srAG9XANvHMg1GkTnU90Byccg9kCQZA==","secondaryMasterKey":"NBkzbnMkxXKJx29Gt4tZnHgMnoAbctD2bE2PqxP7cw9Y4cRsqdtzOaGlKlAih0uA3MYBCSjiJvx6TiBZnlFycQ==","primaryReadonlyMasterKey":"KeyAAWDcS4n0Mp9YCoodi4i8QTOg2nTCJl7t6tkwOik0mVuxhPJypNF2hIXSQjEQlwAqpveBl35Qn8aHcJcRZw==","secondaryReadonlyMasterKey":"WUu9HqhZVI22PsEB1etVWdd4Op3exRHfy2WA5xNfeL9mHLXG8TJ3CaRFKAbXJMu4FxN7vQdF2V50yNt5UKyceA=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:43 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -n -d -c --default-ttl + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:45.1802282Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2159' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:43 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:42 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: '{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '156' + Content-Type: + - application/json + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:42 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: POST + uri: https://cli000003-westus.documents.azure.com/dbs/cli000004/colls/ + response: + body: + string: '{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"\/*"}],"excludedPaths":[{"path":"\/\"_etag\"\/?"}]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"\/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"AoY8AO79UOo=","_ts":1664212004,"_self":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","_etag":"\"00007407-0000-0700-0000-6331dc240000\"","_docs":"docs\/","_sprocs":"sprocs\/","_triggers":"triggers\/","_udfs":"udfs\/","_conflicts":"conflicts\/"}' + headers: + cache-control: + - no-store, no-cache + collection-partition-index: + - '0' + collection-service-index: + - '0' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:44 GMT + etag: + - '"00007407-0000-0700-0000-6331dc240000"' + lsn: + - '1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 67659ab9-be4a-4cbb-9b68-d6f7798155e2 + x-ms-alt-content-path: + - dbs/cli76mxgd5vtneo + x-ms-cosmos-item-llsn: + - '1' + x-ms-cosmos-llsn: + - '1' + x-ms-cosmos-quorum-acked-llsn: + - '1' + x-ms-current-replica-set-size: + - '4' + x-ms-current-write-quorum: + - '3' + x-ms-documentdb-collection-index-transformation-progress: + - '100' + x-ms-documentdb-partitionkeyrangeid: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '1' + x-ms-item-lsn: + - '1' + x-ms-last-state-change-utc: + - Mon, 26 Sep 2022 16:30:18.306 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-quorum-acked-lsn: + - '1' + x-ms-request-charge: + - '1' + x-ms-request-duration-ms: + - '0.373' + x-ms-resource-quota: + - functions=50;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760; + x-ms-resource-usage: + - functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=0;documentsCount=0;collectionSize=0; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#1 + x-ms-transport-request-id: + - '2' + x-ms-xp-role: + - '1' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:43 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003-westus.documents.azure.com/offers + response: + body: + string: '{"_rid":"","Offers":[{"resource":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","offerType":"Invalid","offerResourceId":"AoY8AO79UOo=","offerVersion":"V2","content":{"offerThroughput":400,"offerIsRUPerMinuteThroughputEnabled":false,"offerMinimumThroughputParameters":{"maxThroughputEverProvisioned":400,"maxConsumedStorageEverInKB":0}},"id":"eCkI","_rid":"eCkI","_self":"offers\/eCkI\/","_etag":"\"00007507-0000-0700-0000-6331dc240000\"","_ts":1664212004}],"_count":1}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc-westus.documents.azure.com/offers + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:44 GMT + lsn: + - '9' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 2e4d8c25-917c-481f-bc83-4b901da9345a + x-ms-cosmos-llsn: + - '9' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '9' + x-ms-item-count: + - '1' + x-ms-last-state-change-utc: + - Sun, 18 Sep 2022 03:15:10.233 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '2' + x-ms-request-duration-ms: + - '0.369' + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#9 + x-ms-transport-request-id: + - '400353' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection show + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d -c + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"sYXrv0NYwPKhSKhPINej6gGQ5dsAJhALqqcpFRVKzsTE4IBTfyGyLm5srAG9XANvHMg1GkTnU90Byccg9kCQZA==","secondaryMasterKey":"NBkzbnMkxXKJx29Gt4tZnHgMnoAbctD2bE2PqxP7cw9Y4cRsqdtzOaGlKlAih0uA3MYBCSjiJvx6TiBZnlFycQ==","primaryReadonlyMasterKey":"KeyAAWDcS4n0Mp9YCoodi4i8QTOg2nTCJl7t6tkwOik0mVuxhPJypNF2hIXSQjEQlwAqpveBl35Qn8aHcJcRZw==","secondaryReadonlyMasterKey":"WUu9HqhZVI22PsEB1etVWdd4Op3exRHfy2WA5xNfeL9mHLXG8TJ3CaRFKAbXJMu4FxN7vQdF2V50yNt5UKyceA=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection show + Connection: + - keep-alive + ParameterSetName: + - -g -n -d -c + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:45.1802282Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2159' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:44 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:44 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003-westus.documents.azure.com/dbs/cli000004/colls/cli000002/ + response: + body: + string: '{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"\/*"}],"excludedPaths":[{"path":"\/\"_etag\"\/?"}]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"\/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"AoY8AO79UOo=","_ts":1664212004,"_self":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","_etag":"\"00007407-0000-0700-0000-6331dc240000\"","_docs":"docs\/","_sprocs":"sprocs\/","_triggers":"triggers\/","_udfs":"udfs\/","_conflicts":"conflicts\/"}' + headers: + cache-control: + - no-store, no-cache + collection-partition-index: + - '0' + collection-service-index: + - '0' + content-location: + - https://clipwhflejozmqc-westus.documents.azure.com/dbs/cli76mxgd5vtneo/colls/clixjfef44d52ik/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:45 GMT + etag: + - '"00007407-0000-0700-0000-6331dc240000"' + lsn: + - '1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 0e704e3f-95a3-4016-86ec-dc6cbc75b6d6 + x-ms-alt-content-path: + - dbs/cli76mxgd5vtneo + x-ms-content-path: + - AoY8AA== + x-ms-cosmos-item-llsn: + - '1' + x-ms-cosmos-llsn: + - '1' + x-ms-documentdb-collection-index-transformation-progress: + - '100' + x-ms-documentdb-partitionkeyrangeid: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '1' + x-ms-item-lsn: + - '1' + x-ms-last-state-change-utc: + - Mon, 26 Sep 2022 16:30:28.045 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '1' + x-ms-request-duration-ms: + - '0.473' + x-ms-resource-quota: + - functions=50;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760; + x-ms-resource-usage: + - functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=0;documentsCount=0;collectionSize=0; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#1 + x-ms-transport-request-id: + - '1' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:44 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003-westus.documents.azure.com/offers + response: + body: + string: '{"_rid":"","Offers":[{"resource":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","offerType":"Invalid","offerResourceId":"AoY8AO79UOo=","offerVersion":"V2","content":{"offerThroughput":400,"offerIsRUPerMinuteThroughputEnabled":false,"offerMinimumThroughputParameters":{"maxThroughputEverProvisioned":400,"maxConsumedStorageEverInKB":0}},"id":"eCkI","_rid":"eCkI","_self":"offers\/eCkI\/","_etag":"\"00007507-0000-0700-0000-6331dc240000\"","_ts":1664212004}],"_count":1}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc-westus.documents.azure.com/offers + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:45 GMT + lsn: + - '9' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - afd2eba1-6f4c-456a-91e1-9e67403eee3a + x-ms-cosmos-llsn: + - '9' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '9' + x-ms-item-count: + - '1' + x-ms-last-state-change-utc: + - Sun, 18 Sep 2022 03:15:08.756 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '2' + x-ms-request-duration-ms: + - '0.376' + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#9 + x-ms-transport-request-id: + - '402374' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection exists + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d -c + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"sYXrv0NYwPKhSKhPINej6gGQ5dsAJhALqqcpFRVKzsTE4IBTfyGyLm5srAG9XANvHMg1GkTnU90Byccg9kCQZA==","secondaryMasterKey":"NBkzbnMkxXKJx29Gt4tZnHgMnoAbctD2bE2PqxP7cw9Y4cRsqdtzOaGlKlAih0uA3MYBCSjiJvx6TiBZnlFycQ==","primaryReadonlyMasterKey":"KeyAAWDcS4n0Mp9YCoodi4i8QTOg2nTCJl7t6tkwOik0mVuxhPJypNF2hIXSQjEQlwAqpveBl35Qn8aHcJcRZw==","secondaryReadonlyMasterKey":"WUu9HqhZVI22PsEB1etVWdd4Op3exRHfy2WA5xNfeL9mHLXG8TJ3CaRFKAbXJMu4FxN7vQdF2V50yNt5UKyceA=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection exists + Connection: + - keep-alive + ParameterSetName: + - -g -n -d -c + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:45.1802282Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2159' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:45 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: '{"query":"SELECT * FROM root r WHERE r.id=@id","parameters":[{"name":"@id","value":"clixjfef44d52ik"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '103' + Content-Type: + - application/query+json + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:45 GMT + x-ms-documentdb-isquery: + - 'true' + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: POST + uri: https://cli000003-westus.documents.azure.com/dbs/cli000004/colls/ + response: + body: + string: '{"_rid":"AoY8AA==","DocumentCollections":[{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"\/*"}],"excludedPaths":[{"path":"\/\"_etag\"\/?"}]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"\/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"AoY8AO79UOo=","_ts":1664212004,"_self":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","_etag":"\"00007407-0000-0700-0000-6331dc240000\"","_docs":"docs\/","_sprocs":"sprocs\/","_triggers":"triggers\/","_udfs":"udfs\/","_conflicts":"conflicts\/"}],"_count":1}' + headers: + cache-control: + - no-store, no-cache + collection-partition-index: + - '0' + collection-service-index: + - '0' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:46 GMT + lsn: + - '9' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 236cd9da-9965-4f7b-a401-c4fafcf08803 + x-ms-alt-content-path: + - dbs/cli76mxgd5vtneo + x-ms-content-path: + - AoY8AA== + x-ms-cosmos-is-partition-key-delete-pending: + - 'false' + x-ms-cosmos-llsn: + - '9' + x-ms-cosmos-query-execution-info: + - '{"reverseRidEnabled":false,"reverseIndexScan":false}' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '9' + x-ms-item-count: + - '1' + x-ms-last-state-change-utc: + - Sun, 18 Sep 2022 03:15:10.233 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '5.64' + x-ms-request-duration-ms: + - '0.658' + x-ms-resource-quota: + - collections=5000; + x-ms-resource-usage: + - collections=1; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#9 + x-ms-transport-request-id: + - '400354' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection exists + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d -c + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"sYXrv0NYwPKhSKhPINej6gGQ5dsAJhALqqcpFRVKzsTE4IBTfyGyLm5srAG9XANvHMg1GkTnU90Byccg9kCQZA==","secondaryMasterKey":"NBkzbnMkxXKJx29Gt4tZnHgMnoAbctD2bE2PqxP7cw9Y4cRsqdtzOaGlKlAih0uA3MYBCSjiJvx6TiBZnlFycQ==","primaryReadonlyMasterKey":"KeyAAWDcS4n0Mp9YCoodi4i8QTOg2nTCJl7t6tkwOik0mVuxhPJypNF2hIXSQjEQlwAqpveBl35Qn8aHcJcRZw==","secondaryReadonlyMasterKey":"WUu9HqhZVI22PsEB1etVWdd4Op3exRHfy2WA5xNfeL9mHLXG8TJ3CaRFKAbXJMu4FxN7vQdF2V50yNt5UKyceA=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection exists + Connection: + - keep-alive + ParameterSetName: + - -g -n -d -c + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:45.1802282Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2159' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:46 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: '{"query":"SELECT * FROM root r WHERE r.id=@id","parameters":[{"name":"@id","value":"invalid"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '95' + Content-Type: + - application/query+json + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:46 GMT + x-ms-documentdb-isquery: + - 'true' + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: POST + uri: https://cli000003-westus.documents.azure.com/dbs/cli000004/colls/ + response: + body: + string: '{"_rid":"AoY8AA==","DocumentCollections":[],"_count":0}' + headers: + cache-control: + - no-store, no-cache + collection-partition-index: + - '0' + collection-service-index: + - '0' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:47 GMT + lsn: + - '9' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 8e4dd25f-caa3-4b58-9639-156b7ddcd0e8 + x-ms-alt-content-path: + - dbs/cli76mxgd5vtneo + x-ms-content-path: + - AoY8AA== + x-ms-cosmos-is-partition-key-delete-pending: + - 'false' + x-ms-cosmos-llsn: + - '9' + x-ms-cosmos-query-execution-info: + - '{"reverseRidEnabled":false,"reverseIndexScan":false}' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '9' + x-ms-item-count: + - '0' + x-ms-last-state-change-utc: + - Sun, 18 Sep 2022 03:15:10.233 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '5.58' + x-ms-request-duration-ms: + - '0.522' + x-ms-resource-quota: + - collections=5000; + x-ms-resource-usage: + - collections=1; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#9 + x-ms-transport-request-id: + - '420888' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection list + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"sYXrv0NYwPKhSKhPINej6gGQ5dsAJhALqqcpFRVKzsTE4IBTfyGyLm5srAG9XANvHMg1GkTnU90Byccg9kCQZA==","secondaryMasterKey":"NBkzbnMkxXKJx29Gt4tZnHgMnoAbctD2bE2PqxP7cw9Y4cRsqdtzOaGlKlAih0uA3MYBCSjiJvx6TiBZnlFycQ==","primaryReadonlyMasterKey":"KeyAAWDcS4n0Mp9YCoodi4i8QTOg2nTCJl7t6tkwOik0mVuxhPJypNF2hIXSQjEQlwAqpveBl35Qn8aHcJcRZw==","secondaryReadonlyMasterKey":"WUu9HqhZVI22PsEB1etVWdd4Op3exRHfy2WA5xNfeL9mHLXG8TJ3CaRFKAbXJMu4FxN7vQdF2V50yNt5UKyceA=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:45.1802282Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2159' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:47 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:47 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003-westus.documents.azure.com/dbs/cli000004/colls/ + response: + body: + string: '{"_rid":"AoY8AA==","DocumentCollections":[{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"\/*"}],"excludedPaths":[{"path":"\/\"_etag\"\/?"}]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"\/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"AoY8AO79UOo=","_ts":1664212004,"_self":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","_etag":"\"00007407-0000-0700-0000-6331dc240000\"","_docs":"docs\/","_sprocs":"sprocs\/","_triggers":"triggers\/","_udfs":"udfs\/","_conflicts":"conflicts\/"}],"_count":1}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc-westus.documents.azure.com/dbs/cli76mxgd5vtneo/colls/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:48 GMT + lsn: + - '9' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - d9fe19e6-505f-4b8f-a716-513e3ffc8c1a + x-ms-alt-content-path: + - dbs/cli76mxgd5vtneo + x-ms-content-path: + - AoY8AA== + x-ms-cosmos-llsn: + - '9' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '9' + x-ms-item-count: + - '1' + x-ms-last-state-change-utc: + - Sun, 18 Sep 2022 03:15:08.756 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '2' + x-ms-request-duration-ms: + - '0.619' + x-ms-resource-quota: + - collections=5000; + x-ms-resource-usage: + - collections=1; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#9 + x-ms-transport-request-id: + - '286622' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection update + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --throughput -g -n -d -c + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"sYXrv0NYwPKhSKhPINej6gGQ5dsAJhALqqcpFRVKzsTE4IBTfyGyLm5srAG9XANvHMg1GkTnU90Byccg9kCQZA==","secondaryMasterKey":"NBkzbnMkxXKJx29Gt4tZnHgMnoAbctD2bE2PqxP7cw9Y4cRsqdtzOaGlKlAih0uA3MYBCSjiJvx6TiBZnlFycQ==","primaryReadonlyMasterKey":"KeyAAWDcS4n0Mp9YCoodi4i8QTOg2nTCJl7t6tkwOik0mVuxhPJypNF2hIXSQjEQlwAqpveBl35Qn8aHcJcRZw==","secondaryReadonlyMasterKey":"WUu9HqhZVI22PsEB1etVWdd4Op3exRHfy2WA5xNfeL9mHLXG8TJ3CaRFKAbXJMu4FxN7vQdF2V50yNt5UKyceA=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:49 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection update + Connection: + - keep-alive + ParameterSetName: + - --throughput -g -n -d -c + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:45.1802282Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2159' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:49 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:48 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:49 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:48 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003-westus.documents.azure.com/dbs/cli000004/colls/cli000002/ + response: + body: + string: '{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"\/*"}],"excludedPaths":[{"path":"\/\"_etag\"\/?"}]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"\/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"AoY8AO79UOo=","_ts":1664212004,"_self":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","_etag":"\"00007407-0000-0700-0000-6331dc240000\"","_docs":"docs\/","_sprocs":"sprocs\/","_triggers":"triggers\/","_udfs":"udfs\/","_conflicts":"conflicts\/"}' + headers: + cache-control: + - no-store, no-cache + collection-partition-index: + - '0' + collection-service-index: + - '0' + content-location: + - https://clipwhflejozmqc-westus.documents.azure.com/dbs/cli76mxgd5vtneo/colls/clixjfef44d52ik/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:49 GMT + etag: + - '"00007407-0000-0700-0000-6331dc240000"' + lsn: + - '1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 7e854606-1f2c-4433-84ef-58ae522a6bcb + x-ms-alt-content-path: + - dbs/cli76mxgd5vtneo + x-ms-content-path: + - AoY8AA== + x-ms-cosmos-item-llsn: + - '1' + x-ms-cosmos-llsn: + - '1' + x-ms-cosmos-quorum-acked-llsn: + - '1' + x-ms-current-replica-set-size: + - '4' + x-ms-current-write-quorum: + - '3' + x-ms-documentdb-collection-index-transformation-progress: + - '100' + x-ms-documentdb-partitionkeyrangeid: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '1' + x-ms-item-lsn: + - '1' + x-ms-last-state-change-utc: + - Mon, 26 Sep 2022 16:30:18.306 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-quorum-acked-lsn: + - '1' + x-ms-request-charge: + - '1' + x-ms-request-duration-ms: + - '0.404' + x-ms-resource-quota: + - functions=50;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760; + x-ms-resource-usage: + - functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=0;documentsCount=0;collectionSize=0; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#1 + x-ms-transport-request-id: + - '1' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:48 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003-westus.documents.azure.com/offers + response: + body: + string: '{"_rid":"","Offers":[{"resource":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","offerType":"Invalid","offerResourceId":"AoY8AO79UOo=","offerVersion":"V2","content":{"offerThroughput":400,"offerIsRUPerMinuteThroughputEnabled":false,"offerMinimumThroughputParameters":{"maxThroughputEverProvisioned":400,"maxConsumedStorageEverInKB":0}},"id":"eCkI","_rid":"eCkI","_self":"offers\/eCkI\/","_etag":"\"00007507-0000-0700-0000-6331dc240000\"","_ts":1664212004}],"_count":1}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc-westus.documents.azure.com/offers + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:49 GMT + lsn: + - '9' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - a185f6d0-8978-441b-abb6-902122ea7e8c + x-ms-cosmos-llsn: + - '9' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '9' + x-ms-item-count: + - '1' + x-ms-last-state-change-utc: + - Sun, 18 Sep 2022 03:15:08.756 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '2' + x-ms-request-duration-ms: + - '0.345' + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#9 + x-ms-transport-request-id: + - '402377' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: '{"resource":"dbs/AoY8AA==/colls/AoY8AO79UOo=/","offerType":"Invalid","offerResourceId":"AoY8AO79UOo=","offerVersion":"V2","content":{"offerThroughput":500,"offerIsRUPerMinuteThroughputEnabled":false,"offerMinimumThroughputParameters":{"maxThroughputEverProvisioned":400,"maxConsumedStorageEverInKB":0}},"id":"eCkI","_rid":"eCkI","_self":"offers/eCkI/","_etag":"\"00007507-0000-0700-0000-6331dc240000\"","_ts":1664212004}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '420' + Content-Type: + - application/json + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:48 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: PUT + uri: https://cli000003-westus.documents.azure.com/offers/eCkI/ + response: + body: + string: '{"resource":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","offerType":"Invalid","offerResourceId":"AoY8AO79UOo=","offerVersion":"V2","content":{"offerThroughput":500,"offerIsRUPerMinuteThroughputEnabled":false,"offerMinimumThroughputParameters":{"maxThroughputEverProvisioned":500,"maxConsumedStorageEverInKB":0}},"id":"eCkI","_rid":"eCkI","_self":"offers\/eCkI\/","_etag":"\"00007807-0000-0700-0000-6331dc2a0000\"","_ts":1664212010}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc-westus.documents.azure.com/offers/eCkI/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:49 GMT + etag: + - '"00007807-0000-0700-0000-6331dc2a0000"' + lsn: + - '10' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 7e485df2-3a28-4de4-add3-d13043ac6eb7 + x-ms-cosmos-llsn: + - '10' + x-ms-cosmos-quorum-acked-llsn: + - '9' + x-ms-current-replica-set-size: + - '4' + x-ms-current-write-quorum: + - '3' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '9' + x-ms-last-state-change-utc: + - Sun, 18 Sep 2022 03:15:02.919 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-quorum-acked-lsn: + - '9' + x-ms-request-charge: + - '9.9' + x-ms-request-duration-ms: + - '17.243' + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#10 + x-ms-transport-request-id: + - '215480' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection update + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --default-ttl -g -n -d -c + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"sYXrv0NYwPKhSKhPINej6gGQ5dsAJhALqqcpFRVKzsTE4IBTfyGyLm5srAG9XANvHMg1GkTnU90Byccg9kCQZA==","secondaryMasterKey":"NBkzbnMkxXKJx29Gt4tZnHgMnoAbctD2bE2PqxP7cw9Y4cRsqdtzOaGlKlAih0uA3MYBCSjiJvx6TiBZnlFycQ==","primaryReadonlyMasterKey":"KeyAAWDcS4n0Mp9YCoodi4i8QTOg2nTCJl7t6tkwOik0mVuxhPJypNF2hIXSQjEQlwAqpveBl35Qn8aHcJcRZw==","secondaryReadonlyMasterKey":"WUu9HqhZVI22PsEB1etVWdd4Op3exRHfy2WA5xNfeL9mHLXG8TJ3CaRFKAbXJMu4FxN7vQdF2V50yNt5UKyceA=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection update + Connection: + - keep-alive + ParameterSetName: + - --default-ttl -g -n -d -c + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:45.1802282Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2159' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:49 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:49 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003-westus.documents.azure.com/dbs/cli000004/colls/cli000002/ + response: + body: + string: '{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"\/*"}],"excludedPaths":[{"path":"\/\"_etag\"\/?"}]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"\/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"AoY8AO79UOo=","_ts":1664212004,"_self":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","_etag":"\"00007407-0000-0700-0000-6331dc240000\"","_docs":"docs\/","_sprocs":"sprocs\/","_triggers":"triggers\/","_udfs":"udfs\/","_conflicts":"conflicts\/"}' + headers: + cache-control: + - no-store, no-cache + collection-partition-index: + - '0' + collection-service-index: + - '0' + content-location: + - https://clipwhflejozmqc-westus.documents.azure.com/dbs/cli76mxgd5vtneo/colls/clixjfef44d52ik/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:50 GMT + etag: + - '"00007407-0000-0700-0000-6331dc240000"' + lsn: + - '2' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 8a90d8a2-c00a-4dbd-8584-d174de63775b + x-ms-alt-content-path: + - dbs/cli76mxgd5vtneo + x-ms-content-path: + - AoY8AA== + x-ms-cosmos-item-llsn: + - '1' + x-ms-cosmos-llsn: + - '2' + x-ms-documentdb-collection-index-transformation-progress: + - '100' + x-ms-documentdb-partitionkeyrangeid: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '2' + x-ms-item-lsn: + - '1' + x-ms-last-state-change-utc: + - Mon, 26 Sep 2022 16:30:26.213 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '1' + x-ms-request-duration-ms: + - '0.412' + x-ms-resource-quota: + - functions=50;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760; + x-ms-resource-usage: + - functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=0;documentsCount=0;collectionSize=0; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#2 + x-ms-transport-request-id: + - '1' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: '{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"AoY8AO79UOo=","_ts":1664212004,"_self":"dbs/AoY8AA==/colls/AoY8AO79UOo=/","_etag":"\"00007407-0000-0700-0000-6331dc240000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","defaultTtl":1000}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '567' + Content-Type: + - application/json + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:49 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: PUT + uri: https://cli000003-westus.documents.azure.com/dbs/cli000004/colls/cli000002/ + response: + body: + string: '{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"\/*"}],"excludedPaths":[{"path":"\/\"_etag\"\/?"}]},"defaultTtl":1000,"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"\/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"AoY8AO79UOo=","_ts":1664212011,"_self":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","_etag":"\"00007907-0000-0700-0000-6331dc2b0000\"","_docs":"docs\/","_sprocs":"sprocs\/","_triggers":"triggers\/","_udfs":"udfs\/","_conflicts":"conflicts\/"}' + headers: + cache-control: + - no-store, no-cache + collection-partition-index: + - '0' + collection-service-index: + - '0' + content-location: + - https://clipwhflejozmqc-westus.documents.azure.com/dbs/cli76mxgd5vtneo/colls/clixjfef44d52ik/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:50 GMT + etag: + - '"00007907-0000-0700-0000-6331dc2b0000"' + lsn: + - '3' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - a99e5496-704e-4112-b3c3-2a0eaa008c2a + x-ms-alt-content-path: + - dbs/cli76mxgd5vtneo + x-ms-cosmos-llsn: + - '3' + x-ms-cosmos-quorum-acked-llsn: + - '2' + x-ms-current-replica-set-size: + - '4' + x-ms-current-write-quorum: + - '3' + x-ms-documentdb-partitionkeyrangeid: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '2' + x-ms-last-state-change-utc: + - Mon, 26 Sep 2022 16:30:18.306 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-quorum-acked-lsn: + - '2' + x-ms-request-charge: + - '9.9' + x-ms-request-duration-ms: + - '7.568' + x-ms-resource-quota: + - functions=50;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760; + x-ms-resource-usage: + - functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=0;documentsCount=0;collectionSize=0; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#3 + x-ms-transport-request-id: + - '1' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection update + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --default-ttl -g -n -d -c + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"sYXrv0NYwPKhSKhPINej6gGQ5dsAJhALqqcpFRVKzsTE4IBTfyGyLm5srAG9XANvHMg1GkTnU90Byccg9kCQZA==","secondaryMasterKey":"NBkzbnMkxXKJx29Gt4tZnHgMnoAbctD2bE2PqxP7cw9Y4cRsqdtzOaGlKlAih0uA3MYBCSjiJvx6TiBZnlFycQ==","primaryReadonlyMasterKey":"KeyAAWDcS4n0Mp9YCoodi4i8QTOg2nTCJl7t6tkwOik0mVuxhPJypNF2hIXSQjEQlwAqpveBl35Qn8aHcJcRZw==","secondaryReadonlyMasterKey":"WUu9HqhZVI22PsEB1etVWdd4Op3exRHfy2WA5xNfeL9mHLXG8TJ3CaRFKAbXJMu4FxN7vQdF2V50yNt5UKyceA=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection update + Connection: + - keep-alive + ParameterSetName: + - --default-ttl -g -n -d -c + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:45.1802282Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2159' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:50 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:50 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003-westus.documents.azure.com/dbs/cli000004/colls/cli000002/ + response: + body: + string: '{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"\/*"}],"excludedPaths":[{"path":"\/\"_etag\"\/?"}]},"defaultTtl":1000,"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"\/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"AoY8AO79UOo=","_ts":1664212011,"_self":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","_etag":"\"00007907-0000-0700-0000-6331dc2b0000\"","_docs":"docs\/","_sprocs":"sprocs\/","_triggers":"triggers\/","_udfs":"udfs\/","_conflicts":"conflicts\/"}' + headers: + cache-control: + - no-store, no-cache + collection-partition-index: + - '0' + collection-service-index: + - '0' + content-location: + - https://clipwhflejozmqc-westus.documents.azure.com/dbs/cli76mxgd5vtneo/colls/clixjfef44d52ik/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:51 GMT + etag: + - '"00007907-0000-0700-0000-6331dc2b0000"' + lsn: + - '3' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 3b9f4497-f919-4ffe-9f65-cf1390a38aa6 + x-ms-alt-content-path: + - dbs/cli76mxgd5vtneo + x-ms-content-path: + - AoY8AA== + x-ms-cosmos-item-llsn: + - '3' + x-ms-cosmos-llsn: + - '3' + x-ms-cosmos-quorum-acked-llsn: + - '3' + x-ms-current-replica-set-size: + - '4' + x-ms-current-write-quorum: + - '3' + x-ms-documentdb-collection-index-transformation-progress: + - '100' + x-ms-documentdb-partitionkeyrangeid: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '3' + x-ms-item-lsn: + - '3' + x-ms-last-state-change-utc: + - Mon, 26 Sep 2022 16:30:18.306 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-quorum-acked-lsn: + - '3' + x-ms-request-charge: + - '1' + x-ms-request-duration-ms: + - '0.481' + x-ms-resource-quota: + - functions=50;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760; + x-ms-resource-usage: + - functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=0;documentsCount=0;collectionSize=0; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#3 + x-ms-transport-request-id: + - '1' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: '{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"AoY8AO79UOo=","_ts":1664212011,"_self":"dbs/AoY8AA==/colls/AoY8AO79UOo=/","_etag":"\"00007907-0000-0700-0000-6331dc2b0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '549' + Content-Type: + - application/json + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:51 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: PUT + uri: https://cli000003-westus.documents.azure.com/dbs/cli000004/colls/cli000002/ + response: + body: + string: '{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"\/*"}],"excludedPaths":[{"path":"\/\"_etag\"\/?"}]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"\/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"AoY8AO79UOo=","_ts":1664212012,"_self":"dbs\/AoY8AA==\/colls\/AoY8AO79UOo=\/","_etag":"\"00007a07-0000-0700-0000-6331dc2c0000\"","_docs":"docs\/","_sprocs":"sprocs\/","_triggers":"triggers\/","_udfs":"udfs\/","_conflicts":"conflicts\/"}' + headers: + cache-control: + - no-store, no-cache + collection-partition-index: + - '0' + collection-service-index: + - '0' + content-location: + - https://clipwhflejozmqc-westus.documents.azure.com/dbs/cli76mxgd5vtneo/colls/clixjfef44d52ik/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:51 GMT + etag: + - '"00007a07-0000-0700-0000-6331dc2c0000"' + lsn: + - '4' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - cb6278f3-5bb7-4afe-8511-b7c9436ab4d3 + x-ms-alt-content-path: + - dbs/cli76mxgd5vtneo + x-ms-cosmos-llsn: + - '4' + x-ms-cosmos-quorum-acked-llsn: + - '3' + x-ms-current-replica-set-size: + - '4' + x-ms-current-write-quorum: + - '3' + x-ms-documentdb-partitionkeyrangeid: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '3' + x-ms-last-state-change-utc: + - Mon, 26 Sep 2022 16:30:18.306 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-quorum-acked-lsn: + - '3' + x-ms-request-charge: + - '9.9' + x-ms-request-duration-ms: + - '7.369' + x-ms-resource-quota: + - functions=50;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760; + x-ms-resource-usage: + - functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=0;documentsCount=0;collectionSize=0; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#4 + x-ms-transport-request-id: + - '2' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d -c --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"sYXrv0NYwPKhSKhPINej6gGQ5dsAJhALqqcpFRVKzsTE4IBTfyGyLm5srAG9XANvHMg1GkTnU90Byccg9kCQZA==","secondaryMasterKey":"NBkzbnMkxXKJx29Gt4tZnHgMnoAbctD2bE2PqxP7cw9Y4cRsqdtzOaGlKlAih0uA3MYBCSjiJvx6TiBZnlFycQ==","primaryReadonlyMasterKey":"KeyAAWDcS4n0Mp9YCoodi4i8QTOg2nTCJl7t6tkwOik0mVuxhPJypNF2hIXSQjEQlwAqpveBl35Qn8aHcJcRZw==","secondaryReadonlyMasterKey":"WUu9HqhZVI22PsEB1etVWdd4Op3exRHfy2WA5xNfeL9mHLXG8TJ3CaRFKAbXJMu4FxN7vQdF2V50yNt5UKyceA=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:52 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb collection delete + Connection: + - keep-alive + ParameterSetName: + - -g -n -d -c --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:45.1802282Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"135f2e8e-ea9f-4469-9d0e-be00e8e60254","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2159' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:52 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:51 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://clipwhflejozmqc.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:52 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:52 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: DELETE + uri: https://cli000003-westus.documents.azure.com/dbs/cli000004/colls/cli000002/ + response: + body: + string: '' + headers: + cache-control: + - no-store, no-cache + collection-partition-index: + - '0' + collection-service-index: + - '0' + content-length: + - '0' + content-location: + - https://clipwhflejozmqc-westus.documents.azure.com/dbs/cli76mxgd5vtneo/colls/clixjfef44d52ik/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:52 GMT + lsn: + - '13' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + x-ms-activity-id: + - cb8bce96-25bb-4718-831a-5519cebe1a6a + x-ms-alt-content-path: + - dbs/cli76mxgd5vtneo + x-ms-cosmos-llsn: + - '13' + x-ms-cosmos-quorum-acked-llsn: + - '12' + x-ms-current-replica-set-size: + - '4' + x-ms-current-write-quorum: + - '3' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '12' + x-ms-last-state-change-utc: + - Sun, 18 Sep 2022 03:15:02.919 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-quorum-acked-lsn: + - '12' + x-ms-request-charge: + - '4.95' + x-ms-request-duration-ms: + - '24.028' + x-ms-resource-quota: + - collections=5000; + x-ms-resource-usage: + - collections=1; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#13 + x-ms-transport-request-id: + - '225769' + x-ms-xp-role: + - '1' + status: + code: 204 + message: No Content +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_database.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_database.yaml new file mode 100644 index 00000000000..e03bd41bd32 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_database.yaml @@ -0,0 +1,2205 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_database000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001","name":"cli_test_cosmosdb_database000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-26T17:04:01Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '342' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 26 Sep 2022 17:04:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "westus", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '244' + Content-Type: + - application/json + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:04:09.4058241Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"bb2a1cf0-176d-49a8-a904-b1a0a8c7f349","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Invalid"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-26T17:04:09.4058241Z"},"secondaryMasterKey":{"generationTime":"2022-09-26T17:04:09.4058241Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:04:09.4058241Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:04:09.4058241Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/de63112b-d1f8-468b-af89-97e2114f963b?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2259' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:04:12 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/de63112b-d1f8-468b-af89-97e2114f963b?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/de63112b-d1f8-468b-af89-97e2114f963b?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:04:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/de63112b-d1f8-468b-af89-97e2114f963b?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:05:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/de63112b-d1f8-468b-af89-97e2114f963b?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:05:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/de63112b-d1f8-468b-af89-97e2114f963b?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/de63112b-d1f8-468b-af89-97e2114f963b?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:58.8947694Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"bb2a1cf0-176d-49a8-a904-b1a0a8c7f349","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-26T17:05:58.8947694Z"},"secondaryMasterKey":{"generationTime":"2022-09-26T17:05:58.8947694Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:05:58.8947694Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:05:58.8947694Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2554' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:58.8947694Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"bb2a1cf0-176d-49a8-a904-b1a0a8c7f349","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-26T17:05:58.8947694Z"},"secondaryMasterKey":{"generationTime":"2022-09-26T17:05:58.8947694Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:05:58.8947694Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:05:58.8947694Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2554' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database create + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"ZpxjNbrsp1LD9gk8l4WfdaOHICENKYVmYi7ntYXYFHBfzbDEnaF9ZnulkIYB0sRsY6NrrsHzOeJZCf1zqeWEXA==","secondaryMasterKey":"ONwDBN63Jll4NwMqijb9it1LdfXTmzRNwVDhpfdVWDgsCxchh9Grf0sqbFCv3DXKQYCiZmygc30cEMbi1905Qg==","primaryReadonlyMasterKey":"yytk71Pqeqm7okIBqEe8XkKJSppov775rs8aBkI90ZJIyosmUt14Lfw0ycUGJB307pu0aL0COkk7jxGCjiSXQg==","secondaryReadonlyMasterKey":"3LTzIsQ2rmDFkyo0fnfkMV8A7WytlOmPEDWV1werd0cSOD38J8wl46c5wy2IZ8XzAymIICsYaT2BrRv4zNODTQ=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database create + Connection: + - keep-alive + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:58.8947694Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"bb2a1cf0-176d-49a8-a904-b1a0a8c7f349","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2157' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:43 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:42 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://cliiipoyta5ddt5.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:43 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: '{"id":"cli000002"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '18' + Content-Type: + - application/json + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:42 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: POST + uri: https://cli000003-westus.documents.azure.com/dbs + response: + body: + string: '{"id":"cli000002","_rid":"7I89AA==","_self":"dbs\/7I89AA==\/","_etag":"\"00002c09-0000-0700-0000-6331dc240000\"","_colls":"colls\/","_users":"users\/","_ts":1664212004}' + headers: + cache-control: + - no-store, no-cache + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:44 GMT + etag: + - '"00002c09-0000-0700-0000-6331dc240000"' + lsn: + - '8' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 43cf7f21-340e-4757-9682-2c400955cfe3 + x-ms-cosmos-llsn: + - '8' + x-ms-cosmos-quorum-acked-llsn: + - '7' + x-ms-current-replica-set-size: + - '4' + x-ms-current-write-quorum: + - '3' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '7' + x-ms-last-state-change-utc: + - Fri, 23 Sep 2022 17:45:03.191 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-quorum-acked-lsn: + - '7' + x-ms-request-charge: + - '4.95' + x-ms-request-duration-ms: + - '24.354' + x-ms-resource-quota: + - databases=1000; + x-ms-resource-usage: + - databases=1; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#8 + x-ms-transport-request-id: + - '60712' + x-ms-xp-role: + - '1' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database show + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"ZpxjNbrsp1LD9gk8l4WfdaOHICENKYVmYi7ntYXYFHBfzbDEnaF9ZnulkIYB0sRsY6NrrsHzOeJZCf1zqeWEXA==","secondaryMasterKey":"ONwDBN63Jll4NwMqijb9it1LdfXTmzRNwVDhpfdVWDgsCxchh9Grf0sqbFCv3DXKQYCiZmygc30cEMbi1905Qg==","primaryReadonlyMasterKey":"yytk71Pqeqm7okIBqEe8XkKJSppov775rs8aBkI90ZJIyosmUt14Lfw0ycUGJB307pu0aL0COkk7jxGCjiSXQg==","secondaryReadonlyMasterKey":"3LTzIsQ2rmDFkyo0fnfkMV8A7WytlOmPEDWV1werd0cSOD38J8wl46c5wy2IZ8XzAymIICsYaT2BrRv4zNODTQ=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database show + Connection: + - keep-alive + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:58.8947694Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"bb2a1cf0-176d-49a8-a904-b1a0a8c7f349","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2157' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:43 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://cliiipoyta5ddt5.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:43 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003-westus.documents.azure.com/dbs/cli000002/ + response: + body: + string: '{"id":"cli000002","_rid":"7I89AA==","_self":"dbs\/7I89AA==\/","_etag":"\"00002c09-0000-0700-0000-6331dc240000\"","_colls":"colls\/","_users":"users\/","_ts":1664212004}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://cliiipoyta5ddt5-westus.documents.azure.com/dbs/cli4ssnsperprmw/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:44 GMT + etag: + - '"00002c09-0000-0700-0000-6331dc240000"' + lsn: + - '8' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 95172c21-9766-4160-871d-04ff383c2a6c + x-ms-cosmos-item-llsn: + - '8' + x-ms-cosmos-llsn: + - '8' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '8' + x-ms-item-lsn: + - '8' + x-ms-last-state-change-utc: + - Fri, 23 Sep 2022 17:45:09.766 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '2' + x-ms-request-duration-ms: + - '0.226' + x-ms-resource-quota: + - databases=1000; + x-ms-resource-usage: + - databases=1; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#8 + x-ms-transport-request-id: + - '344914' + x-ms-xp-role: + - '2' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database exists + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"ZpxjNbrsp1LD9gk8l4WfdaOHICENKYVmYi7ntYXYFHBfzbDEnaF9ZnulkIYB0sRsY6NrrsHzOeJZCf1zqeWEXA==","secondaryMasterKey":"ONwDBN63Jll4NwMqijb9it1LdfXTmzRNwVDhpfdVWDgsCxchh9Grf0sqbFCv3DXKQYCiZmygc30cEMbi1905Qg==","primaryReadonlyMasterKey":"yytk71Pqeqm7okIBqEe8XkKJSppov775rs8aBkI90ZJIyosmUt14Lfw0ycUGJB307pu0aL0COkk7jxGCjiSXQg==","secondaryReadonlyMasterKey":"3LTzIsQ2rmDFkyo0fnfkMV8A7WytlOmPEDWV1werd0cSOD38J8wl46c5wy2IZ8XzAymIICsYaT2BrRv4zNODTQ=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database exists + Connection: + - keep-alive + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:58.8947694Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"bb2a1cf0-176d-49a8-a904-b1a0a8c7f349","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2157' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:44 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://cliiipoyta5ddt5.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: '{"query":"SELECT * FROM root r WHERE r.id=@id","parameters":[{"name":"@id","value":"cli4ssnsperprmw"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '103' + Content-Type: + - application/query+json + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:44 GMT + x-ms-documentdb-isquery: + - 'true' + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: POST + uri: https://cli000003-westus.documents.azure.com/dbs + response: + body: + string: '{"_rid":"","Databases":[{"id":"cli000002","_rid":"7I89AA==","_self":"dbs\/7I89AA==\/","_etag":"\"00002c09-0000-0700-0000-6331dc240000\"","_colls":"colls\/","_users":"users\/","_ts":1664212004}],"_count":1}' + headers: + cache-control: + - no-store, no-cache + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:45 GMT + lsn: + - '8' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 2a5fbfc7-7dde-40a8-b930-ce0ac9fdd6bb + x-ms-cosmos-is-partition-key-delete-pending: + - 'false' + x-ms-cosmos-llsn: + - '8' + x-ms-cosmos-query-execution-info: + - '{"reverseRidEnabled":false,"reverseIndexScan":false}' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '8' + x-ms-item-count: + - '1' + x-ms-last-state-change-utc: + - Fri, 23 Sep 2022 17:45:09.766 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '5.62' + x-ms-request-duration-ms: + - '0.511' + x-ms-resource-quota: + - databases=1000; + x-ms-resource-usage: + - databases=1; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#8 + x-ms-transport-request-id: + - '772726' + x-ms-xp-role: + - '2' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database exists + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"ZpxjNbrsp1LD9gk8l4WfdaOHICENKYVmYi7ntYXYFHBfzbDEnaF9ZnulkIYB0sRsY6NrrsHzOeJZCf1zqeWEXA==","secondaryMasterKey":"ONwDBN63Jll4NwMqijb9it1LdfXTmzRNwVDhpfdVWDgsCxchh9Grf0sqbFCv3DXKQYCiZmygc30cEMbi1905Qg==","primaryReadonlyMasterKey":"yytk71Pqeqm7okIBqEe8XkKJSppov775rs8aBkI90ZJIyosmUt14Lfw0ycUGJB307pu0aL0COkk7jxGCjiSXQg==","secondaryReadonlyMasterKey":"3LTzIsQ2rmDFkyo0fnfkMV8A7WytlOmPEDWV1werd0cSOD38J8wl46c5wy2IZ8XzAymIICsYaT2BrRv4zNODTQ=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database exists + Connection: + - keep-alive + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:58.8947694Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"bb2a1cf0-176d-49a8-a904-b1a0a8c7f349","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2157' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:45 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://cliiipoyta5ddt5.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: '{"query":"SELECT * FROM root r WHERE r.id=@id","parameters":[{"name":"@id","value":"invalid"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '95' + Content-Type: + - application/query+json + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:45 GMT + x-ms-documentdb-isquery: + - 'true' + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: POST + uri: https://cli000003-westus.documents.azure.com/dbs + response: + body: + string: '{"_rid":"","Databases":[],"_count":0}' + headers: + cache-control: + - no-store, no-cache + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:46 GMT + lsn: + - '8' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - e53b108b-69d0-49d1-aef0-8018583858cc + x-ms-cosmos-is-partition-key-delete-pending: + - 'false' + x-ms-cosmos-llsn: + - '8' + x-ms-cosmos-query-execution-info: + - '{"reverseRidEnabled":false,"reverseIndexScan":false}' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '8' + x-ms-item-count: + - '0' + x-ms-last-state-change-utc: + - Fri, 23 Sep 2022 17:45:09.766 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '5.58' + x-ms-request-duration-ms: + - '0.422' + x-ms-resource-quota: + - databases=1000; + x-ms-resource-usage: + - databases=1; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#8 + x-ms-transport-request-id: + - '753098' + x-ms-xp-role: + - '2' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database list + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"ZpxjNbrsp1LD9gk8l4WfdaOHICENKYVmYi7ntYXYFHBfzbDEnaF9ZnulkIYB0sRsY6NrrsHzOeJZCf1zqeWEXA==","secondaryMasterKey":"ONwDBN63Jll4NwMqijb9it1LdfXTmzRNwVDhpfdVWDgsCxchh9Grf0sqbFCv3DXKQYCiZmygc30cEMbi1905Qg==","primaryReadonlyMasterKey":"yytk71Pqeqm7okIBqEe8XkKJSppov775rs8aBkI90ZJIyosmUt14Lfw0ycUGJB307pu0aL0COkk7jxGCjiSXQg==","secondaryReadonlyMasterKey":"3LTzIsQ2rmDFkyo0fnfkMV8A7WytlOmPEDWV1werd0cSOD38J8wl46c5wy2IZ8XzAymIICsYaT2BrRv4zNODTQ=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database list + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:58.8947694Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"bb2a1cf0-176d-49a8-a904-b1a0a8c7f349","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2157' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:46 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://cliiipoyta5ddt5.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:46 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003-westus.documents.azure.com/dbs + response: + body: + string: '{"_rid":"","Databases":[{"id":"cli000002","_rid":"7I89AA==","_self":"dbs\/7I89AA==\/","_etag":"\"00002c09-0000-0700-0000-6331dc240000\"","_colls":"colls\/","_users":"users\/","_ts":1664212004}],"_count":1}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://cliiipoyta5ddt5-westus.documents.azure.com/dbs + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:47 GMT + lsn: + - '8' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - 06eb82b4-40b8-487b-bdd5-407f9d3dc529 + x-ms-cosmos-llsn: + - '8' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '8' + x-ms-item-count: + - '1' + x-ms-last-state-change-utc: + - Fri, 23 Sep 2022 17:45:09.762 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '2' + x-ms-request-duration-ms: + - '0.402' + x-ms-resource-quota: + - databases=1000;collections=5000;users=500000;permissions=2000000;clientEncryptionKeys=20;interopUsers=2000;authPolicyElements=200000;roleDefinitions=100;roleAssignments=2000; + x-ms-resource-usage: + - databases=1;collections=0;users=0;permissions=0;clientEncryptionKeys=0;interopUsers=0;authPolicyElements=0;roleDefinitions=0;roleAssignments=0; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#8 + x-ms-transport-request-id: + - '830978' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"ZpxjNbrsp1LD9gk8l4WfdaOHICENKYVmYi7ntYXYFHBfzbDEnaF9ZnulkIYB0sRsY6NrrsHzOeJZCf1zqeWEXA==","secondaryMasterKey":"ONwDBN63Jll4NwMqijb9it1LdfXTmzRNwVDhpfdVWDgsCxchh9Grf0sqbFCv3DXKQYCiZmygc30cEMbi1905Qg==","primaryReadonlyMasterKey":"yytk71Pqeqm7okIBqEe8XkKJSppov775rs8aBkI90ZJIyosmUt14Lfw0ycUGJB307pu0aL0COkk7jxGCjiSXQg==","secondaryReadonlyMasterKey":"3LTzIsQ2rmDFkyo0fnfkMV8A7WytlOmPEDWV1werd0cSOD38J8wl46c5wy2IZ8XzAymIICsYaT2BrRv4zNODTQ=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database delete + Connection: + - keep-alive + ParameterSetName: + - -g -n -d --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:58.8947694Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"bb2a1cf0-176d-49a8-a904-b1a0a8c7f349","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2157' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:47 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://cliiipoyta5ddt5.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:47 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: DELETE + uri: https://cli000003-westus.documents.azure.com/dbs/cli000002/ + response: + body: + string: '' + headers: + cache-control: + - no-store, no-cache + content-length: + - '0' + content-location: + - https://cliiipoyta5ddt5-westus.documents.azure.com/dbs/cli4ssnsperprmw/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:48 GMT + lsn: + - '9' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + x-ms-activity-id: + - 74cbe137-ddb3-4bc0-9edd-7db3a94d2be8 + x-ms-cosmos-llsn: + - '9' + x-ms-cosmos-quorum-acked-llsn: + - '8' + x-ms-current-replica-set-size: + - '4' + x-ms-current-write-quorum: + - '3' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '8' + x-ms-last-state-change-utc: + - Fri, 23 Sep 2022 17:45:03.191 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-quorum-acked-lsn: + - '8' + x-ms-request-charge: + - '4.95' + x-ms-request-duration-ms: + - '29.082' + x-ms-resource-quota: + - databases=1000; + x-ms-resource-usage: + - databases=0; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#9 + x-ms-transport-request-id: + - '62716' + x-ms-xp-role: + - '1' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database exists + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/listKeys?api-version=2022-05-15 + response: + body: + string: '{"primaryMasterKey":"ZpxjNbrsp1LD9gk8l4WfdaOHICENKYVmYi7ntYXYFHBfzbDEnaF9ZnulkIYB0sRsY6NrrsHzOeJZCf1zqeWEXA==","secondaryMasterKey":"ONwDBN63Jll4NwMqijb9it1LdfXTmzRNwVDhpfdVWDgsCxchh9Grf0sqbFCv3DXKQYCiZmygc30cEMbi1905Qg==","primaryReadonlyMasterKey":"yytk71Pqeqm7okIBqEe8XkKJSppov775rs8aBkI90ZJIyosmUt14Lfw0ycUGJB307pu0aL0COkk7jxGCjiSXQg==","secondaryReadonlyMasterKey":"3LTzIsQ2rmDFkyo0fnfkMV8A7WytlOmPEDWV1werd0cSOD38J8wl46c5wy2IZ8XzAymIICsYaT2BrRv4zNODTQ=="}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '461' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb database exists + Connection: + - keep-alive + ParameterSetName: + - -g -n -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:05:58.8947694Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"bb2a1cf0-176d-49a8-a904-b1a0a8c7f349","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2157' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:48 GMT + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-session-token: + - '' + x-ms-version: + - '2018-09-17' + method: GET + uri: https://cli000003.documents.azure.com/ + response: + body: + string: '{"_self":"","id":"cli000003","_rid":"cli000003.documents.azure.com","media":"//media/","addresses":"//addresses/","_dbs":"//dbs/","writableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"readableLocations":[{"name":"West + US","databaseAccountEndpoint":"https://cli000003-westus.documents.azure.com:443/"}],"enableMultipleWriteLocations":false,"userReplicationPolicy":{"asyncReplication":false,"minReplicaSetSize":3,"maxReplicasetSize":4},"userConsistencyPolicy":{"defaultConsistencyLevel":"Session"},"systemReplicationPolicy":{"minReplicaSetSize":3,"maxReplicasetSize":4},"readPolicy":{"primaryReadCoefficient":1,"secondaryReadCoefficient":1},"queryEngineConfiguration":"{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":true,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlDisableOptimizationFlags\":0,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}"}' + headers: + cache-control: + - no-store, no-cache + content-location: + - https://cliiipoyta5ddt5.documents.azure.com/ + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-databaseaccount-consumed-mb: + - '0' + x-ms-databaseaccount-provisioned-mb: + - '0' + x-ms-databaseaccount-reserved-mb: + - '0' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-max-media-storage-usage-mb: + - '2048' + x-ms-media-storage-usage-mb: + - '0' + status: + code: 200 + message: Ok +- request: + body: '{"query":"SELECT * FROM root r WHERE r.id=@id","parameters":[{"name":"@id","value":"cli4ssnsperprmw"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - '103' + Content-Type: + - application/query+json + User-Agent: + - Windows/10 Python/3.10.1 azure-cosmos/3.1.2 AZURECLI/2.40.0 + x-ms-consistency-level: + - Session + x-ms-date: + - Mon, 26 Sep 2022 17:06:49 GMT + x-ms-documentdb-isquery: + - 'true' + x-ms-documentdb-query-iscontinuationexpected: + - 'False' + x-ms-version: + - '2018-09-17' + method: POST + uri: https://cli000003-westus.documents.azure.com/dbs + response: + body: + string: '{"_rid":"","Databases":[],"_count":0}' + headers: + cache-control: + - no-store, no-cache + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:49 GMT + lsn: + - '9' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-ms-activity-id: + - b90d69e5-23a7-4704-ab06-8b6e46881596 + x-ms-cosmos-is-partition-key-delete-pending: + - 'false' + x-ms-cosmos-llsn: + - '9' + x-ms-cosmos-query-execution-info: + - '{"reverseRidEnabled":false,"reverseIndexScan":false}' + x-ms-gatewayversion: + - version=2.14.0 + x-ms-global-committed-lsn: + - '9' + x-ms-item-count: + - '0' + x-ms-last-state-change-utc: + - Fri, 23 Sep 2022 17:45:11.397 GMT + x-ms-number-of-read-regions: + - '0' + x-ms-request-charge: + - '5.58' + x-ms-request-duration-ms: + - '0.551' + x-ms-resource-quota: + - databases=1000; + x-ms-resource-usage: + - databases=0; + x-ms-schemaversion: + - '1.14' + x-ms-serviceversion: + - version=2.14.0.0 + x-ms-session-token: + - 0:-1#9 + x-ms-transport-request-id: + - '433852' + x-ms-xp-role: + - '1' + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_dts.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_dts.yaml index e92d8757664..e58bb866be6 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_dts.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_dts.yaml @@ -1,971 +1,1018 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_dts_cassandra000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001","name":"cli_test_cosmosdb_dts_cassandra000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '352' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 20 Sep 2022 07:28:09 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "kind": "GlobalDocumentDB", "properties": {"locations": - [{"locationName": "eastus", "failoverPriority": 0, "isZoneRedundant": false}], - "databaseAccountOfferType": "Standard", "capabilities": [{"name": "EnableCassandra"}], - "apiProperties": {}, "createMode": "Default"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - Content-Length: - - '291' - Content-Type: - - application/json - ParameterSetName: - - -n -g --locations --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006","name":"cli000006","location":"East - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:12.0337737Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Cassandra","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"94b50ab6-f76f-444e-923f-a80a922813d6","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000006-eastus","locationName":"East - US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000006-eastus","locationName":"East - US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000006-eastus","locationName":"East - US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000006-eastus","locationName":"East - US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableCassandra"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Invalid"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/6bd9a45a-068f-4123-ba6f-eab31fbb5f91?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '1954' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:13 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/operationResults/6bd9a45a-068f-4123-ba6f-eab31fbb5f91?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/6bd9a45a-068f-4123-ba6f-eab31fbb5f91?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:43 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/6bd9a45a-068f-4123-ba6f-eab31fbb5f91?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:29:13 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/6bd9a45a-068f-4123-ba6f-eab31fbb5f91?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:29:44 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/6bd9a45a-068f-4123-ba6f-eab31fbb5f91?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/6bd9a45a-068f-4123-ba6f-eab31fbb5f91?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:44 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/6bd9a45a-068f-4123-ba6f-eab31fbb5f91?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006","name":"cli000006","location":"East - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:38.2088207Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000006.documents.azure.com:443/","cassandraEndpoint":"https://cli000006.cassandra.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Cassandra","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"94b50ab6-f76f-444e-923f-a80a922813d6","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000006-eastus","locationName":"East - US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000006-eastus","locationName":"East - US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000006-eastus","locationName":"East - US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000006-eastus","locationName":"East - US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableCassandra"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2321' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006","name":"cli000006","location":"East - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:38.2088207Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000006.documents.azure.com:443/","cassandraEndpoint":"https://cli000006.cassandra.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Cassandra","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"94b50ab6-f76f-444e-923f-a80a922813d6","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000006-eastus","locationName":"East - US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000006-eastus","locationName":"East - US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000006-eastus","locationName":"East - US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000006-eastus","locationName":"East - US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableCassandra"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2321' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb show - Connection: - - keep-alive - ParameterSetName: - - -n -g - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006","name":"cli000006","location":"East - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:38.2088207Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000006.documents.azure.com:443/","cassandraEndpoint":"https://cli000006.cassandra.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Cassandra","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"94b50ab6-f76f-444e-923f-a80a922813d6","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000006-eastus","locationName":"East - US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000006-eastus","locationName":"East - US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000006-eastus","locationName":"East - US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000006-eastus","locationName":"East - US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableCassandra"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2321' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:15 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"source": {"component": "CosmosDBCassandra", "keyspaceName": - "cli000002", "tableName": "cli000003"}, "destination": {"component": "CosmosDBCassandra", - "keyspaceName": "cli000002", "tableName": "cli000004"}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb dts copy - Connection: - - keep-alive - Content-Length: - - '223' - Content-Type: - - application/json - ParameterSetName: - - -g --job-name --account-name --source-cassandra-table --dest-cassandra-table - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Pending","lastUpdatedUtcTime":"2022-09-20T07:31:17.5077742Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '597' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:22 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb dts show - Connection: - - keep-alive - ParameterSetName: - - -g --account-name --job-name - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Pending","lastUpdatedUtcTime":"2022-09-20T07:31:22Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '589' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:23 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb dts list - Connection: - - keep-alive - ParameterSetName: - - -g --account-name - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs?api-version=2022-02-15-preview - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Pending","lastUpdatedUtcTime":"2022-09-20T07:31:22Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}]}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '601' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:27 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb dts pause - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g --account-name --job-name - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005/pause?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Paused","lastUpdatedUtcTime":"2022-09-20T07:31:29Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '588' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:28 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb dts show - Connection: - - keep-alive - ParameterSetName: - - -g --account-name --job-name - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Paused","lastUpdatedUtcTime":"2022-09-20T07:31:29Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '588' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:29 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb dts resume - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g --account-name --job-name - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005/resume?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Pending","lastUpdatedUtcTime":"2022-09-20T07:31:31Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '589' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:31 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb dts show - Connection: - - keep-alive - ParameterSetName: - - -g --account-name --job-name - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Pending","lastUpdatedUtcTime":"2022-09-20T07:31:31Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '589' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:34 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb dts cancel - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g --account-name --job-name - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005/cancel?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Cancelled","lastUpdatedUtcTime":"2022-09-20T07:31:35Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '591' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:35 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb dts show - Connection: - - keep-alive - ParameterSetName: - - -g --account-name --job-name - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Cancelled","lastUpdatedUtcTime":"2022-09-20T07:31:35Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '591' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:36 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -version: 1 +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_dts_cassandra000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001","name":"cli_test_cosmosdb_dts_cassandra000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:34:36Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '352' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:34:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "eastus", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "capabilities": [{"name": "EnableCassandra"}], + "apiProperties": {}, "createMode": "Default"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '291' + Content-Type: + - application/json + ParameterSetName: + - -n -g --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006","name":"cli000006","location":"East + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:34:43.4412269Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Cassandra","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"f3e045e3-ee5a-4803-8d84-3a80dab47560","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000006-eastus","locationName":"East + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000006-eastus","locationName":"East + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000006-eastus","locationName":"East + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000006-eastus","locationName":"East + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableCassandra"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Invalid"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:34:43.4412269Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:34:43.4412269Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:34:43.4412269Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:34:43.4412269Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/43f9863e-c385-4906-888d-116d7c2db478?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2381' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:34:44 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/operationResults/43f9863e-c385-4906-888d-116d7c2db478?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/43f9863e-c385-4906-888d-116d7c2db478?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/43f9863e-c385-4906-888d-116d7c2db478?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/43f9863e-c385-4906-888d-116d7c2db478?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/43f9863e-c385-4906-888d-116d7c2db478?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/43f9863e-c385-4906-888d-116d7c2db478?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:37:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/43f9863e-c385-4906-888d-116d7c2db478?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:37:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/43f9863e-c385-4906-888d-116d7c2db478?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:16 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006","name":"cli000006","location":"East + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:37:29.9010369Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000006.documents.azure.com:443/","cassandraEndpoint":"https://cli000006.cassandra.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Cassandra","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"f3e045e3-ee5a-4803-8d84-3a80dab47560","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000006-eastus","locationName":"East + US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000006-eastus","locationName":"East + US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000006-eastus","locationName":"East + US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000006-eastus","locationName":"East + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableCassandra"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:37:29.9010369Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:37:29.9010369Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:37:29.9010369Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:37:29.9010369Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2748' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:16 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006","name":"cli000006","location":"East + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:37:29.9010369Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000006.documents.azure.com:443/","cassandraEndpoint":"https://cli000006.cassandra.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Cassandra","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"f3e045e3-ee5a-4803-8d84-3a80dab47560","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000006-eastus","locationName":"East + US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000006-eastus","locationName":"East + US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000006-eastus","locationName":"East + US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000006-eastus","locationName":"East + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableCassandra"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:37:29.9010369Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:37:29.9010369Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:37:29.9010369Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:37:29.9010369Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2748' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:17 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006","name":"cli000006","location":"East + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:37:29.9010369Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000006.documents.azure.com:443/","cassandraEndpoint":"https://cli000006.cassandra.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Cassandra","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"f3e045e3-ee5a-4803-8d84-3a80dab47560","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000006-eastus","locationName":"East + US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000006-eastus","locationName":"East + US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000006-eastus","locationName":"East + US","documentEndpoint":"https://cli000006-eastus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000006-eastus","locationName":"East + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableCassandra"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:37:29.9010369Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:37:29.9010369Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:37:29.9010369Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:37:29.9010369Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2748' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:17 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"source": {"component": "CosmosDBCassandra", "keyspaceName": + "cli000002", "tableName": "cli000003"}, "destination": {"component": "CosmosDBCassandra", + "keyspaceName": "cli000002", "tableName": "cli000004"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb dts copy + Connection: + - keep-alive + Content-Length: + - '223' + Content-Type: + - application/json + ParameterSetName: + - -g --job-name --account-name --source-cassandra-table --dest-cassandra-table + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Pending","lastUpdatedUtcTime":"2022-09-29T07:38:19.9747269Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '597' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:23 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb dts show + Connection: + - keep-alive + ParameterSetName: + - -g --account-name --job-name + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Pending","lastUpdatedUtcTime":"2022-09-29T07:38:22Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '589' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:25 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb dts list + Connection: + - keep-alive + ParameterSetName: + - -g --account-name + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Pending","lastUpdatedUtcTime":"2022-09-29T07:38:22Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '601' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb dts pause + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --account-name --job-name + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005/pause?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Paused","lastUpdatedUtcTime":"2022-09-29T07:38:29Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '588' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb dts show + Connection: + - keep-alive + ParameterSetName: + - -g --account-name --job-name + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Paused","lastUpdatedUtcTime":"2022-09-29T07:38:29Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '588' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb dts resume + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --account-name --job-name + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005/resume?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Pending","lastUpdatedUtcTime":"2022-09-29T07:38:33Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '589' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb dts show + Connection: + - keep-alive + ParameterSetName: + - -g --account-name --job-name + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Pending","lastUpdatedUtcTime":"2022-09-29T07:38:33Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '589' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:36 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb dts cancel + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --account-name --job-name + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005/cancel?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Cancelled","lastUpdatedUtcTime":"2022-09-29T07:38:37Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '591' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:37 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb dts show + Connection: + - keep-alive + ParameterSetName: + - -g --account-name --job-name + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_dts_cassandra000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000006/dataTransferJobs/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/dataTransferJobs","properties":{"jobName":"cli000005","status":"Cancelled","lastUpdatedUtcTime":"2022-09-29T07:38:37Z","processedCount":0,"totalCount":0,"source":{"keyspaceName":"cli000002","tableName":"cli000003","component":"CosmosDBCassandra"},"destination":{"keyspaceName":"cli000002","tableName":"cli000004","component":"CosmosDBCassandra"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '591' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:38 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_account_restore_command.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_account_restore_command.yaml index 6104dd66e61..841e05a837e 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_account_restore_command.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_account_restore_command.yaml @@ -13,12 +13,13 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_gremlin_account_restore_command000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001","name":"cli_test_cosmosdb_gremlin_account_restore_command000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001","name":"cli_test_cosmosdb_gremlin_account_restore_command000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:15:27Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -27,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:09 GMT + - Thu, 29 Sep 2022 07:15:31 GMT expires: - '-1' pragma: @@ -63,31 +64,31 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:12.9175453Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"72889734-c93c-4f7f-bd22-b0b46266d705","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:15:35.7008043Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:15:35.7008043Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:15:35.7008043Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:15:35.7008043Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:15:35.7008043Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/87eb3f97-f6e0-4f0e-931f-811b2fd1674e?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5086eb39-ba90-4e7b-b7db-01b7d490b275?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '1939' + - '2366' content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:14 GMT + - Thu, 29 Sep 2022 07:15:37 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/87eb3f97-f6e0-4f0e-931f-811b2fd1674e?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/5086eb39-ba90-4e7b-b7db-01b7d490b275?api-version=2022-08-15-preview pragma: - no-cache server: @@ -121,9 +122,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/87eb3f97-f6e0-4f0e-931f-811b2fd1674e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5086eb39-ba90-4e7b-b7db-01b7d490b275?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -135,7 +136,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:44 GMT + - Thu, 29 Sep 2022 07:16:07 GMT pragma: - no-cache server: @@ -167,9 +168,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/87eb3f97-f6e0-4f0e-931f-811b2fd1674e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5086eb39-ba90-4e7b-b7db-01b7d490b275?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -181,7 +182,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:14 GMT + - Thu, 29 Sep 2022 07:16:37 GMT pragma: - no-cache server: @@ -213,9 +214,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/87eb3f97-f6e0-4f0e-931f-811b2fd1674e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5086eb39-ba90-4e7b-b7db-01b7d490b275?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -227,7 +228,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:44 GMT + - Thu, 29 Sep 2022 07:17:07 GMT pragma: - no-cache server: @@ -259,9 +260,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/87eb3f97-f6e0-4f0e-931f-811b2fd1674e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5086eb39-ba90-4e7b-b7db-01b7d490b275?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -273,7 +274,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:14 GMT + - Thu, 29 Sep 2022 07:17:38 GMT pragma: - no-cache server: @@ -305,9 +306,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/87eb3f97-f6e0-4f0e-931f-811b2fd1674e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5086eb39-ba90-4e7b-b7db-01b7d490b275?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -319,7 +320,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:45 GMT + - Thu, 29 Sep 2022 07:18:07 GMT pragma: - no-cache server: @@ -351,9 +352,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/87eb3f97-f6e0-4f0e-931f-811b2fd1674e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5086eb39-ba90-4e7b-b7db-01b7d490b275?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -365,7 +366,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:15 GMT + - Thu, 29 Sep 2022 07:18:38 GMT pragma: - no-cache server: @@ -397,9 +398,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/87eb3f97-f6e0-4f0e-931f-811b2fd1674e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5086eb39-ba90-4e7b-b7db-01b7d490b275?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -411,7 +412,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:45 GMT + - Thu, 29 Sep 2022 07:19:07 GMT pragma: - no-cache server: @@ -443,9 +444,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/87eb3f97-f6e0-4f0e-931f-811b2fd1674e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5086eb39-ba90-4e7b-b7db-01b7d490b275?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -457,7 +458,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:15 GMT + - Thu, 29 Sep 2022 07:19:38 GMT pragma: - no-cache server: @@ -489,9 +490,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/87eb3f97-f6e0-4f0e-931f-811b2fd1674e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5086eb39-ba90-4e7b-b7db-01b7d490b275?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -503,7 +504,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:45 GMT + - Thu, 29 Sep 2022 07:20:08 GMT pragma: - no-cache server: @@ -535,9 +536,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/87eb3f97-f6e0-4f0e-931f-811b2fd1674e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5086eb39-ba90-4e7b-b7db-01b7d490b275?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -549,7 +550,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:15 GMT + - Thu, 29 Sep 2022 07:20:38 GMT pragma: - no-cache server: @@ -581,27 +582,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:39.5573585Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","gremlinEndpoint":"https://cli000003.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"72889734-c93c-4f7f-bd22-b0b46266d705","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:19:49.9120499Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","gremlinEndpoint":"https://cli000003.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:19:49.9120499Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:19:49.9120499Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:19:49.9120499Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:19:49.9120499Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2309' + - '2736' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:15 GMT + - Thu, 29 Sep 2022 07:20:38 GMT pragma: - no-cache server: @@ -633,27 +634,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:39.5573585Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","gremlinEndpoint":"https://cli000003.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"72889734-c93c-4f7f-bd22-b0b46266d705","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:19:49.9120499Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","gremlinEndpoint":"https://cli000003.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:19:49.9120499Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:19:49.9120499Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:19:49.9120499Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:19:49.9120499Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2309' + - '2736' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:16 GMT + - Thu, 29 Sep 2022 07:20:38 GMT pragma: - no-cache server: @@ -685,27 +686,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:39.5573585Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","gremlinEndpoint":"https://cli000003.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"72889734-c93c-4f7f-bd22-b0b46266d705","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:19:49.9120499Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","gremlinEndpoint":"https://cli000003.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:19:49.9120499Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:19:49.9120499Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:19:49.9120499Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:19:49.9120499Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2309' + - '2736' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:16 GMT + - Thu, 29 Sep 2022 07:20:39 GMT pragma: - no-cache server: @@ -741,15 +742,15 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/8e758984-c381-4ea4-94c4-e86b5297d33c?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/196151e9-c7ed-4df1-a238-4b23fd21c285?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -757,9 +758,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:18 GMT + - Thu, 29 Sep 2022 07:20:41 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/operationResults/8e758984-c381-4ea4-94c4-e86b5297d33c?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/operationResults/196151e9-c7ed-4df1-a238-4b23fd21c285?api-version=2022-08-15 pragma: - no-cache server: @@ -789,9 +790,9 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/8e758984-c381-4ea4-94c4-e86b5297d33c?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/196151e9-c7ed-4df1-a238-4b23fd21c285?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -803,7 +804,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:48 GMT + - Thu, 29 Sep 2022 07:21:10 GMT pragma: - no-cache server: @@ -835,12 +836,12 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000005","properties":{"resource":{"id":"cli000005","_rid":"aA5+AA==","_self":"dbs/aA5+AA==/","_etag":"\"00004209-0000-0200-0000-63296cc30000\"","_colls":"colls/","_users":"users/","_ts":1663659203}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000005","properties":{"resource":{"id":"cli000005","_rid":"81EzAA==","_self":"dbs/81EzAA==/","_etag":"\"0000b300-0000-0200-0000-6335474d0000\"","_colls":"colls/","_users":"users/","_ts":1664436045}}}' headers: cache-control: - no-store, no-cache @@ -849,7 +850,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:48 GMT + - Thu, 29 Sep 2022 07:21:11 GMT pragma: - no-cache server: @@ -888,15 +889,15 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/ba89fb22-aa75-477a-a907-58441cb25845?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/d3ddf540-e628-4c16-9fa2-fc52448a9f66?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -904,9 +905,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:50 GMT + - Thu, 29 Sep 2022 07:21:13 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002/operationResults/ba89fb22-aa75-477a-a907-58441cb25845?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002/operationResults/d3ddf540-e628-4c16-9fa2-fc52448a9f66?api-version=2022-08-15 pragma: - no-cache server: @@ -918,7 +919,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1199' status: code: 202 message: Accepted @@ -936,9 +937,9 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/ba89fb22-aa75-477a-a907-58441cb25845?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/d3ddf540-e628-4c16-9fa2-fc52448a9f66?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -950,7 +951,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:20 GMT + - Thu, 29 Sep 2022 07:21:43 GMT pragma: - no-cache server: @@ -982,12 +983,12 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"aA5+ANZO1oc=","_ts":1663659236,"_self":"dbs/aA5+AA==/colls/aA5+ANZO1oc=/","_etag":"\"00004509-0000-0200-0000-63296ce40000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"81EzAMfFaBY=","_ts":1664436078,"_self":"dbs/81EzAA==/colls/81EzAMfFaBY=/","_etag":"\"0000b600-0000-0200-0000-6335476e0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' headers: cache-control: - no-store, no-cache @@ -996,7 +997,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:20 GMT + - Thu, 29 Sep 2022 07:21:43 GMT pragma: - no-cache server: @@ -1028,15 +1029,15 @@ interactions: ParameterSetName: - --location --instance-id User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/72889734-c93c-4f7f-bd22-b0b46266d705?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7?api-version=2022-08-15-preview response: body: - string: '{"name":"72889734-c93c-4f7f-bd22-b0b46266d705","location":"East US - 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/72889734-c93c-4f7f-bd22-b0b46266d705","properties":{"accountName":"cli000003","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:32:40Z","oldestRestorableTime":"2022-09-20T07:32:40Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"4f0ede2e-9047-46c7-ac56-3e63045fa9fb","creationTime":"2022-09-20T07:32:41Z"}]}}' + string: '{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East US + 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli000003","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","oldestRestorableTime":"2022-09-29T07:19:50Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8680b861-bef3-493d-9344-27f17b06b5e3","creationTime":"2022-09-29T07:19:51Z"}]}}' headers: cache-control: - no-store, no-cache @@ -1045,7 +1046,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:21 GMT + - Thu, 29 Sep 2022 07:21:45 GMT pragma: - no-cache server: @@ -1077,144 +1078,253 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview response: body: - string: '{"value":[{"name":"257c9845-9c76-4e02-b6aa-c45df6d74351","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/257c9845-9c76-4e02-b6aa-c45df6d74351","properties":{"accountName":"cliqwlgknilbfow","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:57:56Z","oldestRestorableTime":"2022-09-20T06:57:56Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"00e3cba5-bdef-4dd4-96d4-c184fb94784f","creationTime":"2022-09-20T06:57:58Z"}]}},{"name":"d26ff24f-5217-4b0c-b52b-a6326be32c87","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/d26ff24f-5217-4b0c-b52b-a6326be32c87","properties":{"accountName":"clirie7hraznup4","apiType":"Table, - Sql","creationTime":"2022-09-20T06:58:00Z","oldestRestorableTime":"2022-09-20T06:58:00Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"43a328e8-5ccc-497d-a356-4ee4d7e306e2","creationTime":"2022-09-20T06:58:01Z"}]}},{"name":"e039d441-9698-42ba-8471-f78728e3932f","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e039d441-9698-42ba-8471-f78728e3932f","properties":{"accountName":"clixsligrhnkthm","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:07:36Z","oldestRestorableTime":"2022-09-20T07:07:36Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"b3d364b8-b3a2-428f-988a-27bb4cf0c112","creationTime":"2022-09-20T07:07:37Z"}]}},{"name":"6cbb9e3c-1fa3-4d80-85e5-6131c42811fb","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/6cbb9e3c-1fa3-4d80-85e5-6131c42811fb","properties":{"accountName":"cli2jvorduabbs6","apiType":"Table, - Sql","creationTime":"2022-09-20T07:07:41Z","oldestRestorableTime":"2022-09-20T07:07:41Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"fc8a971e-ad61-47a9-a731-4e706e0ec024","creationTime":"2022-09-20T07:07:42Z"}]}},{"name":"de173432-0f17-4f34-bbcf-111200be4f1a","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/de173432-0f17-4f34-bbcf-111200be4f1a","properties":{"accountName":"climaslmt6clahf","apiType":"Table, - Sql","creationTime":"2022-09-20T07:26:46Z","oldestRestorableTime":"2022-09-20T07:26:46Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"a6203059-530c-4847-b8dd-be2b45aadf6c","creationTime":"2022-09-20T07:26:46Z"}]}},{"name":"dfb7ab5f-d103-4498-bab0-d77e2cbbe6da","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/dfb7ab5f-d103-4498-bab0-d77e2cbbe6da","properties":{"accountName":"clihhselzsgnxci","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:26:51Z","oldestRestorableTime":"2022-09-20T07:26:51Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"6696a646-0dd5-4419-ae9e-45d0921194f7","creationTime":"2022-09-20T07:26:51Z"}]}},{"name":"e175b9a1-eeae-4331-b509-8516a500995b","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e175b9a1-eeae-4331-b509-8516a500995b","properties":{"accountName":"clia4wonnytzxku","apiType":"Table, - Sql","creationTime":"2022-09-20T07:31:06Z","oldestRestorableTime":"2022-09-20T07:31:06Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"d64e8aa5-4fae-4784-a1e8-798868eee115","creationTime":"2022-09-20T07:31:07Z"}]}},{"name":"2b567c10-cb59-41b3-b522-341b45e961fd","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/2b567c10-cb59-41b3-b522-341b45e961fd","properties":{"accountName":"cli2bdyu5ikmib7","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:31:04Z","oldestRestorableTime":"2022-09-20T07:31:04Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"63270364-1197-4702-90bd-505cd5a9c39f","creationTime":"2022-09-20T07:31:05Z"}]}},{"name":"5d4c9410-0368-4540-a6d6-2acf346d055e","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/5d4c9410-0368-4540-a6d6-2acf346d055e","properties":{"accountName":"cli4xpfpmginjkx","apiType":"MongoDB","creationTime":"2022-09-20T06:58:53Z","oldestRestorableTime":"2022-09-20T06:58:53Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"364d03ae-5e1d-4028-9d7a-899e95e3390e","creationTime":"2022-09-20T06:58:54Z"}]}},{"name":"71e6d92e-64f7-4026-9239-68fb622c1cbd","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/71e6d92e-64f7-4026-9239-68fb622c1cbd","properties":{"accountName":"cliwuke4f7ez2bm","apiType":"Table, - Sql","creationTime":"2022-09-20T06:58:51Z","oldestRestorableTime":"2022-09-20T06:58:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"869e7338-783e-4277-8d0e-0a7257853ddc","creationTime":"2022-09-20T06:58:52Z"}]}},{"name":"508132ae-8315-4f07-8c38-8806a39dfe3b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/508132ae-8315-4f07-8c38-8806a39dfe3b","properties":{"accountName":"cliatg4hovhsjun","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:58:48Z","oldestRestorableTime":"2022-09-20T06:58:48Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"03886ad8-258b-4c22-ba99-956418af8c52","creationTime":"2022-09-20T06:58:50Z"}]}},{"name":"b9b05fe1-ff67-415a-9a47-9f7c814506c0","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9b05fe1-ff67-415a-9a47-9f7c814506c0","properties":{"accountName":"cligz5iirsuhy54","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:58:34Z","oldestRestorableTime":"2022-09-20T06:58:34Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"d98d0aed-ba88-4df6-960c-48323e132a1d","creationTime":"2022-09-20T06:58:35Z"}]}},{"name":"a57e21c5-4307-47aa-a67b-708e2cf5e045","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a57e21c5-4307-47aa-a67b-708e2cf5e045","properties":{"accountName":"clijexpfpgj4xel","apiType":"Table, - Sql","creationTime":"2022-09-20T06:59:25Z","oldestRestorableTime":"2022-09-20T06:59:25Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"806c35f4-94df-432a-aa5f-9eca0ab47262","creationTime":"2022-09-20T06:59:26Z"}]}},{"name":"7ecee14c-acd0-4d2d-9227-1a9cca60f606","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7ecee14c-acd0-4d2d-9227-1a9cca60f606","properties":{"accountName":"cliqwbd7wrqol4u","apiType":"Table, - Sql","creationTime":"2022-09-20T06:59:23Z","oldestRestorableTime":"2022-09-20T06:59:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"87b06295-42cb-4aa9-a639-8f52d4412111","creationTime":"2022-09-20T06:59:24Z"}]}},{"name":"5ed10bbe-201a-4cfa-b188-08964e31a970","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/5ed10bbe-201a-4cfa-b188-08964e31a970","properties":{"accountName":"clite3mysf2h7oc","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:59:24Z","oldestRestorableTime":"2022-09-20T06:59:24Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"096e5485-f140-4786-96b9-263670bf610d","creationTime":"2022-09-20T06:59:25Z"}]}},{"name":"faddd26c-1aea-4e26-bc85-ef2851e5b1ad","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/faddd26c-1aea-4e26-bc85-ef2851e5b1ad","properties":{"accountName":"cliiwxv2f7jtutq","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:32Z","oldestRestorableTime":"2022-09-20T07:09:32Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"e93ba2dd-f14e-4eeb-8607-59a65c670a8d","creationTime":"2022-09-20T07:09:34Z"}]}},{"name":"4bf354b5-2cc6-4362-b72d-06b810e007b8","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bf354b5-2cc6-4362-b72d-06b810e007b8","properties":{"accountName":"clidszljdbpajb2","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:09:31Z","oldestRestorableTime":"2022-09-20T07:09:31Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"50942b9d-b33b-4497-86af-aebdfa536490","creationTime":"2022-09-20T07:09:33Z"}]}},{"name":"c1a89bca-1680-44c9-8368-57fab7d3ce9f","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c1a89bca-1680-44c9-8368-57fab7d3ce9f","properties":{"accountName":"cli-periodic-cljpeqrfavoc","apiType":"Sql","creationTime":"2022-09-20T07:25:27Z","oldestRestorableTime":"2022-09-20T07:25:27Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"4c07c0cc-973d-4b4a-9d66-ae2d2fa9dd94","creationTime":"2022-09-20T07:25:27Z"}]}},{"name":"bd23a72e-8c62-47c7-bd05-1ccd468ee3ad","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/bd23a72e-8c62-47c7-bd05-1ccd468ee3ad","properties":{"accountName":"clih4tsxxvdyqam","apiType":"Table, - Sql","creationTime":"2022-09-20T07:29:02Z","oldestRestorableTime":"2022-09-20T07:29:02Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"6b63f457-fcca-425f-982d-30af45f213d3","creationTime":"2022-09-20T07:29:02Z"}]}},{"name":"a6a2dbf4-3fd8-473b-9102-c2ead58486d1","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a6a2dbf4-3fd8-473b-9102-c2ead58486d1","properties":{"accountName":"clinlw2brcr45fg","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:30:02Z","oldestRestorableTime":"2022-09-20T07:30:02Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"26aa104a-a6bc-4705-856e-8029bb9567f8","creationTime":"2022-09-20T07:30:02Z"}]}},{"name":"cc49da31-13e1-4b9d-b177-bbceed113f0b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cc49da31-13e1-4b9d-b177-bbceed113f0b","properties":{"accountName":"clilm4qphwuvwrh","apiType":"Table, - Sql","creationTime":"2022-09-20T07:32:43Z","oldestRestorableTime":"2022-09-20T07:32:43Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"63d889ca-4256-4cf2-93a8-e630f6d27edc","creationTime":"2022-09-20T07:32:45Z"}]}},{"name":"72889734-c93c-4f7f-bd22-b0b46266d705","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/72889734-c93c-4f7f-bd22-b0b46266d705","properties":{"accountName":"cli000003","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:32:40Z","oldestRestorableTime":"2022-09-20T07:32:40Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"4f0ede2e-9047-46c7-ac56-3e63045fa9fb","creationTime":"2022-09-20T07:32:41Z"}]}},{"name":"9cba50f9-b777-4e28-a639-d1f2cc46a2cb","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9cba50f9-b777-4e28-a639-d1f2cc46a2cb","properties":{"accountName":"cli-continuous30-bcltzefu","apiType":"Sql","creationTime":"2022-09-20T06:56:35Z","deletionTime":"2022-09-20T06:58:55Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"b1086a3e-d45d-472c-903a-099339e66ff4","creationTime":"2022-09-20T06:56:36Z","deletionTime":"2022-09-20T06:58:55Z"}]}},{"name":"71ad3372-2c99-46e7-999b-d029cafcde99","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/71ad3372-2c99-46e7-999b-d029cafcde99","properties":{"accountName":"cliqg2buoohhxib","apiType":"Sql","creationTime":"2022-09-20T06:56:47Z","deletionTime":"2022-09-20T07:01:37Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c2acb6ce-146b-4d7e-97b5-309e0d0ba031","creationTime":"2022-09-20T06:56:48Z","deletionTime":"2022-09-20T07:01:37Z"}]}},{"name":"0d5a1375-7285-42a7-a4c8-e30c0fc346ab","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d5a1375-7285-42a7-a4c8-e30c0fc346ab","properties":{"accountName":"cli-continuous7-65osau3nh","apiType":"Sql","creationTime":"2022-09-20T07:06:15Z","deletionTime":"2022-09-20T07:08:17Z","oldestRestorableTime":"2022-09-13T07:08:17Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"871c9ba5-22c7-4c12-9861-b39d3ec2c2e0","creationTime":"2022-09-20T07:06:16Z","deletionTime":"2022-09-20T07:08:17Z"}]}},{"name":"95d6104d-75c6-46dd-8ec6-f694477bc0d6","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/95d6104d-75c6-46dd-8ec6-f694477bc0d6","properties":{"accountName":"cli-continuous30-w3te74xk","apiType":"Sql","creationTime":"2022-09-20T07:06:17Z","deletionTime":"2022-09-20T07:08:26Z","oldestRestorableTime":"2022-09-13T07:08:26Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"7338fe3b-59c9-4171-a1b1-b7422e8d8afe","creationTime":"2022-09-20T07:06:18Z","deletionTime":"2022-09-20T07:08:26Z"}]}},{"name":"508d74a3-1d19-4142-9dd6-571d66a87c41","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/508d74a3-1d19-4142-9dd6-571d66a87c41","properties":{"accountName":"cli-continuous7-7v6xqmb63","apiType":"Sql","creationTime":"2022-09-20T07:06:22Z","deletionTime":"2022-09-20T07:09:32Z","oldestRestorableTime":"2022-09-13T07:07:19Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"457b2138-f06d-4638-82b6-1073189f628b","creationTime":"2022-09-20T07:06:23Z","deletionTime":"2022-09-20T07:09:32Z"}]}},{"name":"cfe3d7a7-45bc-4877-8472-736864c9b5f9","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cfe3d7a7-45bc-4877-8472-736864c9b5f9","properties":{"accountName":"clixilzxjjied4f","apiType":"Sql","creationTime":"2022-09-20T07:06:47Z","deletionTime":"2022-09-20T07:10:46Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"ba2dc9f5-269e-4ab0-a11c-4b9e688e2303","creationTime":"2022-09-20T07:06:48Z","deletionTime":"2022-09-20T07:10:46Z"}]}},{"name":"2690cc86-3796-4d1c-899a-ea2de74efa34","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2690cc86-3796-4d1c-899a-ea2de74efa34","properties":{"accountName":"cligfkup2qadxbs","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:08:17Z","deletionTime":"2022-09-20T07:12:28Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"f937c85d-0ebb-4356-b183-81995a031870","creationTime":"2022-09-20T07:08:18Z","deletionTime":"2022-09-20T07:12:28Z"}]}},{"name":"d907fff6-bfe7-439b-b0fe-0cda508ce935","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d907fff6-bfe7-439b-b0fe-0cda508ce935","properties":{"accountName":"cli46ku46eatxsg","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:08:23Z","deletionTime":"2022-09-20T07:12:49Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c7591c48-2839-4179-b387-11a03dc21faa","creationTime":"2022-09-20T07:08:24Z","deletionTime":"2022-09-20T07:12:49Z"}]}},{"name":"00f9d479-167f-46a7-9617-da1cd54ffa64","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/00f9d479-167f-46a7-9617-da1cd54ffa64","properties":{"accountName":"clinrcj6fzstkit","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:28Z","deletionTime":"2022-09-20T07:13:47Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"3e3add00-cae4-46f3-8806-2955fae16d7b","creationTime":"2022-09-20T07:09:29Z","deletionTime":"2022-09-20T07:13:47Z"}]}},{"name":"faf3657c-1a01-4ac5-9525-e70acbef0e71","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/faf3657c-1a01-4ac5-9525-e70acbef0e71","properties":{"accountName":"clibbwbehryuf3y","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:32Z","deletionTime":"2022-09-20T07:14:19Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"cf5da2c0-4bf1-4e8b-8133-bbc845bc811d","creationTime":"2022-09-20T07:09:33Z","deletionTime":"2022-09-20T07:14:19Z"}]}},{"name":"64521b27-67b5-45fa-85d1-d2be34e4130a","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/64521b27-67b5-45fa-85d1-d2be34e4130a","properties":{"accountName":"clizng4ucknrzlj","apiType":"MongoDB","creationTime":"2022-09-20T07:09:26Z","deletionTime":"2022-09-20T07:14:48Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"92e08db9-45a8-44bd-8170-de3b8fc8210e","creationTime":"2022-09-20T07:09:27Z","deletionTime":"2022-09-20T07:14:48Z"}]}},{"name":"604b862e-8311-4252-84ec-94dc06e4adcc","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/604b862e-8311-4252-84ec-94dc06e4adcc","properties":{"accountName":"cli-continuous30-pq5j3zii","apiType":"Sql","creationTime":"2022-09-20T07:29:51Z","deletionTime":"2022-09-20T07:31:46Z","oldestRestorableTime":"2022-09-13T07:31:46Z","restorableLocations":[]}},{"name":"d9b2cd74-5d52-4332-b8cf-63763160af03","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d9b2cd74-5d52-4332-b8cf-63763160af03","properties":{"accountName":"cli-continuous7-3kpcqslhp","apiType":"Sql","creationTime":"2022-09-20T07:29:50Z","deletionTime":"2022-09-20T07:31:46Z","oldestRestorableTime":"2022-09-13T07:31:46Z","restorableLocations":[]}},{"name":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ffdc6000-b5a4-4280-8914-7358f7c59e9b","properties":{"accountName":"cli-continuous7-p6aq45s3u","apiType":"Sql","creationTime":"2022-09-20T07:30:25Z","deletionTime":"2022-09-20T07:33:16Z","oldestRestorableTime":"2022-09-13T07:31:26Z","restorableLocations":[]}},{"name":"08925518-7cca-41f1-881c-6b404c728f04","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/08925518-7cca-41f1-881c-6b404c728f04","properties":{"accountName":"cliimny6cecr4ww","apiType":"Sql","creationTime":"2022-09-20T07:30:18Z","deletionTime":"2022-09-20T07:35:19Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[]}},{"name":"2ecfd574-0338-4282-88ff-de2010f3c8b2","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2ecfd574-0338-4282-88ff-de2010f3c8b2","properties":{"accountName":"clifcwdniaybty3","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:31:51Z","deletionTime":"2022-09-20T07:36:18Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[]}},{"name":"2460855a-64f3-47f5-9476-09649a4fd15e","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2460855a-64f3-47f5-9476-09649a4fd15e","properties":{"accountName":"cli2lj5fugnlbl3","apiType":"Table, - Sql","creationTime":"2022-09-20T07:32:42Z","deletionTime":"2022-09-20T07:37:15Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[]}},{"name":"48538dd2-2769-40d9-9526-264e0a0e1dfc","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/48538dd2-2769-40d9-9526-264e0a0e1dfc","properties":{"accountName":"cliaeedca2ldu4t","apiType":"Table, - Sql","creationTime":"2022-09-20T07:32:46Z","deletionTime":"2022-09-20T07:37:19Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[]}},{"name":"63c04b24-248b-4f84-8f63-c89f8bf790e7","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/63c04b24-248b-4f84-8f63-c89f8bf790e7","properties":{"accountName":"clisao7xt2hqbu4","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:32:37Z","deletionTime":"2022-09-20T07:37:22Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[]}},{"name":"7e9f61e1-0e71-4282-9176-59df801f1512","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7e9f61e1-0e71-4282-9176-59df801f1512","properties":{"accountName":"cliw2pogy4w2xnl","apiType":"MongoDB","creationTime":"2022-09-20T07:32:43Z","deletionTime":"2022-09-20T07:37:56Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[]}},{"name":"cb60e313-4fce-4827-8b88-7b229922ba3f","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/cb60e313-4fce-4827-8b88-7b229922ba3f","properties":{"accountName":"clibfdc7nvbjcss","apiType":"MongoDB","creationTime":"2022-09-16T07:05:49Z","deletionTime":"2022-09-16T08:02:20Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"fab58a28-536e-490e-8057-e4fcbb2ce2fe","creationTime":"2022-09-16T07:05:50Z","deletionTime":"2022-09-16T08:02:20Z"}]}},{"name":"313977bf-0600-490f-bd43-cf3dbcc8acd6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/313977bf-0600-490f-bd43-cf3dbcc8acd6","properties":{"accountName":"clidu42bussweh4","apiType":"Sql","creationTime":"2022-09-16T07:03:41Z","deletionTime":"2022-09-16T22:33:00Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"bf443477-3631-4fc8-b2cf-39443b29b7fd","creationTime":"2022-09-16T07:03:43Z","deletionTime":"2022-09-16T22:33:00Z"}]}},{"name":"410ae43b-5529-4a01-ab04-ababa3b66da6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/410ae43b-5529-4a01-ab04-ababa3b66da6","properties":{"accountName":"clik5k4my5jiscc","apiType":"MongoDB","creationTime":"2022-09-16T07:05:48Z","deletionTime":"2022-09-16T22:33:01Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"3aecbccf-b953-4e18-b621-5354abb3023b","creationTime":"2022-09-16T07:05:50Z","deletionTime":"2022-09-16T22:33:01Z"}]}},{"name":"dbd5f878-e6fb-43b8-95e6-71e23c56ff2d","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dbd5f878-e6fb-43b8-95e6-71e23c56ff2d","properties":{"accountName":"dbaccount-7193","apiType":"Sql","creationTime":"2022-09-16T22:45:23Z","deletionTime":"2022-09-16T22:50:21Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"1e39a514-1472-475d-a9c8-c95f8fbc6083","creationTime":"2022-09-16T22:45:24Z","deletionTime":"2022-09-16T22:50:21Z"}]}},{"name":"8f992221-1433-4ae8-af34-c4c0e8b8be2a","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8f992221-1433-4ae8-af34-c4c0e8b8be2a","properties":{"accountName":"r-database-account-2123","apiType":"Sql","creationTime":"2022-09-16T22:54:15Z","deletionTime":"2022-09-16T22:55:13Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"13c00146-4006-4fd9-96bc-9db4a62ef07c","creationTime":"2022-09-16T22:54:16Z","deletionTime":"2022-09-16T22:55:13Z"}]}},{"name":"00e030b5-e4e6-4d1b-9fc1-92c4275ed52d","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/00e030b5-e4e6-4d1b-9fc1-92c4275ed52d","properties":{"accountName":"r-database-account-5280","apiType":"Sql","creationTime":"2022-09-16T23:05:11Z","deletionTime":"2022-09-16T23:06:10Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"063bae49-12e5-47f6-af4e-776ec0a5c368","creationTime":"2022-09-16T23:05:12Z","deletionTime":"2022-09-16T23:06:10Z"}]}},{"name":"b6ca1cd6-dad7-477d-93cb-90da1b86ff92","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ca1cd6-dad7-477d-93cb-90da1b86ff92","properties":{"accountName":"dbaccount-3711","apiType":"Sql","creationTime":"2022-09-16T23:16:39Z","deletionTime":"2022-09-16T23:21:31Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"74ac4413-8d2e-4e8a-baf3-9c2a5dfe7841","creationTime":"2022-09-16T23:16:40Z","deletionTime":"2022-09-16T23:21:31Z"}]}},{"name":"40638959-6393-4738-b2ef-7134c4f1b876","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/40638959-6393-4738-b2ef-7134c4f1b876","properties":{"accountName":"cliswrqd5krl5dz","apiType":"MongoDB","creationTime":"2022-09-19T07:07:09Z","deletionTime":"2022-09-19T08:13:36Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"cf381911-15ec-4bb9-befd-fcb968b79eb4","creationTime":"2022-09-19T07:07:10Z","deletionTime":"2022-09-19T08:13:36Z"}]}},{"name":"f31abfdd-f69b-4567-9b35-2cd0e82c54e6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f31abfdd-f69b-4567-9b35-2cd0e82c54e6","properties":{"accountName":"cli5avgifijfvao","apiType":"Sql","creationTime":"2022-09-19T07:05:33Z","deletionTime":"2022-09-19T08:13:38Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"571e5d29-d8d7-424a-8831-f03772fb3ba8","creationTime":"2022-09-19T07:05:34Z","deletionTime":"2022-09-19T08:13:38Z"}]}},{"name":"baa0e3fb-6014-44c3-b538-e233f9f21123","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/baa0e3fb-6014-44c3-b538-e233f9f21123","properties":{"accountName":"clifuwxyu6vqzpa","apiType":"MongoDB","creationTime":"2022-09-19T07:07:00Z","deletionTime":"2022-09-19T08:13:39Z","oldestRestorableTime":"2022-08-21T07:38:23Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"f219b5af-9d61-4c53-a33e-c6e9a06107eb","creationTime":"2022-09-19T07:07:01Z","deletionTime":"2022-09-19T08:13:39Z"}]}}]}' + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli000003","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","oldestRestorableTime":"2022-09-29T07:19:50Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8680b861-bef3-493d-9344-27f17b06b5e3","creationTime":"2022-09-29T07:19:51Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","oldestRestorableTime":"2022-09-29T07:25:11Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"f895d646-7338-4417-a964-c374f9a113bb","creationTime":"2022-09-29T07:25:12Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","oldestRestorableTime":"2022-09-29T07:07:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","oldestRestorableTime":"2022-09-29T07:08:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","oldestRestorableTime":"2022-09-29T07:12:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:25:46Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' headers: cache-control: - no-cache content-length: - - '33366' + - '69727' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:38:23 GMT + - Thu, 29 Sep 2022 07:25:46 GMT expires: - '-1' pragma: @@ -1264,7 +1374,6 @@ interactions: - '' - '' - '' - - '' status: code: 200 message: OK @@ -1282,12 +1391,12 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/East%20US%202/restorableDatabaseAccounts/72889734-c93c-4f7f-bd22-b0b46266d705/restorableGremlinResources?api-version=2022-02-15-preview&restoreLocation=eastus2&restoreTimestampInUtc=2022-09-20%2007%3A36%3A40%2B00%3A00 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/East%20US%202/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7/restorableGremlinResources?api-version=2022-08-15-preview&restoreLocation=eastus2&restoreTimestampInUtc=2022-09-29%2007%3A23%3A50%2B00%3A00 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/East%20US%202/restorableDatabaseAccounts/72889734-c93c-4f7f-bd22-b0b46266d705/restorableGremlinResources/cli000005","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources","name":"cli000005","databaseName":"cli000005","graphNames":["cli000002"]}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/East%20US%202/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7/restorableGremlinResources/cli000005","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources","name":"cli000005","databaseName":"cli000005","graphNames":["cli000002"]}]}' headers: cache-control: - no-store, no-cache @@ -1296,7 +1405,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:38:24 GMT + - Thu, 29 Sep 2022 07:25:47 GMT pragma: - no-cache server: @@ -1318,8 +1427,8 @@ interactions: body: '{"location": "East US 2", "kind": "GlobalDocumentDB", "properties": {"locations": [{"locationName": "eastus2", "failoverPriority": 0}], "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Restore", "restoreParameters": - {"restoreMode": "PointInTime", "restoreSource": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/72889734-c93c-4f7f-bd22-b0b46266d705", - "restoreTimestampInUtc": "2022-09-20T07:36:40.000Z"}}}' + {"restoreSource": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7", + "restoreTimestampInUtc": "2022-09-29T07:23:50.000Z", "restoreMode": "PointInTime"}}}' headers: Accept: - application/json @@ -1336,31 +1445,31 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:38:27.2073029Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"2bfa1115-512d-4771-b6ff-0b611a351a5b","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:25:50.3315994Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/72889734-c93c-4f7f-bd22-b0b46266d705","restoreTimestampInUtc":"2022-09-20T07:36:40Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","restoreTimestampInUtc":"2022-09-29T07:23:50Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:25:50.3315994Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:25:50.3315994Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:25:50.3315994Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:25:50.3315994Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '2497' + - '2904' content-type: - application/json date: - - Tue, 20 Sep 2022 07:38:29 GMT + - Thu, 29 Sep 2022 07:25:52 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview pragma: - no-cache server: @@ -1376,7 +1485,53 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb restore + Connection: + - keep-alive + ParameterSetName: + - -n -g -a --restore-timestamp --location + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:26:23 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 status: code: 200 message: Ok @@ -1394,9 +1549,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1408,7 +1563,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:38:59 GMT + - Thu, 29 Sep 2022 07:26:53 GMT pragma: - no-cache server: @@ -1440,9 +1595,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1454,7 +1609,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:39:30 GMT + - Thu, 29 Sep 2022 07:27:22 GMT pragma: - no-cache server: @@ -1486,9 +1641,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1500,7 +1655,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:39:59 GMT + - Thu, 29 Sep 2022 07:27:53 GMT pragma: - no-cache server: @@ -1532,9 +1687,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1546,7 +1701,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:40:29 GMT + - Thu, 29 Sep 2022 07:28:24 GMT pragma: - no-cache server: @@ -1578,9 +1733,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1592,7 +1747,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:41:00 GMT + - Thu, 29 Sep 2022 07:28:54 GMT pragma: - no-cache server: @@ -1624,9 +1779,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1638,7 +1793,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:41:30 GMT + - Thu, 29 Sep 2022 07:29:24 GMT pragma: - no-cache server: @@ -1670,9 +1825,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1684,7 +1839,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:42:00 GMT + - Thu, 29 Sep 2022 07:29:54 GMT pragma: - no-cache server: @@ -1716,9 +1871,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1730,7 +1885,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:42:30 GMT + - Thu, 29 Sep 2022 07:30:24 GMT pragma: - no-cache server: @@ -1762,9 +1917,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1776,7 +1931,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:43:01 GMT + - Thu, 29 Sep 2022 07:30:54 GMT pragma: - no-cache server: @@ -1808,9 +1963,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1822,7 +1977,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:43:31 GMT + - Thu, 29 Sep 2022 07:31:24 GMT pragma: - no-cache server: @@ -1854,9 +2009,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1868,7 +2023,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:44:00 GMT + - Thu, 29 Sep 2022 07:31:54 GMT pragma: - no-cache server: @@ -1900,9 +2055,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1914,7 +2069,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:44:31 GMT + - Thu, 29 Sep 2022 07:32:24 GMT pragma: - no-cache server: @@ -1946,9 +2101,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1960,7 +2115,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:45:01 GMT + - Thu, 29 Sep 2022 07:32:54 GMT pragma: - no-cache server: @@ -1992,9 +2147,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2006,7 +2161,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:45:32 GMT + - Thu, 29 Sep 2022 07:33:25 GMT pragma: - no-cache server: @@ -2038,9 +2193,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2052,7 +2207,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:46:01 GMT + - Thu, 29 Sep 2022 07:33:55 GMT pragma: - no-cache server: @@ -2084,9 +2239,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2098,7 +2253,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:46:31 GMT + - Thu, 29 Sep 2022 07:34:25 GMT pragma: - no-cache server: @@ -2130,9 +2285,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2144,7 +2299,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:02 GMT + - Thu, 29 Sep 2022 07:34:56 GMT pragma: - no-cache server: @@ -2176,9 +2331,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2190,7 +2345,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:32 GMT + - Thu, 29 Sep 2022 07:35:25 GMT pragma: - no-cache server: @@ -2222,9 +2377,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2236,7 +2391,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:48:01 GMT + - Thu, 29 Sep 2022 07:35:56 GMT pragma: - no-cache server: @@ -2268,9 +2423,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2282,7 +2437,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:48:32 GMT + - Thu, 29 Sep 2022 07:36:26 GMT pragma: - no-cache server: @@ -2314,9 +2469,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2328,7 +2483,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:49:02 GMT + - Thu, 29 Sep 2022 07:36:57 GMT pragma: - no-cache server: @@ -2360,9 +2515,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2374,7 +2529,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:49:32 GMT + - Thu, 29 Sep 2022 07:37:26 GMT pragma: - no-cache server: @@ -2406,9 +2561,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2420,7 +2575,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:50:03 GMT + - Thu, 29 Sep 2022 07:37:57 GMT pragma: - no-cache server: @@ -2452,9 +2607,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2466,7 +2621,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:50:33 GMT + - Thu, 29 Sep 2022 07:38:27 GMT pragma: - no-cache server: @@ -2498,9 +2653,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2512,7 +2667,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:51:02 GMT + - Thu, 29 Sep 2022 07:38:58 GMT pragma: - no-cache server: @@ -2544,9 +2699,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2558,7 +2713,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:51:33 GMT + - Thu, 29 Sep 2022 07:39:28 GMT pragma: - no-cache server: @@ -2590,9 +2745,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2604,7 +2759,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:52:03 GMT + - Thu, 29 Sep 2022 07:39:58 GMT pragma: - no-cache server: @@ -2636,9 +2791,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2650,7 +2805,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:52:33 GMT + - Thu, 29 Sep 2022 07:40:28 GMT pragma: - no-cache server: @@ -2682,9 +2837,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2696,7 +2851,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:53:04 GMT + - Thu, 29 Sep 2022 07:40:59 GMT pragma: - no-cache server: @@ -2728,9 +2883,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6aa7e01c-1354-4bf2-87fe-b40ef2108fdb?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7cb32d6e-3247-467f-becd-530e06e2cf8c?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -2742,7 +2897,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:53:33 GMT + - Thu, 29 Sep 2022 07:41:29 GMT pragma: - no-cache server: @@ -2774,27 +2929,27 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:52:59.6982339Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"2bfa1115-512d-4771-b6ff-0b611a351a5b","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:59.4040237Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/72889734-c93c-4f7f-bd22-b0b46266d705","restoreTimestampInUtc":"2022-09-20T07:36:40Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","restoreTimestampInUtc":"2022-09-29T07:23:50Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:59.4040237Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:59.4040237Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:59.4040237Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:59.4040237Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2633' + - '3040' content-type: - application/json date: - - Tue, 20 Sep 2022 07:53:33 GMT + - Thu, 29 Sep 2022 07:41:29 GMT pragma: - no-cache server: @@ -2826,27 +2981,27 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:52:59.6982339Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"2bfa1115-512d-4771-b6ff-0b611a351a5b","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:59.4040237Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/72889734-c93c-4f7f-bd22-b0b46266d705","restoreTimestampInUtc":"2022-09-20T07:36:40Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","restoreTimestampInUtc":"2022-09-29T07:23:50Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:59.4040237Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:59.4040237Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:59.4040237Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:59.4040237Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2633' + - '3040' content-type: - application/json date: - - Tue, 20 Sep 2022 07:53:34 GMT + - Thu, 29 Sep 2022 07:41:29 GMT pragma: - no-cache server: @@ -2878,27 +3033,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:52:59.6982339Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"2bfa1115-512d-4771-b6ff-0b611a351a5b","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:59.4040237Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/72889734-c93c-4f7f-bd22-b0b46266d705","restoreTimestampInUtc":"2022-09-20T07:36:40Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","restoreTimestampInUtc":"2022-09-29T07:23:50Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:59.4040237Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:59.4040237Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:59.4040237Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:59.4040237Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2633' + - '3040' content-type: - application/json date: - - Tue, 20 Sep 2022 07:53:34 GMT + - Thu, 29 Sep 2022 07:41:29 GMT pragma: - no-cache server: diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_account_restore_using_create.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_account_restore_using_create.yaml index 4fa554f83e4..d68dfd67d3d 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_account_restore_using_create.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_account_restore_using_create.yaml @@ -13,12 +13,13 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001","name":"cli_test_cosmosdb_gremlin_account_restore_using_create000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001","name":"cli_test_cosmosdb_gremlin_account_restore_using_create000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:36:48Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -27,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:08 GMT + - Thu, 29 Sep 2022 07:36:51 GMT expires: - '-1' pragma: @@ -63,31 +64,31 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:10.9988281Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2b567c10-cb59-41b3-b522-341b45e961fd","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:36:54.6637427Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus2","locationName":"West US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus2","locationName":"West US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:36:54.6637427Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:36:54.6637427Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:36:54.6637427Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:36:54.6637427Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/379d6a95-fa1c-4fbc-a8ef-d25d9e5e1fb8?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/615bd556-f8ea-490c-9416-9c36ccef5abd?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '1944' + - '2371' content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:13 GMT + - Thu, 29 Sep 2022 07:36:56 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/379d6a95-fa1c-4fbc-a8ef-d25d9e5e1fb8?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/615bd556-f8ea-490c-9416-9c36ccef5abd?api-version=2022-08-15-preview pragma: - no-cache server: @@ -121,9 +122,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/379d6a95-fa1c-4fbc-a8ef-d25d9e5e1fb8?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/615bd556-f8ea-490c-9416-9c36ccef5abd?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -135,7 +136,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:44 GMT + - Thu, 29 Sep 2022 07:37:27 GMT pragma: - no-cache server: @@ -167,9 +168,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/379d6a95-fa1c-4fbc-a8ef-d25d9e5e1fb8?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/615bd556-f8ea-490c-9416-9c36ccef5abd?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -181,7 +182,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:13 GMT + - Thu, 29 Sep 2022 07:37:57 GMT pragma: - no-cache server: @@ -213,9 +214,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/379d6a95-fa1c-4fbc-a8ef-d25d9e5e1fb8?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/615bd556-f8ea-490c-9416-9c36ccef5abd?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -227,7 +228,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:44 GMT + - Thu, 29 Sep 2022 07:38:27 GMT pragma: - no-cache server: @@ -259,9 +260,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/379d6a95-fa1c-4fbc-a8ef-d25d9e5e1fb8?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/615bd556-f8ea-490c-9416-9c36ccef5abd?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -273,7 +274,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:13 GMT + - Thu, 29 Sep 2022 07:38:57 GMT pragma: - no-cache server: @@ -305,9 +306,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/379d6a95-fa1c-4fbc-a8ef-d25d9e5e1fb8?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/615bd556-f8ea-490c-9416-9c36ccef5abd?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -319,7 +320,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:43 GMT + - Thu, 29 Sep 2022 07:39:28 GMT pragma: - no-cache server: @@ -351,9 +352,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/379d6a95-fa1c-4fbc-a8ef-d25d9e5e1fb8?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/615bd556-f8ea-490c-9416-9c36ccef5abd?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -365,7 +366,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:13 GMT + - Thu, 29 Sep 2022 07:39:57 GMT pragma: - no-cache server: @@ -397,9 +398,101 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/379d6a95-fa1c-4fbc-a8ef-d25d9e5e1fb8?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/615bd556-f8ea-490c-9416-9c36ccef5abd?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:40:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/615bd556-f8ea-490c-9416-9c36ccef5abd?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:40:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/615bd556-f8ea-490c-9416-9c36ccef5abd?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -411,7 +504,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:44 GMT + - Thu, 29 Sep 2022 07:41:28 GMT pragma: - no-cache server: @@ -443,27 +536,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:31:03.8094219Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","gremlinEndpoint":"https://cli000003.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2b567c10-cb59-41b3-b522-341b45e961fd","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:50.6954896Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","gremlinEndpoint":"https://cli000003.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:50.6954896Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:50.6954896Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:50.6954896Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:50.6954896Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2314' + - '2741' content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:44 GMT + - Thu, 29 Sep 2022 07:41:28 GMT pragma: - no-cache server: @@ -495,27 +588,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:31:03.8094219Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","gremlinEndpoint":"https://cli000003.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2b567c10-cb59-41b3-b522-341b45e961fd","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:50.6954896Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","gremlinEndpoint":"https://cli000003.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:50.6954896Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:50.6954896Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:50.6954896Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:50.6954896Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2314' + - '2741' content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:44 GMT + - Thu, 29 Sep 2022 07:41:28 GMT pragma: - no-cache server: @@ -547,27 +640,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:31:03.8094219Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","gremlinEndpoint":"https://cli000003.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2b567c10-cb59-41b3-b522-341b45e961fd","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:50.6954896Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","gremlinEndpoint":"https://cli000003.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:50.6954896Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:50.6954896Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:50.6954896Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:50.6954896Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2314' + - '2741' content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:45 GMT + - Thu, 29 Sep 2022 07:41:29 GMT pragma: - no-cache server: @@ -603,15 +696,15 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/2125e44b-47bb-4a09-af0d-938dba859738?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/0384f3ee-bfb9-4587-b059-45e38ed2c427?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -619,9 +712,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:46 GMT + - Thu, 29 Sep 2022 07:41:30 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/operationResults/2125e44b-47bb-4a09-af0d-938dba859738?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/operationResults/0384f3ee-bfb9-4587-b059-45e38ed2c427?api-version=2022-08-15 pragma: - no-cache server: @@ -633,7 +726,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 202 message: Accepted @@ -651,9 +744,9 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/2125e44b-47bb-4a09-af0d-938dba859738?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/0384f3ee-bfb9-4587-b059-45e38ed2c427?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -665,7 +758,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:15 GMT + - Thu, 29 Sep 2022 07:42:00 GMT pragma: - no-cache server: @@ -697,12 +790,12 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000005","properties":{"resource":{"id":"cli000005","_rid":"yt9dAA==","_self":"dbs/yt9dAA==/","_etag":"\"0000b739-0000-0800-0000-63296c670000\"","_colls":"colls/","_users":"users/","_ts":1663659111}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000005","properties":{"resource":{"id":"cli000005","_rid":"sS0rAA==","_self":"dbs/sS0rAA==/","_etag":"\"0000af62-0000-0800-0000-63354c2f0000\"","_colls":"colls/","_users":"users/","_ts":1664437295}}}' headers: cache-control: - no-store, no-cache @@ -711,7 +804,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:16 GMT + - Thu, 29 Sep 2022 07:42:00 GMT pragma: - no-cache server: @@ -750,15 +843,15 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/6c2958b8-0526-4bf2-b0b8-af06ef61d4fc?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/6e6aaf92-0c4f-4b99-afcb-ba47d1ab1343?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -766,9 +859,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:17 GMT + - Thu, 29 Sep 2022 07:42:02 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002/operationResults/6c2958b8-0526-4bf2-b0b8-af06ef61d4fc?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002/operationResults/6e6aaf92-0c4f-4b99-afcb-ba47d1ab1343?api-version=2022-08-15 pragma: - no-cache server: @@ -798,9 +891,9 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/6c2958b8-0526-4bf2-b0b8-af06ef61d4fc?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/6e6aaf92-0c4f-4b99-afcb-ba47d1ab1343?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -812,7 +905,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:47 GMT + - Thu, 29 Sep 2022 07:42:32 GMT pragma: - no-cache server: @@ -844,12 +937,12 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"yt9dAMpRGwo=","_ts":1663659146,"_self":"dbs/yt9dAA==/colls/yt9dAMpRGwo=/","_etag":"\"0000ba39-0000-0800-0000-63296c8a0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/gremlinDatabases/cli000005/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"sS0rANaxYXw=","_ts":1664437330,"_self":"dbs/sS0rAA==/colls/sS0rANaxYXw=/","_etag":"\"0000b262-0000-0800-0000-63354c520000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' headers: cache-control: - no-store, no-cache @@ -858,7 +951,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:48 GMT + - Thu, 29 Sep 2022 07:42:33 GMT pragma: - no-cache server: @@ -888,151 +981,263 @@ interactions: Connection: - keep-alive User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview response: body: - string: '{"value":[{"name":"257c9845-9c76-4e02-b6aa-c45df6d74351","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/257c9845-9c76-4e02-b6aa-c45df6d74351","properties":{"accountName":"cliqwlgknilbfow","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:57:56Z","oldestRestorableTime":"2022-09-20T06:57:56Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"00e3cba5-bdef-4dd4-96d4-c184fb94784f","creationTime":"2022-09-20T06:57:58Z"}]}},{"name":"d26ff24f-5217-4b0c-b52b-a6326be32c87","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/d26ff24f-5217-4b0c-b52b-a6326be32c87","properties":{"accountName":"clirie7hraznup4","apiType":"Table, - Sql","creationTime":"2022-09-20T06:58:00Z","oldestRestorableTime":"2022-09-20T06:58:00Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"43a328e8-5ccc-497d-a356-4ee4d7e306e2","creationTime":"2022-09-20T06:58:01Z"}]}},{"name":"e039d441-9698-42ba-8471-f78728e3932f","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e039d441-9698-42ba-8471-f78728e3932f","properties":{"accountName":"clixsligrhnkthm","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:07:36Z","oldestRestorableTime":"2022-09-20T07:07:36Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"b3d364b8-b3a2-428f-988a-27bb4cf0c112","creationTime":"2022-09-20T07:07:37Z"}]}},{"name":"6cbb9e3c-1fa3-4d80-85e5-6131c42811fb","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/6cbb9e3c-1fa3-4d80-85e5-6131c42811fb","properties":{"accountName":"cli2jvorduabbs6","apiType":"Table, - Sql","creationTime":"2022-09-20T07:07:41Z","oldestRestorableTime":"2022-09-20T07:07:41Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"fc8a971e-ad61-47a9-a731-4e706e0ec024","creationTime":"2022-09-20T07:07:42Z"}]}},{"name":"de173432-0f17-4f34-bbcf-111200be4f1a","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/de173432-0f17-4f34-bbcf-111200be4f1a","properties":{"accountName":"climaslmt6clahf","apiType":"Table, - Sql","creationTime":"2022-09-20T07:26:46Z","oldestRestorableTime":"2022-09-20T07:26:46Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"a6203059-530c-4847-b8dd-be2b45aadf6c","creationTime":"2022-09-20T07:26:46Z"}]}},{"name":"dfb7ab5f-d103-4498-bab0-d77e2cbbe6da","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/dfb7ab5f-d103-4498-bab0-d77e2cbbe6da","properties":{"accountName":"clihhselzsgnxci","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:26:51Z","oldestRestorableTime":"2022-09-20T07:26:51Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"6696a646-0dd5-4419-ae9e-45d0921194f7","creationTime":"2022-09-20T07:26:51Z"}]}},{"name":"e175b9a1-eeae-4331-b509-8516a500995b","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e175b9a1-eeae-4331-b509-8516a500995b","properties":{"accountName":"clia4wonnytzxku","apiType":"Table, - Sql","creationTime":"2022-09-20T07:31:06Z","oldestRestorableTime":"2022-09-20T07:31:06Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"d64e8aa5-4fae-4784-a1e8-798868eee115","creationTime":"2022-09-20T07:31:07Z"}]}},{"name":"2b567c10-cb59-41b3-b522-341b45e961fd","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/2b567c10-cb59-41b3-b522-341b45e961fd","properties":{"accountName":"cli000003","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:31:04Z","oldestRestorableTime":"2022-09-20T07:31:04Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"63270364-1197-4702-90bd-505cd5a9c39f","creationTime":"2022-09-20T07:31:05Z"}]}},{"name":"5d4c9410-0368-4540-a6d6-2acf346d055e","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/5d4c9410-0368-4540-a6d6-2acf346d055e","properties":{"accountName":"cli4xpfpmginjkx","apiType":"MongoDB","creationTime":"2022-09-20T06:58:53Z","oldestRestorableTime":"2022-09-20T06:58:53Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"364d03ae-5e1d-4028-9d7a-899e95e3390e","creationTime":"2022-09-20T06:58:54Z"}]}},{"name":"71e6d92e-64f7-4026-9239-68fb622c1cbd","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/71e6d92e-64f7-4026-9239-68fb622c1cbd","properties":{"accountName":"cliwuke4f7ez2bm","apiType":"Table, - Sql","creationTime":"2022-09-20T06:58:51Z","oldestRestorableTime":"2022-09-20T06:58:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"869e7338-783e-4277-8d0e-0a7257853ddc","creationTime":"2022-09-20T06:58:52Z"}]}},{"name":"508132ae-8315-4f07-8c38-8806a39dfe3b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/508132ae-8315-4f07-8c38-8806a39dfe3b","properties":{"accountName":"cliatg4hovhsjun","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:58:48Z","oldestRestorableTime":"2022-09-20T06:58:48Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"03886ad8-258b-4c22-ba99-956418af8c52","creationTime":"2022-09-20T06:58:50Z"}]}},{"name":"b9b05fe1-ff67-415a-9a47-9f7c814506c0","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9b05fe1-ff67-415a-9a47-9f7c814506c0","properties":{"accountName":"cligz5iirsuhy54","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:58:34Z","oldestRestorableTime":"2022-09-20T06:58:34Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"d98d0aed-ba88-4df6-960c-48323e132a1d","creationTime":"2022-09-20T06:58:35Z"}]}},{"name":"a57e21c5-4307-47aa-a67b-708e2cf5e045","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a57e21c5-4307-47aa-a67b-708e2cf5e045","properties":{"accountName":"clijexpfpgj4xel","apiType":"Table, - Sql","creationTime":"2022-09-20T06:59:25Z","oldestRestorableTime":"2022-09-20T06:59:25Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"806c35f4-94df-432a-aa5f-9eca0ab47262","creationTime":"2022-09-20T06:59:26Z"}]}},{"name":"7ecee14c-acd0-4d2d-9227-1a9cca60f606","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7ecee14c-acd0-4d2d-9227-1a9cca60f606","properties":{"accountName":"cliqwbd7wrqol4u","apiType":"Table, - Sql","creationTime":"2022-09-20T06:59:23Z","oldestRestorableTime":"2022-09-20T06:59:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"87b06295-42cb-4aa9-a639-8f52d4412111","creationTime":"2022-09-20T06:59:24Z"}]}},{"name":"5ed10bbe-201a-4cfa-b188-08964e31a970","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/5ed10bbe-201a-4cfa-b188-08964e31a970","properties":{"accountName":"clite3mysf2h7oc","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:59:24Z","oldestRestorableTime":"2022-09-20T06:59:24Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"096e5485-f140-4786-96b9-263670bf610d","creationTime":"2022-09-20T06:59:25Z"}]}},{"name":"faddd26c-1aea-4e26-bc85-ef2851e5b1ad","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/faddd26c-1aea-4e26-bc85-ef2851e5b1ad","properties":{"accountName":"cliiwxv2f7jtutq","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:32Z","oldestRestorableTime":"2022-09-20T07:09:32Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"e93ba2dd-f14e-4eeb-8607-59a65c670a8d","creationTime":"2022-09-20T07:09:34Z"}]}},{"name":"4bf354b5-2cc6-4362-b72d-06b810e007b8","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bf354b5-2cc6-4362-b72d-06b810e007b8","properties":{"accountName":"clidszljdbpajb2","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:09:31Z","oldestRestorableTime":"2022-09-20T07:09:31Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"50942b9d-b33b-4497-86af-aebdfa536490","creationTime":"2022-09-20T07:09:33Z"}]}},{"name":"c1a89bca-1680-44c9-8368-57fab7d3ce9f","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c1a89bca-1680-44c9-8368-57fab7d3ce9f","properties":{"accountName":"cli-periodic-cljpeqrfavoc","apiType":"Sql","creationTime":"2022-09-20T07:25:27Z","oldestRestorableTime":"2022-09-20T07:25:27Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"4c07c0cc-973d-4b4a-9d66-ae2d2fa9dd94","creationTime":"2022-09-20T07:25:27Z"}]}},{"name":"bd23a72e-8c62-47c7-bd05-1ccd468ee3ad","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/bd23a72e-8c62-47c7-bd05-1ccd468ee3ad","properties":{"accountName":"clih4tsxxvdyqam","apiType":"Table, - Sql","creationTime":"2022-09-20T07:29:02Z","oldestRestorableTime":"2022-09-20T07:29:02Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"6b63f457-fcca-425f-982d-30af45f213d3","creationTime":"2022-09-20T07:29:02Z"}]}},{"name":"a6a2dbf4-3fd8-473b-9102-c2ead58486d1","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a6a2dbf4-3fd8-473b-9102-c2ead58486d1","properties":{"accountName":"clinlw2brcr45fg","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:30:02Z","oldestRestorableTime":"2022-09-20T07:30:02Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"26aa104a-a6bc-4705-856e-8029bb9567f8","creationTime":"2022-09-20T07:30:02Z"}]}},{"name":"7e9f61e1-0e71-4282-9176-59df801f1512","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7e9f61e1-0e71-4282-9176-59df801f1512","properties":{"accountName":"cliw2pogy4w2xnl","apiType":"MongoDB","creationTime":"2022-09-20T07:32:43Z","oldestRestorableTime":"2022-09-20T07:32:43Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"1674c291-0240-453e-afbf-94ee617ff818","creationTime":"2022-09-20T07:32:45Z"}]}},{"name":"63c04b24-248b-4f84-8f63-c89f8bf790e7","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/63c04b24-248b-4f84-8f63-c89f8bf790e7","properties":{"accountName":"clisao7xt2hqbu4","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:32:37Z","oldestRestorableTime":"2022-09-20T07:32:37Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"5210eb4c-2dde-4397-9c7e-3b035c44e325","creationTime":"2022-09-20T07:32:38Z"}]}},{"name":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ffdc6000-b5a4-4280-8914-7358f7c59e9b","properties":{"accountName":"cli-continuous7-p6aq45s3u","apiType":"Sql","creationTime":"2022-09-20T07:30:25Z","oldestRestorableTime":"2022-09-20T07:30:25Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c5b358c6-b898-46d9-a764-153b137004ce","creationTime":"2022-09-20T07:30:26Z"}]}},{"name":"2ecfd574-0338-4282-88ff-de2010f3c8b2","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2ecfd574-0338-4282-88ff-de2010f3c8b2","properties":{"accountName":"clifcwdniaybty3","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:31:51Z","oldestRestorableTime":"2022-09-20T07:31:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"1feb0106-d878-470e-99e7-244b72479a6d","creationTime":"2022-09-20T07:31:52Z"}]}},{"name":"cc49da31-13e1-4b9d-b177-bbceed113f0b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cc49da31-13e1-4b9d-b177-bbceed113f0b","properties":{"accountName":"clilm4qphwuvwrh","apiType":"Table, - Sql","creationTime":"2022-09-20T07:32:43Z","oldestRestorableTime":"2022-09-20T07:32:43Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"63d889ca-4256-4cf2-93a8-e630f6d27edc","creationTime":"2022-09-20T07:32:45Z"}]}},{"name":"08925518-7cca-41f1-881c-6b404c728f04","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/08925518-7cca-41f1-881c-6b404c728f04","properties":{"accountName":"cliimny6cecr4ww","apiType":"Sql","creationTime":"2022-09-20T07:30:18Z","oldestRestorableTime":"2022-09-20T07:30:18Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"e0b60541-9ee3-44c5-b9c0-e951c6f150c0","creationTime":"2022-09-20T07:30:19Z"}]}},{"name":"2460855a-64f3-47f5-9476-09649a4fd15e","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2460855a-64f3-47f5-9476-09649a4fd15e","properties":{"accountName":"cli2lj5fugnlbl3","apiType":"Table, - Sql","creationTime":"2022-09-20T07:32:42Z","oldestRestorableTime":"2022-09-20T07:32:42Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"a462c3ad-77db-49ad-803f-3e54ca38b6f6","creationTime":"2022-09-20T07:32:43Z"}]}},{"name":"72889734-c93c-4f7f-bd22-b0b46266d705","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/72889734-c93c-4f7f-bd22-b0b46266d705","properties":{"accountName":"clipylc4ofzmakx","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:32:40Z","oldestRestorableTime":"2022-09-20T07:32:40Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"4f0ede2e-9047-46c7-ac56-3e63045fa9fb","creationTime":"2022-09-20T07:32:41Z"}]}},{"name":"48538dd2-2769-40d9-9526-264e0a0e1dfc","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/48538dd2-2769-40d9-9526-264e0a0e1dfc","properties":{"accountName":"cliaeedca2ldu4t","apiType":"Table, - Sql","creationTime":"2022-09-20T07:32:46Z","oldestRestorableTime":"2022-09-20T07:32:46Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"99ab9d7b-d344-4a0b-88e0-81965bb7617d","creationTime":"2022-09-20T07:32:47Z"}]}},{"name":"9cba50f9-b777-4e28-a639-d1f2cc46a2cb","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9cba50f9-b777-4e28-a639-d1f2cc46a2cb","properties":{"accountName":"cli-continuous30-bcltzefu","apiType":"Sql","creationTime":"2022-09-20T06:56:35Z","deletionTime":"2022-09-20T06:58:55Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"b1086a3e-d45d-472c-903a-099339e66ff4","creationTime":"2022-09-20T06:56:36Z","deletionTime":"2022-09-20T06:58:55Z"}]}},{"name":"71ad3372-2c99-46e7-999b-d029cafcde99","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/71ad3372-2c99-46e7-999b-d029cafcde99","properties":{"accountName":"cliqg2buoohhxib","apiType":"Sql","creationTime":"2022-09-20T06:56:47Z","deletionTime":"2022-09-20T07:01:37Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c2acb6ce-146b-4d7e-97b5-309e0d0ba031","creationTime":"2022-09-20T06:56:48Z","deletionTime":"2022-09-20T07:01:37Z"}]}},{"name":"0d5a1375-7285-42a7-a4c8-e30c0fc346ab","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d5a1375-7285-42a7-a4c8-e30c0fc346ab","properties":{"accountName":"cli-continuous7-65osau3nh","apiType":"Sql","creationTime":"2022-09-20T07:06:15Z","deletionTime":"2022-09-20T07:08:17Z","oldestRestorableTime":"2022-09-13T07:08:17Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"871c9ba5-22c7-4c12-9861-b39d3ec2c2e0","creationTime":"2022-09-20T07:06:16Z","deletionTime":"2022-09-20T07:08:17Z"}]}},{"name":"95d6104d-75c6-46dd-8ec6-f694477bc0d6","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/95d6104d-75c6-46dd-8ec6-f694477bc0d6","properties":{"accountName":"cli-continuous30-w3te74xk","apiType":"Sql","creationTime":"2022-09-20T07:06:17Z","deletionTime":"2022-09-20T07:08:26Z","oldestRestorableTime":"2022-09-13T07:08:26Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"7338fe3b-59c9-4171-a1b1-b7422e8d8afe","creationTime":"2022-09-20T07:06:18Z","deletionTime":"2022-09-20T07:08:26Z"}]}},{"name":"508d74a3-1d19-4142-9dd6-571d66a87c41","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/508d74a3-1d19-4142-9dd6-571d66a87c41","properties":{"accountName":"cli-continuous7-7v6xqmb63","apiType":"Sql","creationTime":"2022-09-20T07:06:22Z","deletionTime":"2022-09-20T07:09:32Z","oldestRestorableTime":"2022-09-13T07:07:19Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"457b2138-f06d-4638-82b6-1073189f628b","creationTime":"2022-09-20T07:06:23Z","deletionTime":"2022-09-20T07:09:32Z"}]}},{"name":"cfe3d7a7-45bc-4877-8472-736864c9b5f9","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cfe3d7a7-45bc-4877-8472-736864c9b5f9","properties":{"accountName":"clixilzxjjied4f","apiType":"Sql","creationTime":"2022-09-20T07:06:47Z","deletionTime":"2022-09-20T07:10:46Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"ba2dc9f5-269e-4ab0-a11c-4b9e688e2303","creationTime":"2022-09-20T07:06:48Z","deletionTime":"2022-09-20T07:10:46Z"}]}},{"name":"2690cc86-3796-4d1c-899a-ea2de74efa34","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2690cc86-3796-4d1c-899a-ea2de74efa34","properties":{"accountName":"cligfkup2qadxbs","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:08:17Z","deletionTime":"2022-09-20T07:12:28Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"f937c85d-0ebb-4356-b183-81995a031870","creationTime":"2022-09-20T07:08:18Z","deletionTime":"2022-09-20T07:12:28Z"}]}},{"name":"d907fff6-bfe7-439b-b0fe-0cda508ce935","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d907fff6-bfe7-439b-b0fe-0cda508ce935","properties":{"accountName":"cli46ku46eatxsg","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:08:23Z","deletionTime":"2022-09-20T07:12:49Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c7591c48-2839-4179-b387-11a03dc21faa","creationTime":"2022-09-20T07:08:24Z","deletionTime":"2022-09-20T07:12:49Z"}]}},{"name":"00f9d479-167f-46a7-9617-da1cd54ffa64","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/00f9d479-167f-46a7-9617-da1cd54ffa64","properties":{"accountName":"clinrcj6fzstkit","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:28Z","deletionTime":"2022-09-20T07:13:47Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"3e3add00-cae4-46f3-8806-2955fae16d7b","creationTime":"2022-09-20T07:09:29Z","deletionTime":"2022-09-20T07:13:47Z"}]}},{"name":"faf3657c-1a01-4ac5-9525-e70acbef0e71","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/faf3657c-1a01-4ac5-9525-e70acbef0e71","properties":{"accountName":"clibbwbehryuf3y","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:32Z","deletionTime":"2022-09-20T07:14:19Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"cf5da2c0-4bf1-4e8b-8133-bbc845bc811d","creationTime":"2022-09-20T07:09:33Z","deletionTime":"2022-09-20T07:14:19Z"}]}},{"name":"64521b27-67b5-45fa-85d1-d2be34e4130a","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/64521b27-67b5-45fa-85d1-d2be34e4130a","properties":{"accountName":"clizng4ucknrzlj","apiType":"MongoDB","creationTime":"2022-09-20T07:09:26Z","deletionTime":"2022-09-20T07:14:48Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"92e08db9-45a8-44bd-8170-de3b8fc8210e","creationTime":"2022-09-20T07:09:27Z","deletionTime":"2022-09-20T07:14:48Z"}]}},{"name":"604b862e-8311-4252-84ec-94dc06e4adcc","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/604b862e-8311-4252-84ec-94dc06e4adcc","properties":{"accountName":"cli-continuous30-pq5j3zii","apiType":"Sql","creationTime":"2022-09-20T07:29:51Z","deletionTime":"2022-09-20T07:31:46Z","oldestRestorableTime":"2022-09-13T07:31:46Z","restorableLocations":[]}},{"name":"d9b2cd74-5d52-4332-b8cf-63763160af03","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d9b2cd74-5d52-4332-b8cf-63763160af03","properties":{"accountName":"cli-continuous7-3kpcqslhp","apiType":"Sql","creationTime":"2022-09-20T07:29:50Z","deletionTime":"2022-09-20T07:31:46Z","oldestRestorableTime":"2022-09-13T07:31:46Z","restorableLocations":[]}},{"name":"cb60e313-4fce-4827-8b88-7b229922ba3f","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/cb60e313-4fce-4827-8b88-7b229922ba3f","properties":{"accountName":"clibfdc7nvbjcss","apiType":"MongoDB","creationTime":"2022-09-16T07:05:49Z","deletionTime":"2022-09-16T08:02:20Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"fab58a28-536e-490e-8057-e4fcbb2ce2fe","creationTime":"2022-09-16T07:05:50Z","deletionTime":"2022-09-16T08:02:20Z"}]}},{"name":"313977bf-0600-490f-bd43-cf3dbcc8acd6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/313977bf-0600-490f-bd43-cf3dbcc8acd6","properties":{"accountName":"clidu42bussweh4","apiType":"Sql","creationTime":"2022-09-16T07:03:41Z","deletionTime":"2022-09-16T22:33:00Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"bf443477-3631-4fc8-b2cf-39443b29b7fd","creationTime":"2022-09-16T07:03:43Z","deletionTime":"2022-09-16T22:33:00Z"}]}},{"name":"410ae43b-5529-4a01-ab04-ababa3b66da6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/410ae43b-5529-4a01-ab04-ababa3b66da6","properties":{"accountName":"clik5k4my5jiscc","apiType":"MongoDB","creationTime":"2022-09-16T07:05:48Z","deletionTime":"2022-09-16T22:33:01Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"3aecbccf-b953-4e18-b621-5354abb3023b","creationTime":"2022-09-16T07:05:50Z","deletionTime":"2022-09-16T22:33:01Z"}]}},{"name":"dbd5f878-e6fb-43b8-95e6-71e23c56ff2d","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dbd5f878-e6fb-43b8-95e6-71e23c56ff2d","properties":{"accountName":"dbaccount-7193","apiType":"Sql","creationTime":"2022-09-16T22:45:23Z","deletionTime":"2022-09-16T22:50:21Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"1e39a514-1472-475d-a9c8-c95f8fbc6083","creationTime":"2022-09-16T22:45:24Z","deletionTime":"2022-09-16T22:50:21Z"}]}},{"name":"8f992221-1433-4ae8-af34-c4c0e8b8be2a","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8f992221-1433-4ae8-af34-c4c0e8b8be2a","properties":{"accountName":"r-database-account-2123","apiType":"Sql","creationTime":"2022-09-16T22:54:15Z","deletionTime":"2022-09-16T22:55:13Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"13c00146-4006-4fd9-96bc-9db4a62ef07c","creationTime":"2022-09-16T22:54:16Z","deletionTime":"2022-09-16T22:55:13Z"}]}},{"name":"00e030b5-e4e6-4d1b-9fc1-92c4275ed52d","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/00e030b5-e4e6-4d1b-9fc1-92c4275ed52d","properties":{"accountName":"r-database-account-5280","apiType":"Sql","creationTime":"2022-09-16T23:05:11Z","deletionTime":"2022-09-16T23:06:10Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"063bae49-12e5-47f6-af4e-776ec0a5c368","creationTime":"2022-09-16T23:05:12Z","deletionTime":"2022-09-16T23:06:10Z"}]}},{"name":"b6ca1cd6-dad7-477d-93cb-90da1b86ff92","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ca1cd6-dad7-477d-93cb-90da1b86ff92","properties":{"accountName":"dbaccount-3711","apiType":"Sql","creationTime":"2022-09-16T23:16:39Z","deletionTime":"2022-09-16T23:21:31Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"74ac4413-8d2e-4e8a-baf3-9c2a5dfe7841","creationTime":"2022-09-16T23:16:40Z","deletionTime":"2022-09-16T23:21:31Z"}]}},{"name":"40638959-6393-4738-b2ef-7134c4f1b876","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/40638959-6393-4738-b2ef-7134c4f1b876","properties":{"accountName":"cliswrqd5krl5dz","apiType":"MongoDB","creationTime":"2022-09-19T07:07:09Z","deletionTime":"2022-09-19T08:13:36Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"cf381911-15ec-4bb9-befd-fcb968b79eb4","creationTime":"2022-09-19T07:07:10Z","deletionTime":"2022-09-19T08:13:36Z"}]}},{"name":"f31abfdd-f69b-4567-9b35-2cd0e82c54e6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f31abfdd-f69b-4567-9b35-2cd0e82c54e6","properties":{"accountName":"cli5avgifijfvao","apiType":"Sql","creationTime":"2022-09-19T07:05:33Z","deletionTime":"2022-09-19T08:13:38Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"571e5d29-d8d7-424a-8831-f03772fb3ba8","creationTime":"2022-09-19T07:05:34Z","deletionTime":"2022-09-19T08:13:38Z"}]}},{"name":"baa0e3fb-6014-44c3-b538-e233f9f21123","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/baa0e3fb-6014-44c3-b538-e233f9f21123","properties":{"accountName":"clifuwxyu6vqzpa","apiType":"MongoDB","creationTime":"2022-09-19T07:07:00Z","deletionTime":"2022-09-19T08:13:39Z","oldestRestorableTime":"2022-08-21T07:32:50Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"f219b5af-9d61-4c53-a33e-c6e9a06107eb","creationTime":"2022-09-19T07:07:01Z","deletionTime":"2022-09-19T08:13:39Z"}]}}]}' + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","properties":{"accountName":"cli000003","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:40:51Z","oldestRestorableTime":"2022-09-29T07:40:51Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"e2ff0f1d-8209-4d81-a72a-b6942e344110","creationTime":"2022-09-29T07:40:52Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"9ea6fb52-a251-464b-aace-42338f28d639","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9ea6fb52-a251-464b-aace-42338f28d639","properties":{"accountName":"clijhukzjokpayf","apiType":"Sql","creationTime":"2022-09-29T07:39:00Z","oldestRestorableTime":"2022-09-29T07:39:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"84631b94-7800-414a-be43-353118e84b4b","creationTime":"2022-09-29T07:39:01Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","deletionTime":"2022-09-29T07:29:11Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"f895d646-7338-4417-a964-c374f9a113bb","creationTime":"2022-09-29T07:25:12Z","deletionTime":"2022-09-29T07:29:11Z"}]}},{"name":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2b7ef41c-de96-4d76-8959-58fb40b3f4fc","properties":{"accountName":"cli2nmd2acsdvq2","apiType":"MongoDB","creationTime":"2022-09-29T07:32:57Z","deletionTime":"2022-09-29T07:37:10Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[]}},{"name":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","properties":{"accountName":"cli5d7r5woval7l","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:41:00Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[]}},{"name":"9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","properties":{"accountName":"cliabmdaxkqpzo7","apiType":"Sql","creationTime":"2022-09-29T07:33:49Z","oldestRestorableTime":"2022-09-29T07:33:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87589c6d-f091-4778-9118-8b70c299f205","creationTime":"2022-09-29T07:33:50Z"}]}},{"name":"647fa227-e369-4b93-8c3d-e261644d2fcf","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/647fa227-e369-4b93-8c3d-e261644d2fcf","properties":{"accountName":"clisb32fuxaefpe","apiType":"Sql","creationTime":"2022-09-29T07:35:16Z","oldestRestorableTime":"2022-09-29T07:35:16Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"5671631f-5ced-4ca6-97e8-273fac7d09c4","creationTime":"2022-09-29T07:35:17Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","deletionTime":"2022-09-29T07:31:57Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z","deletionTime":"2022-09-29T07:31:57Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","deletionTime":"2022-09-29T07:33:27Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z","deletionTime":"2022-09-29T07:33:27Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","deletionTime":"2022-09-29T07:37:12Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:42:34Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' headers: cache-control: - no-cache content-length: - - '34087' + - '73295' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:32:50 GMT + - Thu, 29 Sep 2022 07:42:35 GMT expires: - '-1' pragma: @@ -1082,7 +1287,6 @@ interactions: - '' - '' - '' - - '' status: code: 200 message: OK @@ -1100,12 +1304,13 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001","name":"cli_test_cosmosdb_gremlin_account_restore_using_create000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001","name":"cli_test_cosmosdb_gremlin_account_restore_using_create000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:36:48Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -1114,7 +1319,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:36:50 GMT + - Thu, 29 Sep 2022 07:46:35 GMT expires: - '-1' pragma: @@ -1132,8 +1337,8 @@ interactions: body: '{"location": "westus2", "kind": "GlobalDocumentDB", "properties": {"locations": [{"locationName": "westus2", "failoverPriority": 0, "isZoneRedundant": false}], "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Restore", - "restoreParameters": {"restoreMode": "PointInTime", "restoreSource": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/2b567c10-cb59-41b3-b522-341b45e961fd", - "restoreTimestampInUtc": "2022-09-20T07:35:04.000Z"}}}' + "restoreParameters": {"restoreSource": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a", + "restoreTimestampInUtc": "2022-09-29T07:44:51.000Z", "restoreMode": "PointInTime"}}}' headers: Accept: - application/json @@ -1150,31 +1355,31 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:36:54.1018975Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"8ec464fa-88b1-4378-93ce-79f8183476cf","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:46:37.5928024Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"271af5eb-8274-4c30-b6c8-6674e1de772c","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/2b567c10-cb59-41b3-b522-341b45e961fd","restoreTimestampInUtc":"2022-09-20T07:35:04Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","restoreTimestampInUtc":"2022-09-29T07:44:51Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:46:37.5928024Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:46:37.5928024Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:46:37.5928024Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:46:37.5928024Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '2502' + - '2909' content-type: - application/json date: - - Tue, 20 Sep 2022 07:36:57 GMT + - Thu, 29 Sep 2022 07:46:39 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview pragma: - no-cache server: @@ -1190,7 +1395,145 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --is-restore-request --restore-source --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:47:09 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --is-restore-request --restore-source --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:47:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --is-restore-request --restore-source --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:48:09 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 status: code: 200 message: Ok @@ -1208,9 +1551,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1222,7 +1565,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:37:26 GMT + - Thu, 29 Sep 2022 07:48:40 GMT pragma: - no-cache server: @@ -1254,9 +1597,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1268,7 +1611,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:37:56 GMT + - Thu, 29 Sep 2022 07:49:10 GMT pragma: - no-cache server: @@ -1300,9 +1643,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1314,7 +1657,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:38:27 GMT + - Thu, 29 Sep 2022 07:49:39 GMT pragma: - no-cache server: @@ -1346,9 +1689,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1360,7 +1703,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:38:56 GMT + - Thu, 29 Sep 2022 07:50:11 GMT pragma: - no-cache server: @@ -1392,9 +1735,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1406,7 +1749,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:39:27 GMT + - Thu, 29 Sep 2022 07:50:40 GMT pragma: - no-cache server: @@ -1438,9 +1781,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1452,7 +1795,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:39:57 GMT + - Thu, 29 Sep 2022 07:51:10 GMT pragma: - no-cache server: @@ -1484,9 +1827,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1498,7 +1841,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:40:27 GMT + - Thu, 29 Sep 2022 07:51:41 GMT pragma: - no-cache server: @@ -1530,9 +1873,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1544,7 +1887,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:40:57 GMT + - Thu, 29 Sep 2022 07:52:11 GMT pragma: - no-cache server: @@ -1576,9 +1919,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1590,7 +1933,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:41:28 GMT + - Thu, 29 Sep 2022 07:52:40 GMT pragma: - no-cache server: @@ -1622,9 +1965,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1636,7 +1979,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:41:57 GMT + - Thu, 29 Sep 2022 07:53:11 GMT pragma: - no-cache server: @@ -1668,9 +2011,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1682,7 +2025,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:42:28 GMT + - Thu, 29 Sep 2022 07:53:41 GMT pragma: - no-cache server: @@ -1714,9 +2057,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1728,7 +2071,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:42:58 GMT + - Thu, 29 Sep 2022 07:54:11 GMT pragma: - no-cache server: @@ -1760,9 +2103,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1774,7 +2117,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:43:28 GMT + - Thu, 29 Sep 2022 07:54:41 GMT pragma: - no-cache server: @@ -1806,9 +2149,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1820,7 +2163,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:43:58 GMT + - Thu, 29 Sep 2022 07:55:12 GMT pragma: - no-cache server: @@ -1852,9 +2195,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1866,7 +2209,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:44:28 GMT + - Thu, 29 Sep 2022 07:55:41 GMT pragma: - no-cache server: @@ -1898,9 +2241,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1912,7 +2255,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:44:58 GMT + - Thu, 29 Sep 2022 07:56:11 GMT pragma: - no-cache server: @@ -1944,9 +2287,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1958,7 +2301,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:45:28 GMT + - Thu, 29 Sep 2022 07:56:42 GMT pragma: - no-cache server: @@ -1990,9 +2333,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2004,7 +2347,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:45:58 GMT + - Thu, 29 Sep 2022 07:57:12 GMT pragma: - no-cache server: @@ -2036,9 +2379,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2050,7 +2393,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:46:29 GMT + - Thu, 29 Sep 2022 07:57:42 GMT pragma: - no-cache server: @@ -2082,9 +2425,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2096,7 +2439,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:46:59 GMT + - Thu, 29 Sep 2022 07:58:13 GMT pragma: - no-cache server: @@ -2128,9 +2471,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2142,7 +2485,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:29 GMT + - Thu, 29 Sep 2022 07:58:42 GMT pragma: - no-cache server: @@ -2174,9 +2517,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2188,7 +2531,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:59 GMT + - Thu, 29 Sep 2022 07:59:12 GMT pragma: - no-cache server: @@ -2220,9 +2563,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2234,7 +2577,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:48:29 GMT + - Thu, 29 Sep 2022 07:59:42 GMT pragma: - no-cache server: @@ -2266,9 +2609,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2280,7 +2623,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:49:00 GMT + - Thu, 29 Sep 2022 08:00:13 GMT pragma: - no-cache server: @@ -2312,9 +2655,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2326,7 +2669,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:49:30 GMT + - Thu, 29 Sep 2022 08:00:43 GMT pragma: - no-cache server: @@ -2358,9 +2701,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2372,7 +2715,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:50:00 GMT + - Thu, 29 Sep 2022 08:01:13 GMT pragma: - no-cache server: @@ -2404,9 +2747,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2418,7 +2761,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:50:30 GMT + - Thu, 29 Sep 2022 08:01:43 GMT pragma: - no-cache server: @@ -2450,9 +2793,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d2b6e0c4-97a4-4560-b7d1-af6a0ab23d5f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e812ea97-a23f-4539-9d8a-02b89c4f9934?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -2464,7 +2807,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:51:00 GMT + - Thu, 29 Sep 2022 08:02:13 GMT pragma: - no-cache server: @@ -2496,27 +2839,27 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:50:47.0247583Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"8ec464fa-88b1-4378-93ce-79f8183476cf","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:01:53.0905194Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"271af5eb-8274-4c30-b6c8-6674e1de772c","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/2b567c10-cb59-41b3-b522-341b45e961fd","restoreTimestampInUtc":"2022-09-20T07:35:04Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","restoreTimestampInUtc":"2022-09-29T07:44:51Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:01:53.0905194Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:01:53.0905194Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:01:53.0905194Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:01:53.0905194Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2638' + - '3045' content-type: - application/json date: - - Tue, 20 Sep 2022 07:51:00 GMT + - Thu, 29 Sep 2022 08:02:13 GMT pragma: - no-cache server: @@ -2548,27 +2891,27 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:50:47.0247583Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"8ec464fa-88b1-4378-93ce-79f8183476cf","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:01:53.0905194Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"271af5eb-8274-4c30-b6c8-6674e1de772c","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/2b567c10-cb59-41b3-b522-341b45e961fd","restoreTimestampInUtc":"2022-09-20T07:35:04Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","restoreTimestampInUtc":"2022-09-29T07:44:51Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:01:53.0905194Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:01:53.0905194Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:01:53.0905194Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:01:53.0905194Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2638' + - '3045' content-type: - application/json date: - - Tue, 20 Sep 2022 07:51:00 GMT + - Thu, 29 Sep 2022 08:02:14 GMT pragma: - no-cache server: @@ -2600,27 +2943,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:50:47.0247583Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"8ec464fa-88b1-4378-93ce-79f8183476cf","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:01:53.0905194Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"271af5eb-8274-4c30-b6c8-6674e1de772c","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/2b567c10-cb59-41b3-b522-341b45e961fd","restoreTimestampInUtc":"2022-09-20T07:35:04Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","restoreTimestampInUtc":"2022-09-29T07:44:51Z","gremlinDatabasesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:01:53.0905194Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:01:53.0905194Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:01:53.0905194Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:01:53.0905194Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2638' + - '3045' content-type: - application/json date: - - Tue, 20 Sep 2022 07:51:01 GMT + - Thu, 29 Sep 2022 08:02:13 GMT pragma: - no-cache server: diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_graph_backupinfo.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_graph_backupinfo.yaml index d04cf50c838..7222acc590f 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_graph_backupinfo.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_graph_backupinfo.yaml @@ -13,9 +13,9 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-08-15-preview response: body: string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/cli000004'' @@ -29,7 +29,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:08 GMT + - Thu, 29 Sep 2022 07:20:56 GMT expires: - '-1' pragma: @@ -57,12 +57,13 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001","name":"cli_test_cosmosdb_gremlin_graph_backupinfo000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001","name":"cli_test_cosmosdb_gremlin_graph_backupinfo000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:20:53Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -71,7 +72,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:09 GMT + - Thu, 29 Sep 2022 07:20:56 GMT expires: - '-1' pragma: @@ -107,31 +108,31 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:12.4867548Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"63c04b24-248b-4f84-8f63-c89f8bf790e7","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:21:00.5526007Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"24ce365d-3772-410c-b5a4-c040e2e2c737","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:21:00.5526007Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:21:00.5526007Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:21:00.5526007Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:21:00.5526007Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0229f2c9-d7a4-4fd1-9273-f4bfa95518bf?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c0a910f9-3532-4b2c-b64b-3f27057f8d24?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '1932' + - '2359' content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:14 GMT + - Thu, 29 Sep 2022 07:21:02 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/0229f2c9-d7a4-4fd1-9273-f4bfa95518bf?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/c0a910f9-3532-4b2c-b64b-3f27057f8d24?api-version=2022-08-15-preview pragma: - no-cache server: @@ -147,7 +148,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1199' status: code: 200 message: Ok @@ -165,9 +166,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0229f2c9-d7a4-4fd1-9273-f4bfa95518bf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c0a910f9-3532-4b2c-b64b-3f27057f8d24?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -179,7 +180,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:44 GMT + - Thu, 29 Sep 2022 07:21:32 GMT pragma: - no-cache server: @@ -211,9 +212,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0229f2c9-d7a4-4fd1-9273-f4bfa95518bf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c0a910f9-3532-4b2c-b64b-3f27057f8d24?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -225,7 +226,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:14 GMT + - Thu, 29 Sep 2022 07:22:03 GMT pragma: - no-cache server: @@ -257,9 +258,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0229f2c9-d7a4-4fd1-9273-f4bfa95518bf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c0a910f9-3532-4b2c-b64b-3f27057f8d24?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -271,7 +272,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:43 GMT + - Thu, 29 Sep 2022 07:22:32 GMT pragma: - no-cache server: @@ -303,9 +304,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0229f2c9-d7a4-4fd1-9273-f4bfa95518bf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c0a910f9-3532-4b2c-b64b-3f27057f8d24?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -317,7 +318,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:14 GMT + - Thu, 29 Sep 2022 07:23:02 GMT pragma: - no-cache server: @@ -349,9 +350,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0229f2c9-d7a4-4fd1-9273-f4bfa95518bf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c0a910f9-3532-4b2c-b64b-3f27057f8d24?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -363,7 +364,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:44 GMT + - Thu, 29 Sep 2022 07:23:32 GMT pragma: - no-cache server: @@ -395,9 +396,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0229f2c9-d7a4-4fd1-9273-f4bfa95518bf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c0a910f9-3532-4b2c-b64b-3f27057f8d24?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -409,7 +410,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:14 GMT + - Thu, 29 Sep 2022 07:24:03 GMT pragma: - no-cache server: @@ -441,9 +442,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0229f2c9-d7a4-4fd1-9273-f4bfa95518bf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c0a910f9-3532-4b2c-b64b-3f27057f8d24?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -455,7 +456,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:45 GMT + - Thu, 29 Sep 2022 07:24:33 GMT pragma: - no-cache server: @@ -487,9 +488,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0229f2c9-d7a4-4fd1-9273-f4bfa95518bf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c0a910f9-3532-4b2c-b64b-3f27057f8d24?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -501,7 +502,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:15 GMT + - Thu, 29 Sep 2022 07:25:03 GMT pragma: - no-cache server: @@ -533,9 +534,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0229f2c9-d7a4-4fd1-9273-f4bfa95518bf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c0a910f9-3532-4b2c-b64b-3f27057f8d24?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -547,7 +548,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:45 GMT + - Thu, 29 Sep 2022 07:25:33 GMT pragma: - no-cache server: @@ -579,9 +580,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0229f2c9-d7a4-4fd1-9273-f4bfa95518bf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c0a910f9-3532-4b2c-b64b-3f27057f8d24?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -593,7 +594,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:14 GMT + - Thu, 29 Sep 2022 07:26:04 GMT pragma: - no-cache server: @@ -625,27 +626,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:36.4323765Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"63c04b24-248b-4f84-8f63-c89f8bf790e7","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:25:10.3807258Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"24ce365d-3772-410c-b5a4-c040e2e2c737","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:25:10.3807258Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:25:10.3807258Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:25:10.3807258Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:25:10.3807258Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2302' + - '2729' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:15 GMT + - Thu, 29 Sep 2022 07:26:04 GMT pragma: - no-cache server: @@ -677,27 +678,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:36.4323765Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"63c04b24-248b-4f84-8f63-c89f8bf790e7","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:25:10.3807258Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"24ce365d-3772-410c-b5a4-c040e2e2c737","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:25:10.3807258Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:25:10.3807258Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:25:10.3807258Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:25:10.3807258Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2302' + - '2729' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:15 GMT + - Thu, 29 Sep 2022 07:26:04 GMT pragma: - no-cache server: @@ -729,27 +730,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:36.4323765Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"63c04b24-248b-4f84-8f63-c89f8bf790e7","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:25:10.3807258Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"24ce365d-3772-410c-b5a4-c040e2e2c737","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:25:10.3807258Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:25:10.3807258Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:25:10.3807258Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:25:10.3807258Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2302' + - '2729' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:17 GMT + - Thu, 29 Sep 2022 07:26:04 GMT pragma: - no-cache server: @@ -781,60 +782,60 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-08-15-preview response: body: string: '{"code":"NotFound","message":"Message: {\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https:\\\\/\\\\/aka.ms\\\\/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: - 7e6615a6-38b6-11ed-aba0-8cdcd4532c5b, Request URI: /apps/ddaf709a-0fb9-4274-b62c-8169544a5a1e/services/f069cf0c-13bc-44c9-a297-803b6090b23d/partitions/de4bd624-d9e1-4c26-9002-247f69ca521c/replicas/133041777065572132s, - RequestStats: \\r\\nRequestStartTime: 2022-09-20T07:33:18.5435403Z, RequestEndTime: - 2022-09-20T07:33:18.5435403Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-20T07:32:28.1531292Z\\\",\\\"cpu\\\":1.772,\\\"memory\\\":630656144.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0253,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":117},{\\\"dateUtc\\\":\\\"2022-09-20T07:32:38.1631882Z\\\",\\\"cpu\\\":2.114,\\\"memory\\\":630282304.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0173,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":117},{\\\"dateUtc\\\":\\\"2022-09-20T07:32:48.1732687Z\\\",\\\"cpu\\\":3.302,\\\"memory\\\":630255408.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0364,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":117},{\\\"dateUtc\\\":\\\"2022-09-20T07:32:58.1833524Z\\\",\\\"cpu\\\":1.873,\\\"memory\\\":630445696.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0521,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":117},{\\\"dateUtc\\\":\\\"2022-09-20T07:33:08.1934377Z\\\",\\\"cpu\\\":1.842,\\\"memory\\\":630140816.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0369,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":117},{\\\"dateUtc\\\":\\\"2022-09-20T07:33:18.2035403Z\\\",\\\"cpu\\\":1.244,\\\"memory\\\":630244796.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0172,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":113}]}\\r\\nRequestStart: - 2022-09-20T07:33:18.5435403Z; ResponseTime: 2022-09-20T07:33:18.5435403Z; - StoreResult: StorePhysicalAddress: rntbd://10.0.1.9:11000/apps/ddaf709a-0fb9-4274-b62c-8169544a5a1e/services/f069cf0c-13bc-44c9-a297-803b6090b23d/partitions/de4bd624-d9e1-4c26-9002-247f69ca521c/replicas/133041777065572132s, + f9a813fd-3fc7-11ed-a05d-9c7bef4baa38, Request URI: /apps/c6c8eea5-11be-4345-8ae5-415f00ccecf2/services/919a3899-2bc3-42d0-856e-83193b274596/partitions/243150b2-7ef6-4906-85cd-92f8e15fbddd/replicas/133076025045507494s, + RequestStats: \\r\\nRequestStartTime: 2022-09-29T07:26:06.6072285Z, RequestEndTime: + 2022-09-29T07:26:06.6072285Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-29T07:25:15.1566288Z\\\",\\\"cpu\\\":0.273,\\\"memory\\\":655948888.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0369,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":177},{\\\"dateUtc\\\":\\\"2022-09-29T07:25:25.1667363Z\\\",\\\"cpu\\\":0.156,\\\"memory\\\":655942088.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0083,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":176},{\\\"dateUtc\\\":\\\"2022-09-29T07:25:35.1768436Z\\\",\\\"cpu\\\":0.378,\\\"memory\\\":655823696.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0173,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":177},{\\\"dateUtc\\\":\\\"2022-09-29T07:25:45.1869760Z\\\",\\\"cpu\\\":0.276,\\\"memory\\\":655554784.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0141,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":178},{\\\"dateUtc\\\":\\\"2022-09-29T07:25:55.1970939Z\\\",\\\"cpu\\\":0.095,\\\"memory\\\":655431564.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0181,\\\"availableThreads\\\":32765,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":178},{\\\"dateUtc\\\":\\\"2022-09-29T07:26:05.2072132Z\\\",\\\"cpu\\\":1.405,\\\"memory\\\":654824044.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0193,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":178}]}\\r\\nRequestStart: + 2022-09-29T07:26:06.6072285Z; ResponseTime: 2022-09-29T07:26:06.6072285Z; + StoreResult: StorePhysicalAddress: rntbd://10.0.1.8:11000/apps/c6c8eea5-11be-4345-8ae5-415f00ccecf2/services/919a3899-2bc3-42d0-856e-83193b274596/partitions/243150b2-7ef6-4906-85cd-92f8e15fbddd/replicas/133076025045507494s, LSN: 9, GlobalCommittedLsn: 9, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#9, - UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.813, ActivityId: - 7e6615a6-38b6-11ed-aba0-8cdcd4532c5b, RetryAfterInMs: , TransportRequestTimeline: + UsingLocalLSN: False, TransportException: null, BELatencyMs: 1.006, ActivityId: + f9a813fd-3fc7-11ed-a05d-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:18.5435403Z\\\", \\\"durationInMs\\\": 0.0083},{\\\"event\\\": - \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:18.5435486Z\\\", - \\\"durationInMs\\\": 0.0022},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:18.5435508Z\\\", \\\"durationInMs\\\": 0.1162},{\\\"event\\\": - \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:18.5436670Z\\\", - \\\"durationInMs\\\": 1.1291},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:18.5447961Z\\\", \\\"durationInMs\\\": 0.097},{\\\"event\\\": - \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:18.5448931Z\\\", - \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-20T07:33:18.4935368Z\\\",\\\"lastSend\\\":\\\"2022-09-20T07:33:18.4935368Z\\\",\\\"lastReceive\\\":\\\"2022-09-20T07:33:18.5035234Z\\\"},\\\"requestSizeInBytes\\\":466,\\\"responseMetadataSizeInBytes\\\":134,\\\"responseBodySizeInBytes\\\":87};\\r\\n - ResourceType: Database, OperationType: Read\\r\\nRequestStart: 2022-09-20T07:33:18.5435403Z; - ResponseTime: 2022-09-20T07:33:18.5435403Z; StoreResult: StorePhysicalAddress: - rntbd://10.0.1.6:11000/apps/ddaf709a-0fb9-4274-b62c-8169544a5a1e/services/f069cf0c-13bc-44c9-a297-803b6090b23d/partitions/de4bd624-d9e1-4c26-9002-247f69ca521c/replicas/133041777065572133s, + \\\"2022-09-29T07:26:06.6072285Z\\\", \\\"durationInMs\\\": 0.0085},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:26:06.6072370Z\\\", + \\\"durationInMs\\\": 0.002},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:26:06.6072390Z\\\", \\\"durationInMs\\\": 0.0963},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:26:06.6073353Z\\\", + \\\"durationInMs\\\": 1.3322},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:26:06.6086675Z\\\", \\\"durationInMs\\\": 0.0279},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:26:06.6086954Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:26:06.5372229Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:26:06.5372229Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:26:06.5672267Z\\\"},\\\"requestSizeInBytes\\\":466,\\\"responseMetadataSizeInBytes\\\":134,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Database, OperationType: Read\\r\\nRequestStart: 2022-09-29T07:26:06.6072285Z; + ResponseTime: 2022-09-29T07:26:06.6072285Z; StoreResult: StorePhysicalAddress: + rntbd://10.0.1.5:11000/apps/c6c8eea5-11be-4345-8ae5-415f00ccecf2/services/919a3899-2bc3-42d0-856e-83193b274596/partitions/243150b2-7ef6-4906-85cd-92f8e15fbddd/replicas/133076025045507496s, LSN: 9, GlobalCommittedLsn: 9, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#9, - UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.714, ActivityId: - 7e6615a6-38b6-11ed-aba0-8cdcd4532c5b, RetryAfterInMs: , TransportRequestTimeline: + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.722, ActivityId: + f9a813fd-3fc7-11ed-a05d-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:18.5435403Z\\\", \\\"durationInMs\\\": 0.0042},{\\\"event\\\": - \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:18.5435445Z\\\", - \\\"durationInMs\\\": 0.0013},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:18.5435458Z\\\", \\\"durationInMs\\\": 0.062},{\\\"event\\\": - \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:18.5436078Z\\\", - \\\"durationInMs\\\": 1.0754},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:18.5446832Z\\\", \\\"durationInMs\\\": 0.1049},{\\\"event\\\": - \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:18.5447881Z\\\", - \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-20T07:33:18.4935368Z\\\",\\\"lastSend\\\":\\\"2022-09-20T07:33:18.4935368Z\\\",\\\"lastReceive\\\":\\\"2022-09-20T07:33:18.5035234Z\\\"},\\\"requestSizeInBytes\\\":466,\\\"responseMetadataSizeInBytes\\\":134,\\\"responseBodySizeInBytes\\\":87};\\r\\n + \\\"2022-09-29T07:26:06.6072285Z\\\", \\\"durationInMs\\\": 0.0036},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:26:06.6072321Z\\\", + \\\"durationInMs\\\": 0.0061},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:26:06.6072382Z\\\", \\\"durationInMs\\\": 0.0627},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:26:06.6073009Z\\\", + \\\"durationInMs\\\": 1.0347},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:26:06.6083356Z\\\", \\\"durationInMs\\\": 0.0727},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:26:06.6084083Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:26:05.3172111Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:26:05.3172111Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:26:05.3172111Z\\\"},\\\"requestSizeInBytes\\\":466,\\\"responseMetadataSizeInBytes\\\":134,\\\"responseBodySizeInBytes\\\":87};\\r\\n ResourceType: Database, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, Request URI: /dbs/cli000003, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0"}' headers: cache-control: - no-store, no-cache content-length: - - '6518' + - '6519' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:17 GMT + - Thu, 29 Sep 2022 07:26:05 GMT pragma: - no-cache server: @@ -866,15 +867,15 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/4620bfe9-229c-4b5f-a5df-a2455055eba6?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3936d418-183a-4273-8ee6-f0ee70fbeeeb?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -882,9 +883,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:19 GMT + - Thu, 29 Sep 2022 07:26:07 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/operationResults/4620bfe9-229c-4b5f-a5df-a2455055eba6?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/operationResults/3936d418-183a-4273-8ee6-f0ee70fbeeeb?api-version=2022-08-15 pragma: - no-cache server: @@ -896,7 +897,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1199' status: code: 202 message: Accepted @@ -914,9 +915,9 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/4620bfe9-229c-4b5f-a5df-a2455055eba6?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3936d418-183a-4273-8ee6-f0ee70fbeeeb?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -928,7 +929,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:49 GMT + - Thu, 29 Sep 2022 07:26:37 GMT pragma: - no-cache server: @@ -960,12 +961,12 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"mtUCAA==","_self":"dbs/mtUCAA==/","_etag":"\"0000150b-0000-0200-0000-63296cc40000\"","_colls":"colls/","_users":"users/","_ts":1663659204}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"RxpoAA==","_self":"dbs/RxpoAA==/","_etag":"\"00008800-0000-0200-0000-633548940000\"","_colls":"colls/","_users":"users/","_ts":1664436372}}}' headers: cache-control: - no-store, no-cache @@ -974,7 +975,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:49 GMT + - Thu, 29 Sep 2022 07:26:38 GMT pragma: - no-cache server: @@ -1006,12 +1007,12 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"mtUCAA==","_self":"dbs/mtUCAA==/","_etag":"\"0000150b-0000-0200-0000-63296cc40000\"","_colls":"colls/","_users":"users/","_ts":1663659204}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"RxpoAA==","_self":"dbs/RxpoAA==/","_etag":"\"00008800-0000-0200-0000-633548940000\"","_colls":"colls/","_users":"users/","_ts":1664436372}}}' headers: cache-control: - no-store, no-cache @@ -1020,7 +1021,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:50 GMT + - Thu, 29 Sep 2022 07:26:39 GMT pragma: - no-cache server: @@ -1052,49 +1053,49 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-08-15-preview response: body: string: '{"code":"NotFound","message":"Message: {\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https:\\\\/\\\\/aka.ms\\\\/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: - 91bc3159-38b6-11ed-910b-8cdcd4532c5b, Request URI: /apps/ddaf709a-0fb9-4274-b62c-8169544a5a1e/services/f069cf0c-13bc-44c9-a297-803b6090b23d/partitions/de4bd624-d9e1-4c26-9002-247f69ca521c/replicas/133041777065572132s, - RequestStats: \\r\\nRequestStartTime: 2022-09-20T07:33:51.2123975Z, RequestEndTime: - 2022-09-20T07:33:51.2123975Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-20T07:32:55.9721002Z\\\",\\\"cpu\\\":0.188,\\\"memory\\\":629986276.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0172,\\\"availableThreads\\\":32765,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":111},{\\\"dateUtc\\\":\\\"2022-09-20T07:33:05.9821666Z\\\",\\\"cpu\\\":0.679,\\\"memory\\\":629740680.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.02,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":111},{\\\"dateUtc\\\":\\\"2022-09-20T07:33:15.9922074Z\\\",\\\"cpu\\\":0.242,\\\"memory\\\":629497212.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0444,\\\"availableThreads\\\":32765,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":111},{\\\"dateUtc\\\":\\\"2022-09-20T07:33:26.0022607Z\\\",\\\"cpu\\\":0.185,\\\"memory\\\":629385376.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0218,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":111},{\\\"dateUtc\\\":\\\"2022-09-20T07:33:36.0123323Z\\\",\\\"cpu\\\":0.626,\\\"memory\\\":629212748.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0187,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":109},{\\\"dateUtc\\\":\\\"2022-09-20T07:33:46.0223680Z\\\",\\\"cpu\\\":0.440,\\\"memory\\\":628889372.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0119,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":109}]}\\r\\nRequestStart: - 2022-09-20T07:33:51.2123975Z; ResponseTime: 2022-09-20T07:33:51.2123975Z; - StoreResult: StorePhysicalAddress: rntbd://10.0.1.9:11000/apps/ddaf709a-0fb9-4274-b62c-8169544a5a1e/services/f069cf0c-13bc-44c9-a297-803b6090b23d/partitions/de4bd624-d9e1-4c26-9002-247f69ca521c/replicas/133041777065572132s, + 0d930bca-3fc8-11ed-9c70-9c7bef4baa38, Request URI: /apps/c6c8eea5-11be-4345-8ae5-415f00ccecf2/services/919a3899-2bc3-42d0-856e-83193b274596/partitions/243150b2-7ef6-4906-85cd-92f8e15fbddd/replicas/133076025045507494s, + RequestStats: \\r\\nRequestStartTime: 2022-09-29T07:26:40.1494353Z, RequestEndTime: + 2022-09-29T07:26:40.1494353Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-29T07:25:44.5494527Z\\\",\\\"cpu\\\":1.280,\\\"memory\\\":656071752.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0403,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":162},{\\\"dateUtc\\\":\\\"2022-09-29T07:25:54.5594481Z\\\",\\\"cpu\\\":0.820,\\\"memory\\\":655942120.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0315,\\\"availableThreads\\\":32756,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":163},{\\\"dateUtc\\\":\\\"2022-09-29T07:26:04.5694453Z\\\",\\\"cpu\\\":0.254,\\\"memory\\\":655818592.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0212,\\\"availableThreads\\\":32765,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":164},{\\\"dateUtc\\\":\\\"2022-09-29T07:26:14.5794413Z\\\",\\\"cpu\\\":0.341,\\\"memory\\\":655246920.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0326,\\\"availableThreads\\\":32765,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":165},{\\\"dateUtc\\\":\\\"2022-09-29T07:26:24.5894389Z\\\",\\\"cpu\\\":0.488,\\\"memory\\\":655015400.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0256,\\\"availableThreads\\\":32765,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":163},{\\\"dateUtc\\\":\\\"2022-09-29T07:26:34.5994376Z\\\",\\\"cpu\\\":0.427,\\\"memory\\\":655008612.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0418,\\\"availableThreads\\\":32765,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":163}]}\\r\\nRequestStart: + 2022-09-29T07:26:40.1494353Z; ResponseTime: 2022-09-29T07:26:40.1494353Z; + StoreResult: StorePhysicalAddress: rntbd://10.0.1.8:11000/apps/c6c8eea5-11be-4345-8ae5-415f00ccecf2/services/919a3899-2bc3-42d0-856e-83193b274596/partitions/243150b2-7ef6-4906-85cd-92f8e15fbddd/replicas/133076025045507494s, LSN: 10, GlobalCommittedLsn: 10, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#10, - UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.712, ActivityId: - 91bc3159-38b6-11ed-910b-8cdcd4532c5b, RetryAfterInMs: , TransportRequestTimeline: + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.994, ActivityId: + 0d930bca-3fc8-11ed-9c70-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:51.2123975Z\\\", \\\"durationInMs\\\": 0.0131},{\\\"event\\\": - \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:51.2124106Z\\\", - \\\"durationInMs\\\": 0.0024},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:51.2124130Z\\\", \\\"durationInMs\\\": 0.2073},{\\\"event\\\": - \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:51.2126203Z\\\", - \\\"durationInMs\\\": 0.898},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:51.2135183Z\\\", \\\"durationInMs\\\": 0.0681},{\\\"event\\\": - \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:51.2135864Z\\\", - \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-20T07:33:50.9523951Z\\\",\\\"lastSend\\\":\\\"2022-09-20T07:33:50.9523951Z\\\",\\\"lastReceive\\\":\\\"2022-09-20T07:33:50.9523951Z\\\"},\\\"requestSizeInBytes\\\":494,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n - ResourceType: Collection, OperationType: Read\\r\\nRequestStart: 2022-09-20T07:33:51.2123975Z; - ResponseTime: 2022-09-20T07:33:51.2123975Z; StoreResult: StorePhysicalAddress: - rntbd://10.0.1.6:11000/apps/ddaf709a-0fb9-4274-b62c-8169544a5a1e/services/f069cf0c-13bc-44c9-a297-803b6090b23d/partitions/de4bd624-d9e1-4c26-9002-247f69ca521c/replicas/133041777065572133s, + \\\"2022-09-29T07:26:40.1494353Z\\\", \\\"durationInMs\\\": 0.0146},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:26:40.1494499Z\\\", + \\\"durationInMs\\\": 0.0028},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:26:40.1494527Z\\\", \\\"durationInMs\\\": 0.0981},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:26:40.1495508Z\\\", + \\\"durationInMs\\\": 1.297},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:26:40.1508478Z\\\", \\\"durationInMs\\\": 0.0809},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:26:40.1509287Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:26:39.8394361Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:26:39.8394361Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:26:39.8694351Z\\\"},\\\"requestSizeInBytes\\\":496,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Collection, OperationType: Read\\r\\nRequestStart: 2022-09-29T07:26:40.1494353Z; + ResponseTime: 2022-09-29T07:26:40.1494353Z; StoreResult: StorePhysicalAddress: + rntbd://10.0.1.5:11000/apps/c6c8eea5-11be-4345-8ae5-415f00ccecf2/services/919a3899-2bc3-42d0-856e-83193b274596/partitions/243150b2-7ef6-4906-85cd-92f8e15fbddd/replicas/133076025045507496s, LSN: 10, GlobalCommittedLsn: 10, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#10, - UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.814, ActivityId: - 91bc3159-38b6-11ed-910b-8cdcd4532c5b, RetryAfterInMs: , TransportRequestTimeline: + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.84, ActivityId: + 0d930bca-3fc8-11ed-9c70-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:51.2123975Z\\\", \\\"durationInMs\\\": 0.0046},{\\\"event\\\": - \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:51.2124021Z\\\", - \\\"durationInMs\\\": 0.0013},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:51.2124034Z\\\", \\\"durationInMs\\\": 0.1743},{\\\"event\\\": - \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:51.2125777Z\\\", - \\\"durationInMs\\\": 1.1561},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:51.2137338Z\\\", \\\"durationInMs\\\": 0.0267},{\\\"event\\\": - \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:51.2137605Z\\\", - \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-20T07:33:50.9523951Z\\\",\\\"lastSend\\\":\\\"2022-09-20T07:33:50.9523951Z\\\",\\\"lastReceive\\\":\\\"2022-09-20T07:33:50.9523951Z\\\"},\\\"requestSizeInBytes\\\":494,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + \\\"2022-09-29T07:26:40.1494353Z\\\", \\\"durationInMs\\\": 0.0044},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:26:40.1494397Z\\\", + \\\"durationInMs\\\": 0.0014},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:26:40.1494411Z\\\", \\\"durationInMs\\\": 0.071},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:26:40.1495121Z\\\", + \\\"durationInMs\\\": 1.2091},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:26:40.1507212Z\\\", \\\"durationInMs\\\": 0.0711},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:26:40.1507923Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:26:39.9094358Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:26:39.9094358Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:26:39.9094358Z\\\"},\\\"requestSizeInBytes\\\":496,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n ResourceType: Collection, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, Request URI: /dbs/cli000003/colls/cli000002, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0"}' headers: @@ -1105,7 +1106,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:50 GMT + - Thu, 29 Sep 2022 07:26:39 GMT pragma: - no-cache server: @@ -1140,15 +1141,15 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b73fb33a-0784-4a02-882b-14701eebbe08?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/67b1b4e7-bad5-44f9-929d-a0e94ce19cd2?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -1156,9 +1157,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:51 GMT + - Thu, 29 Sep 2022 07:26:41 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/operationResults/b73fb33a-0784-4a02-882b-14701eebbe08?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/operationResults/67b1b4e7-bad5-44f9-929d-a0e94ce19cd2?api-version=2022-08-15 pragma: - no-cache server: @@ -1170,7 +1171,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 202 message: Accepted @@ -1188,9 +1189,9 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b73fb33a-0784-4a02-882b-14701eebbe08?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/67b1b4e7-bad5-44f9-929d-a0e94ce19cd2?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -1202,7 +1203,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:21 GMT + - Thu, 29 Sep 2022 07:27:10 GMT pragma: - no-cache server: @@ -1234,12 +1235,12 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"mtUCALyk0BU=","_ts":1663659236,"_self":"dbs/mtUCAA==/colls/mtUCALyk0BU=/","_etag":"\"0000180b-0000-0200-0000-63296ce40000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"RxpoAPES8yw=","_ts":1664436406,"_self":"dbs/RxpoAA==/colls/RxpoAPES8yw=/","_etag":"\"00008b00-0000-0200-0000-633548b60000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' headers: cache-control: - no-store, no-cache @@ -1248,7 +1249,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:22 GMT + - Thu, 29 Sep 2022 07:27:11 GMT pragma: - no-cache server: @@ -1280,12 +1281,12 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"mtUCAA==","_self":"dbs/mtUCAA==/","_etag":"\"0000150b-0000-0200-0000-63296cc40000\"","_colls":"colls/","_users":"users/","_ts":1663659204}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"RxpoAA==","_self":"dbs/RxpoAA==/","_etag":"\"00008800-0000-0200-0000-633548940000\"","_colls":"colls/","_users":"users/","_ts":1664436372}}}' headers: cache-control: - no-store, no-cache @@ -1294,7 +1295,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:24 GMT + - Thu, 29 Sep 2022 07:27:12 GMT pragma: - no-cache server: @@ -1326,12 +1327,12 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"mtUCALyk0BU=","_ts":1663659236,"_self":"dbs/mtUCAA==/colls/mtUCALyk0BU=/","_etag":"\"0000180b-0000-0200-0000-63296ce40000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"RxpoAPES8yw=","_ts":1664436406,"_self":"dbs/RxpoAA==/colls/RxpoAPES8yw=/","_etag":"\"00008b00-0000-0200-0000-633548b60000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' headers: cache-control: - no-store, no-cache @@ -1340,7 +1341,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:24 GMT + - Thu, 29 Sep 2022 07:27:12 GMT pragma: - no-cache server: @@ -1376,9 +1377,9 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation?api-version=2022-08-15-preview response: body: string: '{"status":"Enqueued"}' @@ -1390,9 +1391,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:25 GMT + - Thu, 29 Sep 2022 07:27:12 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation/operationResults/87cefde1-5b9e-4dad-9a46-9af2a0d1d708?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation/operationResults/567e4856-c0fc-40e2-b3bf-ead6c13c1f78?api-version=2022-08-15-preview pragma: - no-cache server: @@ -1422,13 +1423,13 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation/operationResults/87cefde1-5b9e-4dad-9a46-9af2a0d1d708?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation/operationResults/567e4856-c0fc-40e2-b3bf-ead6c13c1f78?api-version=2022-08-15-preview response: body: - string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/20/2022 - 7:34:30 AM"}}' + string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/29/2022 + 7:27:19 AM"}}' headers: cache-control: - no-store, no-cache @@ -1437,7 +1438,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:55 GMT + - Thu, 29 Sep 2022 07:27:43 GMT pragma: - no-cache server: @@ -1469,12 +1470,12 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"mtUCAA==","_self":"dbs/mtUCAA==/","_etag":"\"0000150b-0000-0200-0000-63296cc40000\"","_colls":"colls/","_users":"users/","_ts":1663659204}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"RxpoAA==","_self":"dbs/RxpoAA==/","_etag":"\"00008800-0000-0200-0000-633548940000\"","_colls":"colls/","_users":"users/","_ts":1664436372}}}' headers: cache-control: - no-store, no-cache @@ -1483,7 +1484,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:55 GMT + - Thu, 29 Sep 2022 07:27:44 GMT pragma: - no-cache server: @@ -1515,12 +1516,12 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"mtUCALyk0BU=","_ts":1663659236,"_self":"dbs/mtUCAA==/colls/mtUCALyk0BU=/","_etag":"\"0000180b-0000-0200-0000-63296ce40000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"RxpoAPES8yw=","_ts":1664436406,"_self":"dbs/RxpoAA==/colls/RxpoAPES8yw=/","_etag":"\"00008b00-0000-0200-0000-633548b60000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' headers: cache-control: - no-store, no-cache @@ -1529,7 +1530,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:56 GMT + - Thu, 29 Sep 2022 07:27:44 GMT pragma: - no-cache server: @@ -1565,9 +1566,9 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation?api-version=2022-08-15-preview response: body: string: '{"status":"Enqueued"}' @@ -1579,9 +1580,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:56 GMT + - Thu, 29 Sep 2022 07:27:45 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation/operationResults/1c00ec06-49dd-4def-902d-7c2e82cbc189?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation/operationResults/11147c70-af79-4dda-9aa2-a9c70b8a3fe2?api-version=2022-08-15-preview pragma: - no-cache server: @@ -1593,7 +1594,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 202 message: Accepted @@ -1611,13 +1612,13 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation/operationResults/1c00ec06-49dd-4def-902d-7c2e82cbc189?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation/operationResults/11147c70-af79-4dda-9aa2-a9c70b8a3fe2?api-version=2022-08-15-preview response: body: - string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/20/2022 - 7:35:01 AM"}}' + string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/29/2022 + 7:27:50 AM"}}' headers: cache-control: - no-store, no-cache @@ -1626,7 +1627,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:26 GMT + - Thu, 29 Sep 2022 07:28:15 GMT pragma: - no-cache server: @@ -1658,12 +1659,12 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"mtUCAA==","_self":"dbs/mtUCAA==/","_etag":"\"0000150b-0000-0200-0000-63296cc40000\"","_colls":"colls/","_users":"users/","_ts":1663659204}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"RxpoAA==","_self":"dbs/RxpoAA==/","_etag":"\"00008800-0000-0200-0000-633548940000\"","_colls":"colls/","_users":"users/","_ts":1664436372}}}' headers: cache-control: - no-store, no-cache @@ -1672,7 +1673,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:27 GMT + - Thu, 29 Sep 2022 07:28:16 GMT pragma: - no-cache server: @@ -1704,12 +1705,12 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"mtUCALyk0BU=","_ts":1663659236,"_self":"dbs/mtUCAA==/colls/mtUCALyk0BU=/","_etag":"\"0000180b-0000-0200-0000-63296ce40000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"RxpoAPES8yw=","_ts":1664436406,"_self":"dbs/RxpoAA==/colls/RxpoAPES8yw=/","_etag":"\"00008b00-0000-0200-0000-633548b60000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' headers: cache-control: - no-store, no-cache @@ -1718,7 +1719,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:28 GMT + - Thu, 29 Sep 2022 07:28:17 GMT pragma: - no-cache server: @@ -1754,9 +1755,9 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation?api-version=2022-08-15-preview response: body: string: '{"status":"Enqueued"}' @@ -1768,9 +1769,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:28 GMT + - Thu, 29 Sep 2022 07:28:17 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation/operationResults/5e332d40-3209-4b72-9987-4222b988a69f?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation/operationResults/8147d426-4e0e-4e3a-be4d-0ea3f922f62b?api-version=2022-08-15-preview pragma: - no-cache server: @@ -1800,13 +1801,13 @@ interactions: ParameterSetName: - -g -a -d -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation/operationResults/5e332d40-3209-4b72-9987-4222b988a69f?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_graph_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/retrieveContinuousBackupInformation/operationResults/8147d426-4e0e-4e3a-be4d-0ea3f922f62b?api-version=2022-08-15-preview response: body: - string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/20/2022 - 7:35:34 AM"}}' + string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/29/2022 + 7:28:23 AM"}}' headers: cache-control: - no-store, no-cache @@ -1815,7 +1816,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:58 GMT + - Thu, 29 Sep 2022 07:28:48 GMT pragma: - no-cache server: diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_restorable_commands.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_restorable_commands.yaml index 98aad2f97da..60546c8a27d 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_restorable_commands.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_gremlin_restorable_commands.yaml @@ -13,12 +13,13 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_gremlin_restorable_commands000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001","name":"cli_test_cosmosdb_gremlin_restorable_commands000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001","name":"cli_test_cosmosdb_gremlin_restorable_commands000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:41:30Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -27,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:08 GMT + - Thu, 29 Sep 2022 07:41:34 GMT expires: - '-1' pragma: @@ -63,31 +64,31 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:12.758572Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2ecfd574-0338-4282-88ff-de2010f3c8b2","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:41:43.952856Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"572c38e5-5506-42c7-986f-2faf4e6b22e1","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:41:43.952856Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:41:43.952856Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:41:43.952856Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:41:43.952856Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/507393d7-9e74-4e4a-917a-e7301f0b8c5a?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd65305e-f8d6-4277-99f5-3a4b6071af4e?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '1934' + - '2357' content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:14 GMT + - Thu, 29 Sep 2022 07:41:45 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/507393d7-9e74-4e4a-917a-e7301f0b8c5a?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/bd65305e-f8d6-4277-99f5-3a4b6071af4e?api-version=2022-08-15-preview pragma: - no-cache server: @@ -103,7 +104,53 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd65305e-f8d6-4277-99f5-3a4b6071af4e?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:42:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 status: code: 200 message: Ok @@ -121,9 +168,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/507393d7-9e74-4e4a-917a-e7301f0b8c5a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd65305e-f8d6-4277-99f5-3a4b6071af4e?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -135,7 +182,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:45 GMT + - Thu, 29 Sep 2022 07:42:46 GMT pragma: - no-cache server: @@ -167,9 +214,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/507393d7-9e74-4e4a-917a-e7301f0b8c5a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd65305e-f8d6-4277-99f5-3a4b6071af4e?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -181,7 +228,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:15 GMT + - Thu, 29 Sep 2022 07:43:16 GMT pragma: - no-cache server: @@ -213,9 +260,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/507393d7-9e74-4e4a-917a-e7301f0b8c5a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd65305e-f8d6-4277-99f5-3a4b6071af4e?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -227,7 +274,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:45 GMT + - Thu, 29 Sep 2022 07:43:46 GMT pragma: - no-cache server: @@ -259,9 +306,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/507393d7-9e74-4e4a-917a-e7301f0b8c5a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd65305e-f8d6-4277-99f5-3a4b6071af4e?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -273,7 +320,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:14 GMT + - Thu, 29 Sep 2022 07:44:15 GMT pragma: - no-cache server: @@ -305,9 +352,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/507393d7-9e74-4e4a-917a-e7301f0b8c5a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd65305e-f8d6-4277-99f5-3a4b6071af4e?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -319,7 +366,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:45 GMT + - Thu, 29 Sep 2022 07:44:46 GMT pragma: - no-cache server: @@ -351,9 +398,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/507393d7-9e74-4e4a-917a-e7301f0b8c5a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd65305e-f8d6-4277-99f5-3a4b6071af4e?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -365,7 +412,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:15 GMT + - Thu, 29 Sep 2022 07:45:16 GMT pragma: - no-cache server: @@ -397,9 +444,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/507393d7-9e74-4e4a-917a-e7301f0b8c5a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd65305e-f8d6-4277-99f5-3a4b6071af4e?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -411,7 +458,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:45 GMT + - Thu, 29 Sep 2022 07:45:46 GMT pragma: - no-cache server: @@ -443,9 +490,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/507393d7-9e74-4e4a-917a-e7301f0b8c5a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd65305e-f8d6-4277-99f5-3a4b6071af4e?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -457,7 +504,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:16 GMT + - Thu, 29 Sep 2022 07:46:17 GMT pragma: - no-cache server: @@ -489,9 +536,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/507393d7-9e74-4e4a-917a-e7301f0b8c5a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd65305e-f8d6-4277-99f5-3a4b6071af4e?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -503,7 +550,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:46 GMT + - Thu, 29 Sep 2022 07:46:47 GMT pragma: - no-cache server: @@ -535,27 +582,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:31:50.3102761Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2ecfd574-0338-4282-88ff-de2010f3c8b2","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:45:51.9812018Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"572c38e5-5506-42c7-986f-2faf4e6b22e1","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:45:51.9812018Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:45:51.9812018Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:51.9812018Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:51.9812018Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2305' + - '2732' content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:46 GMT + - Thu, 29 Sep 2022 07:46:47 GMT pragma: - no-cache server: @@ -587,27 +634,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:31:50.3102761Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2ecfd574-0338-4282-88ff-de2010f3c8b2","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:45:51.9812018Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"572c38e5-5506-42c7-986f-2faf4e6b22e1","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:45:51.9812018Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:45:51.9812018Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:51.9812018Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:51.9812018Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2305' + - '2732' content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:46 GMT + - Thu, 29 Sep 2022 07:46:48 GMT pragma: - no-cache server: @@ -639,27 +686,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:31:50.3102761Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2ecfd574-0338-4282-88ff-de2010f3c8b2","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:45:51.9812018Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","gremlinEndpoint":"https://cli000004.gremlin.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Gremlin, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"572c38e5-5506-42c7-986f-2faf4e6b22e1","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableGremlin"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:45:51.9812018Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:45:51.9812018Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:51.9812018Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:51.9812018Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2305' + - '2732' content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:47 GMT + - Thu, 29 Sep 2022 07:46:48 GMT pragma: - no-cache server: @@ -695,15 +742,15 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5458c21c-5fd9-499e-a0d9-1bc0ebced192?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/25ecc95b-10c9-4056-bcf9-7594056dbe40?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -711,9 +758,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:48 GMT + - Thu, 29 Sep 2022 07:46:50 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/operationResults/5458c21c-5fd9-499e-a0d9-1bc0ebced192?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/operationResults/25ecc95b-10c9-4056-bcf9-7594056dbe40?api-version=2022-08-15 pragma: - no-cache server: @@ -743,9 +790,9 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5458c21c-5fd9-499e-a0d9-1bc0ebced192?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/25ecc95b-10c9-4056-bcf9-7594056dbe40?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -757,7 +804,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:18 GMT + - Thu, 29 Sep 2022 07:47:20 GMT pragma: - no-cache server: @@ -789,12 +836,12 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"RzsTAA==","_self":"dbs/RzsTAA==/","_etag":"\"0000577e-0000-0200-0000-63296ca50000\"","_colls":"colls/","_users":"users/","_ts":1663659173}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"EaUaAA==","_self":"dbs/EaUaAA==/","_etag":"\"00000a00-0000-0200-0000-63354d6e0000\"","_colls":"colls/","_users":"users/","_ts":1664437614}}}' headers: cache-control: - no-store, no-cache @@ -803,7 +850,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:18 GMT + - Thu, 29 Sep 2022 07:47:20 GMT pragma: - no-cache server: @@ -842,15 +889,15 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/19399d4f-f276-4769-b09b-4b61abaa9dc1?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/f2710bd3-fd1d-48d7-be1e-53ccacf1119e?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -858,9 +905,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:19 GMT + - Thu, 29 Sep 2022 07:47:21 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/operationResults/19399d4f-f276-4769-b09b-4b61abaa9dc1?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002/operationResults/f2710bd3-fd1d-48d7-be1e-53ccacf1119e?api-version=2022-08-15 pragma: - no-cache server: @@ -890,9 +937,9 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/19399d4f-f276-4769-b09b-4b61abaa9dc1?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/f2710bd3-fd1d-48d7-be1e-53ccacf1119e?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -904,7 +951,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:49 GMT + - Thu, 29 Sep 2022 07:47:52 GMT pragma: - no-cache server: @@ -936,12 +983,12 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"RzsTANMNtBQ=","_ts":1663659205,"_self":"dbs/RzsTAA==/colls/RzsTANMNtBQ=/","_etag":"\"00005a7e-0000-0200-0000-63296cc50000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_gremlin_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/gremlinDatabases/cli000003/graphs/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"EaUaAJ9dj2c=","_ts":1664437647,"_self":"dbs/EaUaAA==/colls/EaUaAJ9dj2c=/","_etag":"\"00000d00-0000-0200-0000-63354d8f0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' headers: cache-control: - no-store, no-cache @@ -950,7 +997,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:49 GMT + - Thu, 29 Sep 2022 07:47:53 GMT pragma: - no-cache server: @@ -982,15 +1029,15 @@ interactions: ParameterSetName: - --location --instance-id User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2ecfd574-0338-4282-88ff-de2010f3c8b2?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1?api-version=2022-08-15-preview response: body: - string: '{"name":"2ecfd574-0338-4282-88ff-de2010f3c8b2","location":"East US - 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2ecfd574-0338-4282-88ff-de2010f3c8b2","properties":{"accountName":"cli000004","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:31:51Z","oldestRestorableTime":"2022-09-20T07:31:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"1feb0106-d878-470e-99e7-244b72479a6d","creationTime":"2022-09-20T07:31:52Z"}]}}' + string: '{"name":"572c38e5-5506-42c7-986f-2faf4e6b22e1","location":"East US + 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1","properties":{"accountName":"cli000004","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:45:52Z","oldestRestorableTime":"2022-09-29T07:45:52Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"4208e04d-fda7-42f0-b1b2-3b7e3769cde7","creationTime":"2022-09-29T07:45:53Z"}]}}' headers: cache-control: - no-store, no-cache @@ -999,7 +1046,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:50 GMT + - Thu, 29 Sep 2022 07:47:53 GMT pragma: - no-cache server: @@ -1031,12 +1078,12 @@ interactions: ParameterSetName: - --location --instance-id User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2ecfd574-0338-4282-88ff-de2010f3c8b2/restorableGremlinDatabases?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1/restorableGremlinDatabases?api-version=2022-08-15-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2ecfd574-0338-4282-88ff-de2010f3c8b2/restorableGremlinDatabases/8ed205f4-b1d9-43a0-9c54-0f8f64cc3be1","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinDatabases","name":"8ed205f4-b1d9-43a0-9c54-0f8f64cc3be1","properties":{"resource":{"_rid":"f1LkvwAAAA==","eventTimestamp":"2022-09-20T07:32:53Z","ownerId":"cli000003","ownerResourceId":"RzsTAA==","operationType":"Create"}}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1/restorableGremlinDatabases/ed394665-0d6b-4a4b-8fff-b3a177707482","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinDatabases","name":"ed394665-0d6b-4a4b-8fff-b3a177707482","properties":{"resource":{"_rid":"PGhQZQAAAA==","eventTimestamp":"2022-09-29T07:46:54Z","ownerId":"cli000003","ownerResourceId":"EaUaAA==","operationType":"Create"}}}]}' headers: cache-control: - no-store, no-cache @@ -1045,7 +1092,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:52 GMT + - Thu, 29 Sep 2022 07:47:54 GMT pragma: - no-cache server: @@ -1077,12 +1124,12 @@ interactions: ParameterSetName: - --location --instance-id --database-rid User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2ecfd574-0338-4282-88ff-de2010f3c8b2/restorableGraphs?api-version=2022-02-15-preview&restorableGremlinDatabaseRid=RzsTAA%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1/restorableGraphs?api-version=2022-08-15-preview&restorableGremlinDatabaseRid=EaUaAA%3D%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2ecfd574-0338-4282-88ff-de2010f3c8b2/restorableGraphs/b2a8f31c-38f4-49e5-be3d-0e1f183eb507","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGraphs","name":"b2a8f31c-38f4-49e5-be3d-0e1f183eb507","properties":{"resource":{"_rid":"NGI7GAAAAA==","eventTimestamp":"2022-09-20T07:33:25Z","ownerId":"cli000002","ownerResourceId":"RzsTANMNtBQ=","operationType":"Create"}}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1/restorableGraphs/83b32904-c349-45b3-a770-8d93296c4fb5","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGraphs","name":"83b32904-c349-45b3-a770-8d93296c4fb5","properties":{"resource":{"_rid":"KhPVKQAAAA==","eventTimestamp":"2022-09-29T07:47:27Z","ownerId":"cli000002","ownerResourceId":"EaUaAJ9dj2c=","operationType":"Create"}}}]}' headers: cache-control: - no-store, no-cache @@ -1091,7 +1138,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:52 GMT + - Thu, 29 Sep 2022 07:47:55 GMT pragma: - no-cache server: @@ -1123,12 +1170,12 @@ interactions: ParameterSetName: - --restore-location -l --instance-id --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2ecfd574-0338-4282-88ff-de2010f3c8b2/restorableGremlinResources?api-version=2022-02-15-preview&restoreLocation=eastus2&restoreTimestampInUtc=2022-09-20T07%3A33%3A51%2B00%3A00 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1/restorableGremlinResources?api-version=2022-08-15-preview&restoreLocation=eastus2&restoreTimestampInUtc=2022-09-29T07%3A47%3A52%2B00%3A00 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2ecfd574-0338-4282-88ff-de2010f3c8b2/restorableGremlinResources/cli000003","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources","name":"cli000003","databaseName":"cli000003","graphNames":["cli000002"]}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1/restorableGremlinResources/cli000003","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources","name":"cli000003","databaseName":"cli000003","graphNames":["cli000002"]}]}' headers: cache-control: - no-store, no-cache @@ -1137,7 +1184,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:54 GMT + - Thu, 29 Sep 2022 07:49:56 GMT pragma: - no-cache server: diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongo_role.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongo_role.yaml index d0d26566678..0d493e424ec 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongo_role.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongo_role.yaml @@ -1,2524 +1,2571 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --kind --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_mongodb_role000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001","name":"cli_test_cosmosdb_mongodb_role000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '351' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 20 Sep 2022 07:28:08 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "westus2", "kind": "MongoDB", "properties": {"locations": - [{"locationName": "westus2", "failoverPriority": 0, "isZoneRedundant": false}], - "databaseAccountOfferType": "Standard", "capabilities": [{"name": "EnableMongoRoleBasedAccessControl"}], - "apiProperties": {}, "createMode": "Default"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - Content-Length: - - '302' - Content-Type: - - application/json - ParameterSetName: - - -n -g --kind --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002","name":"cli000002","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:11.1719806Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"16ae80a2-b03f-4047-86ab-2b3ff22a682d","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{},"writeLocations":[{"id":"cli000002-westus2","locationName":"West - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000002-westus2","locationName":"West - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000002-westus2","locationName":"West - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000002-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongoRoleBasedAccessControl"},{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Invalid"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/90cd2a73-3583-4ea7-91a8-3875dd7f4f68?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '2038' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:13 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/operationResults/90cd2a73-3583-4ea7-91a8-3875dd7f4f68?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --kind --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/90cd2a73-3583-4ea7-91a8-3875dd7f4f68?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:43 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --kind --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/90cd2a73-3583-4ea7-91a8-3875dd7f4f68?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:29:13 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --kind --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/90cd2a73-3583-4ea7-91a8-3875dd7f4f68?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:29:43 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --kind --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/90cd2a73-3583-4ea7-91a8-3875dd7f4f68?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --kind --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/90cd2a73-3583-4ea7-91a8-3875dd7f4f68?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:44 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --kind --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/90cd2a73-3583-4ea7-91a8-3875dd7f4f68?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --kind --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002","name":"cli000002","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:42.0416165Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000002.documents.azure.com:443/","mongoEndpoint":"https://cli000002.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"16ae80a2-b03f-4047-86ab-2b3ff22a682d","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000002-westus2","locationName":"West - US 2","documentEndpoint":"https://cli000002-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000002-westus2","locationName":"West - US 2","documentEndpoint":"https://cli000002-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000002-westus2","locationName":"West - US 2","documentEndpoint":"https://cli000002-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000002-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongoRoleBasedAccessControl"},{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2425' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --kind --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002","name":"cli000002","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:42.0416165Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000002.documents.azure.com:443/","mongoEndpoint":"https://cli000002.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"16ae80a2-b03f-4047-86ab-2b3ff22a682d","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000002-westus2","locationName":"West - US 2","documentEndpoint":"https://cli000002-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000002-westus2","locationName":"West - US 2","documentEndpoint":"https://cli000002-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000002-westus2","locationName":"West - US 2","documentEndpoint":"https://cli000002-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000002-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongoRoleBasedAccessControl"},{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2425' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"id": "cli000003"}, "options": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb database create - Connection: - - keep-alive - Content-Length: - - '64' - Content-Type: - - application/json - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbDatabases/cli000003?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/96e43675-e84a-46bb-938b-6a8bb1fb5314?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:15 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbDatabases/cli000003/operationResults/96e43675-e84a-46bb-938b-6a8bb1fb5314?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb database create - Connection: - - keep-alive - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/96e43675-e84a-46bb-938b-6a8bb1fb5314?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:45 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb database create - Connection: - - keep-alive - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbDatabases/cli000003?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '325' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:45 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"roleName": "my_role_def1", "type": "CustomRole", "databaseName": - "cli000003", "privileges": [{"resource": {"db": "cli000003", "collection": "test"}, - "actions": ["insert", "find"]}], "roles": []}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition create - Connection: - - keep-alive - Content-Length: - - '212' - Content-Type: - - application/json - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/randomid?api-version=2022-02-15-preview - response: - body: - string: '{"code":"BadRequest","message":"A Mongo Role Definition with given - ID [randomid] id not valid. The Mongo role definition should follow the format - dbName.roleName for database '''' and roleName ''''\r\nActivityId: 4882ea3b-38b6-11ed-9b71-8cdcd4532c5b, - Microsoft.Azure.Documents.Common/2.14.0"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '288' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:47 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 400 - message: BadRequest -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -a -i --yes - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-02-15-preview - response: - body: - string: '' - headers: - cache-control: - - no-store, no-cache - date: - - Tue, 20 Sep 2022 07:31:49 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-activity-id: - - 49634379-38b6-11ed-a94d-8cdcd4532c5b - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition list - Connection: - - keep-alive - ParameterSetName: - - -g -a - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions?api-version=2022-02-15-preview - response: - body: - string: '{"value":[]}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '12' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:50 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"roleName": "my_role_def1", "type": "CustomRole", "databaseName": - "cli000003", "privileges": [{"resource": {"db": "cli000003", "collection": "test"}, - "actions": ["insert", "find"]}], "roles": []}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition create - Connection: - - keep-alive - Content-Length: - - '212' - Content-Type: - - application/json - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/271cbad8-fc9a-4dd5-a719-88fc7c2d1ac8?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:51 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1/operationResults/271cbad8-fc9a-4dd5-a719-88fc7c2d1ac8?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition create - Connection: - - keep-alive - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/271cbad8-fc9a-4dd5-a719-88fc7c2d1ac8?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:32:22 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition create - Connection: - - keep-alive - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert","find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '491' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:32:22 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition exists - Connection: - - keep-alive - ParameterSetName: - - -g -a -i - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert","find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '491' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:32:23 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition show - Connection: - - keep-alive - ParameterSetName: - - -g -a -i - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert","find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '491' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:32:23 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition update - Connection: - - keep-alive - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert","find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '491' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:32:24 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"roleName": "my_role_def1", "type": "CustomRole", "databaseName": - "cli000003", "privileges": [{"resource": {"db": "cli000003", "collection": "test"}, - "actions": ["find"]}], "roles": []}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition update - Connection: - - keep-alive - Content-Length: - - '202' - Content-Type: - - application/json - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d41bc549-c0a3-4dec-a257-fcb81c8526c6?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:32:26 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1/operationResults/d41bc549-c0a3-4dec-a257-fcb81c8526c6?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition update - Connection: - - keep-alive - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d41bc549-c0a3-4dec-a257-fcb81c8526c6?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:32:56 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition update - Connection: - - keep-alive - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '482' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:32:57 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -a -i --yes - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2?api-version=2022-02-15-preview - response: - body: - string: '' - headers: - cache-control: - - no-store, no-cache - date: - - Tue, 20 Sep 2022 07:32:58 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-activity-id: - - 728d5cd0-38b6-11ed-b0f9-8cdcd4532c5b - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition list - Connection: - - keep-alive - ParameterSetName: - - -g -a - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions?api-version=2022-02-15-preview - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}]}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '494' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:32:58 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"roleName": "my_role_def2", "type": "CustomRole", "databaseName": - "cli000003", "privileges": [{"resource": {"db": "cli000003", "collection": "test"}, - "actions": ["insert"]}], "roles": [{"db": "cli000003", "role": "my_role_def1"}]}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition create - Connection: - - keep-alive - Content-Length: - - '247' - Content-Type: - - application/json - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/2b2da1d6-1ade-478f-9010-6bab76d5ffde?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:33:00 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2/operationResults/2b2da1d6-1ade-478f-9010-6bab76d5ffde?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition create - Connection: - - keep-alive - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/2b2da1d6-1ade-478f-9010-6bab76d5ffde?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:33:29 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition create - Connection: - - keep-alive - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2","name":"my_role_def2","properties":{"roleName":"my_role_def2","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert"]}],"roles":[{"db":"cli000003","role":"my_role_def1"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '524' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:33:30 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition list - Connection: - - keep-alive - ParameterSetName: - - -g -a - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions?api-version=2022-02-15-preview - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2","name":"my_role_def2","properties":{"roleName":"my_role_def2","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert"]}],"roles":[{"db":"cli000003","role":"my_role_def1"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}]}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '1019' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:33:31 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"userName": "testUser", "password": "MyPass", "databaseName": - "cli000003", "customData": "MyCustomData", "roles": [{"db": "cli000003", "role": - "my_role_def1"}], "mechanisms": "SCRAM-SHA-256"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition create - Connection: - - keep-alive - Content-Length: - - '208' - Content-Type: - - application/json - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/randomuserid?api-version=2022-02-15-preview - response: - body: - string: '{"code":"BadRequest","message":"A Mongo User Definition with given - ID [randomuserid] id not valid. The Mongo User Definition should follow the - format dbName.userName for database '''' and userName ''''\r\nActivityId: - 8754d5e8-38b6-11ed-b44d-8cdcd4532c5b, Microsoft.Azure.Documents.Common/2.14.0"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '292' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:33:33 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 400 - message: BadRequest -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -a -i --yes - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-02-15-preview - response: - body: - string: '' - headers: - cache-control: - - no-store, no-cache - date: - - Tue, 20 Sep 2022 07:33:35 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-activity-id: - - 88cda4ed-38b6-11ed-ae7c-8cdcd4532c5b - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition list - Connection: - - keep-alive - ParameterSetName: - - -g -a - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions?api-version=2022-02-15-preview - response: - body: - string: '{"value":[]}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '12' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:33:36 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"userName": "testUser", "password": "MyPass", "databaseName": - "cli000003", "customData": "MyCustomData", "roles": [{"db": "cli000003", "role": - "my_role_def1"}], "mechanisms": "SCRAM-SHA-256"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition create - Connection: - - keep-alive - Content-Length: - - '208' - Content-Type: - - application/json - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e9f1404e-63af-4237-9be3-83f023a61b3a?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:33:38 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser/operationResults/e9f1404e-63af-4237-9be3-83f023a61b3a?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition create - Connection: - - keep-alive - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/e9f1404e-63af-4237-9be3-83f023a61b3a?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:34:08 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition create - Connection: - - keep-alive - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser","name":"testUser","properties":{"userName":"testUser","password":"","databaseName":"cli000003","customData":"","mechanisms":"SCRAM-SHA-256","roles":[{"db":"cli000003","role":"my_role_def1"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '474' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:34:08 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition exists - Connection: - - keep-alive - ParameterSetName: - - -g -a -i - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser","name":"testUser","properties":{"userName":"testUser","password":"","databaseName":"cli000003","customData":"","mechanisms":"SCRAM-SHA-256","roles":[{"db":"cli000003","role":"my_role_def1"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '474' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:34:09 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition show - Connection: - - keep-alive - ParameterSetName: - - -g -a -i - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser","name":"testUser","properties":{"userName":"testUser","password":"","databaseName":"cli000003","customData":"","mechanisms":"SCRAM-SHA-256","roles":[{"db":"cli000003","role":"my_role_def1"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '474' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:34:09 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition update - Connection: - - keep-alive - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser","name":"testUser","properties":{"userName":"testUser","password":"","databaseName":"cli000003","customData":"","mechanisms":"SCRAM-SHA-256","roles":[{"db":"cli000003","role":"my_role_def1"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '474' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:34:11 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"userName": "testUser", "password": "MyPass", "databaseName": - "cli000003", "customData": "MyCustomData", "roles": [{"db": "cli000003", "role": - "my_role_def2"}], "mechanisms": "SCRAM-SHA-256"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition update - Connection: - - keep-alive - Content-Length: - - '208' - Content-Type: - - application/json - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/3034c912-6e04-413f-ac05-49d7f01b6b86?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:34:12 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser/operationResults/3034c912-6e04-413f-ac05-49d7f01b6b86?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition update - Connection: - - keep-alive - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/3034c912-6e04-413f-ac05-49d7f01b6b86?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:34:42 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition update - Connection: - - keep-alive - ParameterSetName: - - -g -a -b - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser","name":"testUser","properties":{"userName":"testUser","password":"","databaseName":"cli000003","customData":"","mechanisms":"SCRAM-SHA-256","roles":[{"db":"cli000003","role":"my_role_def2"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '474' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:34:42 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition list - Connection: - - keep-alive - ParameterSetName: - - -g -a - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions?api-version=2022-02-15-preview - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser","name":"testUser","properties":{"userName":"testUser","password":"","databaseName":"cli000003","customData":"","mechanisms":"SCRAM-SHA-256","roles":[{"db":"cli000003","role":"my_role_def2"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"}]}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '486' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:34:44 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -a -i --yes - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/189ca03b-cdfa-498c-89ca-8ebf3ffe1ae2?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:34:45 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser/operationResults/189ca03b-cdfa-498c-89ca-8ebf3ffe1ae2?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition delete - Connection: - - keep-alive - ParameterSetName: - - -g -a -i --yes - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/189ca03b-cdfa-498c-89ca-8ebf3ffe1ae2?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:35:16 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb user definition list - Connection: - - keep-alive - ParameterSetName: - - -g -a - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions?api-version=2022-02-15-preview - response: - body: - string: '{"value":[]}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '12' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:35:17 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -a -i --yes - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/de3d2503-ad55-489a-9eb2-c525387e997d?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:35:18 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1/operationResults/de3d2503-ad55-489a-9eb2-c525387e997d?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-deletes: - - '14998' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition delete - Connection: - - keep-alive - ParameterSetName: - - -g -a -i --yes - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/de3d2503-ad55-489a-9eb2-c525387e997d?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:35:48 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition list - Connection: - - keep-alive - ParameterSetName: - - -g -a - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions?api-version=2022-02-15-preview - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2","name":"my_role_def2","properties":{"roleName":"my_role_def2","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}]}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '496' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:35:50 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -a -i --yes - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/9f482f6d-1c75-4076-b2d7-99fdd0c6c8ba?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:35:51 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2/operationResults/9f482f6d-1c75-4076-b2d7-99fdd0c6c8ba?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition delete - Connection: - - keep-alive - ParameterSetName: - - -g -a -i --yes - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/9f482f6d-1c75-4076-b2d7-99fdd0c6c8ba?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:36:21 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb role definition list - Connection: - - keep-alive - ParameterSetName: - - -g -a - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions?api-version=2022-02-15-preview - response: - body: - string: '{"value":[]}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '12' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:36:22 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -version: 1 +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_mongodb_role000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001","name":"cli_test_cosmosdb_mongodb_role000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:53:50Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '351' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:53:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "kind": "MongoDB", "properties": {"locations": + [{"locationName": "westus2", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "capabilities": [{"name": "EnableMongoRoleBasedAccessControl"}], + "apiProperties": {}, "createMode": "Default"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '302' + Content-Type: + - application/json + ParameterSetName: + - -n -g --kind --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002","name":"cli000002","location":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:53:57.2661214Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"14416b31-dccd-477d-b1b4-246e9c2b3de0","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{},"writeLocations":[{"id":"cli000002-westus2","locationName":"West + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000002-westus2","locationName":"West + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000002-westus2","locationName":"West + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000002-westus2","locationName":"West + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongoRoleBasedAccessControl"},{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Invalid"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:53:57.2661214Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:53:57.2661214Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:53:57.2661214Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:53:57.2661214Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/9f082596-f283-4c6a-9490-39d550cb4f61?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2465' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:53:59 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/operationResults/9f082596-f283-4c6a-9490-39d550cb4f61?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/9f082596-f283-4c6a-9490-39d550cb4f61?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:54:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/9f082596-f283-4c6a-9490-39d550cb4f61?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:55:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/9f082596-f283-4c6a-9490-39d550cb4f61?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:55:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/9f082596-f283-4c6a-9490-39d550cb4f61?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:55:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/9f082596-f283-4c6a-9490-39d550cb4f61?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:56:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/9f082596-f283-4c6a-9490-39d550cb4f61?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:56:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/9f082596-f283-4c6a-9490-39d550cb4f61?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002","name":"cli000002","location":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:56:49.334111Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000002.documents.azure.com:443/","mongoEndpoint":"https://cli000002.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"14416b31-dccd-477d-b1b4-246e9c2b3de0","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000002-westus2","locationName":"West + US 2","documentEndpoint":"https://cli000002-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000002-westus2","locationName":"West + US 2","documentEndpoint":"https://cli000002-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000002-westus2","locationName":"West + US 2","documentEndpoint":"https://cli000002-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000002-westus2","locationName":"West + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongoRoleBasedAccessControl"},{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:56:49.334111Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:56:49.334111Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:56:49.334111Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:56:49.334111Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2847' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002","name":"cli000002","location":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:56:49.334111Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000002.documents.azure.com:443/","mongoEndpoint":"https://cli000002.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"14416b31-dccd-477d-b1b4-246e9c2b3de0","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000002-westus2","locationName":"West + US 2","documentEndpoint":"https://cli000002-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000002-westus2","locationName":"West + US 2","documentEndpoint":"https://cli000002-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000002-westus2","locationName":"West + US 2","documentEndpoint":"https://cli000002-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000002-westus2","locationName":"West + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongoRoleBasedAccessControl"},{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:56:49.334111Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:56:49.334111Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:56:49.334111Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:56:49.334111Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2847' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000003"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbDatabases/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/899074f1-b25e-4371-8219-57fd94663cae?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:31 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbDatabases/cli000003/operationResults/899074f1-b25e-4371-8219-57fd94663cae?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/899074f1-b25e-4371-8219-57fd94663cae?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbDatabases/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '325' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"roleName": "my_role_def1", "type": "CustomRole", "databaseName": + "cli000003", "privileges": [{"resource": {"db": "cli000003", "collection": "test"}, + "actions": ["insert", "find"]}], "roles": []}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition create + Connection: + - keep-alive + Content-Length: + - '212' + Content-Type: + - application/json + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/randomid?api-version=2022-08-15-preview + response: + body: + string: '{"code":"BadRequest","message":"A Mongo Role Definition with given + ID [randomid] id not valid. The Mongo role definition should follow the format + dbName.roleName for database '''' and roleName ''''\r\nActivityId: 707e8187-3fcc-11ed-8a03-9c7bef4baa38, + Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '288' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:03 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 400 + message: BadRequest +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -i --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-08-15-preview + response: + body: + string: '' + headers: + cache-control: + - no-store, no-cache + date: + - Thu, 29 Sep 2022 07:58:04 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-activity-id: + - 7144844b-3fcc-11ed-8ec4-9c7bef4baa38 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions?api-version=2022-08-15-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:05 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"roleName": "my_role_def1", "type": "CustomRole", "databaseName": + "cli000003", "privileges": [{"resource": {"db": "cli000003", "collection": "test"}, + "actions": ["insert", "find"]}], "roles": []}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition create + Connection: + - keep-alive + Content-Length: + - '212' + Content-Type: + - application/json + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1245b62b-23e5-47cc-9437-d3a9a6c6c894?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:07 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1/operationResults/1245b62b-23e5-47cc-9437-d3a9a6c6c894?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition create + Connection: + - keep-alive + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1245b62b-23e5-47cc-9437-d3a9a6c6c894?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:37 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition create + Connection: + - keep-alive + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert","find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '491' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:37 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -i + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert","find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '491' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition show + Connection: + - keep-alive + ParameterSetName: + - -g -a -i + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert","find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '491' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition update + Connection: + - keep-alive + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert","find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '491' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"roleName": "my_role_def1", "type": "CustomRole", "databaseName": + "cli000003", "privileges": [{"resource": {"db": "cli000003", "collection": "test"}, + "actions": ["find"]}], "roles": []}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition update + Connection: + - keep-alive + Content-Length: + - '202' + Content-Type: + - application/json + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/85aaf877-67c5-4525-a24b-2df9764a7645?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:41 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1/operationResults/85aaf877-67c5-4525-a24b-2df9764a7645?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition update + Connection: + - keep-alive + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/85aaf877-67c5-4525-a24b-2df9764a7645?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:11 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition update + Connection: + - keep-alive + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '482' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:11 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -i --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2?api-version=2022-08-15-preview + response: + body: + string: '' + headers: + cache-control: + - no-store, no-cache + date: + - Thu, 29 Sep 2022 07:59:13 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-activity-id: + - 9a42e328-3fcc-11ed-896a-9c7bef4baa38 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '494' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:14 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"roleName": "my_role_def2", "type": "CustomRole", "databaseName": + "cli000003", "privileges": [{"resource": {"db": "cli000003", "collection": "test"}, + "actions": ["insert"]}], "roles": [{"db": "cli000003", "role": "my_role_def1"}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition create + Connection: + - keep-alive + Content-Length: + - '247' + Content-Type: + - application/json + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/853bf1ef-ea0c-4cad-9219-acb7dc50686d?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:15 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2/operationResults/853bf1ef-ea0c-4cad-9219-acb7dc50686d?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition create + Connection: + - keep-alive + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/853bf1ef-ea0c-4cad-9219-acb7dc50686d?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition create + Connection: + - keep-alive + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2","name":"my_role_def2","properties":{"roleName":"my_role_def2","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert"]}],"roles":[{"db":"cli000003","role":"my_role_def1"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '524' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1","name":"my_role_def1","properties":{"roleName":"my_role_def1","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["find"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2","name":"my_role_def2","properties":{"roleName":"my_role_def2","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert"]}],"roles":[{"db":"cli000003","role":"my_role_def1"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1019' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"userName": "testUser", "password": "MyPass", "databaseName": + "cli000003", "customData": "MyCustomData", "roles": [{"db": "cli000003", "role": + "my_role_def1"}], "mechanisms": "SCRAM-SHA-256"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition create + Connection: + - keep-alive + Content-Length: + - '208' + Content-Type: + - application/json + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/randomuserid?api-version=2022-08-15-preview + response: + body: + string: '{"code":"BadRequest","message":"A Mongo User Definition with given + ID [randomuserid] id not valid. The Mongo User Definition should follow the + format dbName.userName for database '''' and userName ''''\r\nActivityId: + af4ee14b-3fcc-11ed-98cc-9c7bef4baa38, Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '292' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:49 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 400 + message: BadRequest +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -i --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-08-15-preview + response: + body: + string: '' + headers: + cache-control: + - no-store, no-cache + date: + - Thu, 29 Sep 2022 07:59:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-activity-id: + - aff33ec0-3fcc-11ed-98e3-9c7bef4baa38 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions?api-version=2022-08-15-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"userName": "testUser", "password": "MyPass", "databaseName": + "cli000003", "customData": "MyCustomData", "roles": [{"db": "cli000003", "role": + "my_role_def1"}], "mechanisms": "SCRAM-SHA-256"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition create + Connection: + - keep-alive + Content-Length: + - '208' + Content-Type: + - application/json + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/00f51ec2-7d2b-4cd8-9c8e-ad543065b6a6?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:52 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser/operationResults/00f51ec2-7d2b-4cd8-9c8e-ad543065b6a6?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition create + Connection: + - keep-alive + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/00f51ec2-7d2b-4cd8-9c8e-ad543065b6a6?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition create + Connection: + - keep-alive + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser","name":"testUser","properties":{"userName":"testUser","password":"","databaseName":"cli000003","customData":"","mechanisms":"SCRAM-SHA-256","roles":[{"db":"cli000003","role":"my_role_def1"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '474' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -i + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser","name":"testUser","properties":{"userName":"testUser","password":"","databaseName":"cli000003","customData":"","mechanisms":"SCRAM-SHA-256","roles":[{"db":"cli000003","role":"my_role_def1"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '474' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:24 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition show + Connection: + - keep-alive + ParameterSetName: + - -g -a -i + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser","name":"testUser","properties":{"userName":"testUser","password":"","databaseName":"cli000003","customData":"","mechanisms":"SCRAM-SHA-256","roles":[{"db":"cli000003","role":"my_role_def1"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '474' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition update + Connection: + - keep-alive + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser","name":"testUser","properties":{"userName":"testUser","password":"","databaseName":"cli000003","customData":"","mechanisms":"SCRAM-SHA-256","roles":[{"db":"cli000003","role":"my_role_def1"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '474' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"userName": "testUser", "password": "MyPass", "databaseName": + "cli000003", "customData": "MyCustomData", "roles": [{"db": "cli000003", "role": + "my_role_def2"}], "mechanisms": "SCRAM-SHA-256"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition update + Connection: + - keep-alive + Content-Length: + - '208' + Content-Type: + - application/json + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/50023b4d-ebe2-4656-a3b2-50af312856a9?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:28 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser/operationResults/50023b4d-ebe2-4656-a3b2-50af312856a9?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition update + Connection: + - keep-alive + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/50023b4d-ebe2-4656-a3b2-50af312856a9?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition update + Connection: + - keep-alive + ParameterSetName: + - -g -a -b + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser","name":"testUser","properties":{"userName":"testUser","password":"","databaseName":"cli000003","customData":"","mechanisms":"SCRAM-SHA-256","roles":[{"db":"cli000003","role":"my_role_def2"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '474' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser","name":"testUser","properties":{"userName":"testUser","password":"","databaseName":"cli000003","customData":"","mechanisms":"SCRAM-SHA-256","roles":[{"db":"cli000003","role":"my_role_def2"}]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '486' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -i --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d06a8232-c6c8-4b53-9054-29f22140f09f?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:02 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions/cli000003.testUser/operationResults/d06a8232-c6c8-4b53-9054-29f22140f09f?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -i --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/d06a8232-c6c8-4b53-9054-29f22140f09f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb user definition list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbUserDefinitions?api-version=2022-08-15-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -i --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/491931f4-df1d-4ceb-82b6-1203b8f686c3?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:35 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def1/operationResults/491931f4-df1d-4ceb-82b6-1203b8f686c3?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -i --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/491931f4-df1d-4ceb-82b6-1203b8f686c3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:02:05 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2","name":"my_role_def2","properties":{"roleName":"my_role_def2","type":1,"databaseName":"cli000003","privileges":[{"resource":{"db":"cli000003","collection":"test"},"actions":["insert"]}],"roles":[]},"type":"Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '496' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:02:06 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -i --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/561f2b87-fcab-46d8-a60d-1d728852d6dd?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:02:08 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions/cli000003.my_role_def2/operationResults/561f2b87-fcab-46d8-a60d-1d728852d6dd?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -i --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/561f2b87-fcab-46d8-a60d-1d728852d6dd?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:02:38 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb role definition list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_role000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000002/mongodbRoleDefinitions?api-version=2022-08-15-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:02:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection.yaml new file mode 100644 index 00000000000..6922121b731 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection.yaml @@ -0,0 +1,1191 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_mongodb_collection000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001","name":"cli_test_cosmosdb_mongodb_collection000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:03:48Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '362' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:03:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "MongoDB", "properties": {"locations": [{"locationName": + "WestUS", "failoverPriority": 0, "isZoneRedundant": false}], "databaseAccountOfferType": + "Standard", "apiProperties": {"serverVersion": "3.6"}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '355' + Content-Type: + - application/json + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:03:56.381259Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:03:56.381259Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:03:56.381259Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:03:56.381259Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:03:56.381259Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fb08b4cd-7b03-4e64-9325-722f210dba6a?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2359' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:03:58 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/fb08b4cd-7b03-4e64-9325-722f210dba6a?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fb08b4cd-7b03-4e64-9325-722f210dba6a?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:04:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fb08b4cd-7b03-4e64-9325-722f210dba6a?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:04:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fb08b4cd-7b03-4e64-9325-722f210dba6a?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:05:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fb08b4cd-7b03-4e64-9325-722f210dba6a?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:05:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fb08b4cd-7b03-4e64-9325-722f210dba6a?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fb08b4cd-7b03-4e64-9325-722f210dba6a?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fb08b4cd-7b03-4e64-9325-722f210dba6a?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fb08b4cd-7b03-4e64-9325-722f210dba6a?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fb08b4cd-7b03-4e64-9325-722f210dba6a?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:07:44.3034226Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","mongoEndpoint":"https://cli000003.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:07:44.3034226Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:07:44.3034226Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:07:44.3034226Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:07:44.3034226Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2752' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:07:44.3034226Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","mongoEndpoint":"https://cli000003.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:07:44.3034226Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:07:44.3034226Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:07:44.3034226Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:07:44.3034226Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2752' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000004"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a8202eb9-847b-45e1-98d1-b9baf733a2c8?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:30 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/operationResults/a8202eb9-847b-45e1-98d1-b9baf733a2c8?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a8202eb9-847b-45e1-98d1-b9baf733a2c8?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000004","properties":{"resource":{"id":"cli000004"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '331' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ec476cd5-d795-41b6-b40b-fd06e331e9ba?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:01 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002/operationResults/ec476cd5-d795-41b6-b40b-fd06e331e9ba?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ec476cd5-d795-41b6-b40b-fd06e331e9ba?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '402' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '402' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '402' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/invalid?api-version=2022-08-15 + response: + body: + string: '{"code":"NotFound","message":"The collection ''cli000004''.''invalid'' + doesn''t exist.\r\nActivityId: aaf12f0e-3fc5-11ed-be44-9c7bef4baa38, Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '176' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 404 + message: NotFound +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","indexes":[{"key":{"keys":["_id"]}}]}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '414' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:35 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/f19335db-48b2-4669-9e8f-07866b505714?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:35 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002/operationResults/f19335db-48b2-4669-9e8f-07866b505714?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/f19335db-48b2-4669-9e8f-07866b505714?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:06 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection_adaptiveru.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection_adaptiveru.yaml index 5f78de35b62..b08aae5ac57 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection_adaptiveru.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection_adaptiveru.yaml @@ -1,1203 +1,1203 @@ -interactions: -- request: - body: '{"properties": {"resource": {"id": "cli000003"}, "options": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb database create - Connection: - - keep-alive - Content-Length: - - '64' - Content-Type: - - application/json - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6ccddcc3-b107-43ff-97b1-68a69f5e1d6a?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:38:43 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/operationResults/6ccddcc3-b107-43ff-97b1-68a69f5e1d6a?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb database create - Connection: - - keep-alive - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6ccddcc3-b107-43ff-97b1-68a69f5e1d6a?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:39:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb database create - Connection: - - keep-alive - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '303' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:39:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"id": "cli000002", "shardKey": {"theShardKey": - "Hash"}}, "options": {"throughput": 18000}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection create - Connection: - - keep-alive - Content-Length: - - '120' - Content-Type: - - application/json - ParameterSetName: - - -g -a -d -n --shard --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0895ef6b-fe61-484f-ac72-32357b77a260?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:39:16 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/operationResults/0895ef6b-fe61-484f-ac72-32357b77a260?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection create - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n --shard --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0895ef6b-fe61-484f-ac72-32357b77a260?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:39:46 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection create - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n --shard --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '408' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:39:46 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"throughput": 3000}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection throughput update - Connection: - - keep-alive - Content-Length: - - '50' - Content-Type: - - application/json - ParameterSetName: - - -g -a -d -n --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/4593b4a6-1218-4224-9000-f344c94856ed?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:39:48 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/operationResults/4593b4a6-1218-4224-9000-f344c94856ed?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection throughput update - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/4593b4a6-1218-4224-9000-f344c94856ed?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:19 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection throughput update - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings","name":"dflB","properties":{"resource":{"throughput":3000,"minimumThroughput":"400"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '405' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:19 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection retrieve-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --all-partitions - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '408' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:21 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"physicalPartitionIds": [{"id": "-1"}]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection retrieve-partition-throughput - Connection: - - keep-alive - Content-Length: - - '70' - Content-Type: - - application/json - ParameterSetName: - - --resource-group --account-name --database-name --name --all-partitions - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e28df892-23f5-4faf-97ed-8f06305c05d5?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:21 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/e28df892-23f5-4faf-97ed-8f06305c05d5?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection retrieve-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --all-partitions - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e28df892-23f5-4faf-97ed-8f06305c05d5?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:51 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection retrieve-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --all-partitions - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/e28df892-23f5-4faf-97ed-8f06305c05d5?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings/retrieveThroughputDistribution","name":"dflB","properties":{"resource":{}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '424' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:51 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection retrieve-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --physical-partition-ids - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '408' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:53 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"physicalPartitionIds": [{"id": "0"}, {"id": - "1"}]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection retrieve-partition-throughput - Connection: - - keep-alive - Content-Length: - - '82' - Content-Type: - - application/json - ParameterSetName: - - --resource-group --account-name --database-name --name --physical-partition-ids - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5001ab23-ef72-4a1f-9813-836674c82623?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:54 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/5001ab23-ef72-4a1f-9813-836674c82623?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection retrieve-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --physical-partition-ids - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5001ab23-ef72-4a1f-9813-836674c82623?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:41:24 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection retrieve-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --physical-partition-ids - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/5001ab23-ef72-4a1f-9813-836674c82623?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings/retrieveThroughputDistribution","name":"dflB","properties":{"resource":{}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '424' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:41:24 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection redistribute-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --target-partition-info - --source-partition-info - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '408' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:41:25 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"throughputPolicy": "custom", "targetPhysicalPartitionThroughputInfo": - [{"id": "0", "throughput": 1200.0}, {"id": "1", "throughput": 1200.0}], "sourcePhysicalPartitionThroughputInfo": - [{"id": "2", "throughput": 0.0}]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection redistribute-partition-throughput - Connection: - - keep-alive - Content-Length: - - '248' - Content-Type: - - application/json - ParameterSetName: - - --resource-group --account-name --database-name --name --target-partition-info - --source-partition-info - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b303efc6-20f8-4f37-ac2b-0e016a08fdee?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:41:26 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput/operationResults/b303efc6-20f8-4f37-ac2b-0e016a08fdee?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection redistribute-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --target-partition-info - --source-partition-info - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b303efc6-20f8-4f37-ac2b-0e016a08fdee?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:41:56 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection redistribute-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --target-partition-info - --source-partition-info - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput/operationResults/b303efc6-20f8-4f37-ac2b-0e016a08fdee?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings/redistributeThroughput","name":"dflB","properties":{"resource":{}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '408' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:41:56 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection redistribute-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --evenly-distribute - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '408' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:41:58 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"throughputPolicy": "equal", "targetPhysicalPartitionThroughputInfo": - [], "sourcePhysicalPartitionThroughputInfo": []}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection redistribute-partition-throughput - Connection: - - keep-alive - Content-Length: - - '149' - Content-Type: - - application/json - ParameterSetName: - - --resource-group --account-name --database-name --name --evenly-distribute - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/dcb43bdb-f7cf-4faa-b0ef-a57337e13e25?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:41:59 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput/operationResults/dcb43bdb-f7cf-4faa-b0ef-a57337e13e25?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection redistribute-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --evenly-distribute - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/dcb43bdb-f7cf-4faa-b0ef-a57337e13e25?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:42:28 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection redistribute-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --evenly-distribute - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput/operationResults/dcb43bdb-f7cf-4faa-b0ef-a57337e13e25?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings/redistributeThroughput","name":"dflB","properties":{"resource":{}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '408' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:42:29 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -version: 1 +interactions: +- request: + body: '{"properties": {"resource": {"id": "cli000003"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/3ef9a198-af88-44a0-a291-5a44623774ce?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:56:56 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/operationResults/3ef9a198-af88-44a0-a291-5a44623774ce?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/3ef9a198-af88-44a0-a291-5a44623774ce?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '299' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002", "shardKey": {"theShardKey": + "Hash"}}, "options": {"throughput": 18000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + Content-Length: + - '120' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --shard --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/7a5120ba-a596-4f6c-96fc-d60237d4fb71?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:28 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/operationResults/7a5120ba-a596-4f6c-96fc-d60237d4fb71?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --shard --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/7a5120ba-a596-4f6c-96fc-d60237d4fb71?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --shard --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '404' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"throughput": 3000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection throughput update + Connection: + - keep-alive + Content-Length: + - '50' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/b83c38f5-a2d7-496c-a8a8-92d3d5808a44?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:00 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/operationResults/b83c38f5-a2d7-496c-a8a8-92d3d5808a44?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection throughput update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/b83c38f5-a2d7-496c-a8a8-92d3d5808a44?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection throughput update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings","name":"foFh","properties":{"resource":{"throughput":3000,"minimumThroughput":"400"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '401' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection retrieve-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --all-partitions + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '404' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"physicalPartitionIds": [{"id": "-1"}]}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection retrieve-partition-throughput + Connection: + - keep-alive + Content-Length: + - '70' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --account-name --database-name --name --all-partitions + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/0875d053-ac79-454f-915c-c1abf241bcc1?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:32 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/0875d053-ac79-454f-915c-c1abf241bcc1?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection retrieve-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --all-partitions + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/0875d053-ac79-454f-915c-c1abf241bcc1?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection retrieve-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --all-partitions + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/0875d053-ac79-454f-915c-c1abf241bcc1?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings/retrieveThroughputDistribution","name":"foFh","properties":{"resource":{"physicalPartitionThroughputInfo":[{"throughput":1000.0,"id":"0"},{"throughput":1000.0,"id":"1"},{"throughput":1000.0,"id":"2"}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '548' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection retrieve-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --physical-partition-ids + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '404' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:04 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"physicalPartitionIds": [{"id": "0"}, {"id": + "1"}]}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection retrieve-partition-throughput + Connection: + - keep-alive + Content-Length: + - '82' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --account-name --database-name --name --physical-partition-ids + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/44db55a9-652e-4ba2-910e-d3c0818d891e?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:05 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/44db55a9-652e-4ba2-910e-d3c0818d891e?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection retrieve-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --physical-partition-ids + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/44db55a9-652e-4ba2-910e-d3c0818d891e?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection retrieve-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --physical-partition-ids + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/44db55a9-652e-4ba2-910e-d3c0818d891e?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/retrieveThroughputDistribution","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings/retrieveThroughputDistribution","name":"foFh","properties":{"resource":{"physicalPartitionThroughputInfo":[{"throughput":1000.0,"id":"0"},{"throughput":1000.0,"id":"1"}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '517' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:35 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection redistribute-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --target-partition-info + --source-partition-info + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '404' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:37 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"throughputPolicy": "custom", "targetPhysicalPartitionThroughputInfo": + [{"id": "0", "throughput": 1200.0}, {"id": "1", "throughput": 1200.0}], "sourcePhysicalPartitionThroughputInfo": + [{"id": "2", "throughput": 0.0}]}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection redistribute-partition-throughput + Connection: + - keep-alive + Content-Length: + - '248' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --account-name --database-name --name --target-partition-info + --source-partition-info + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/c5880f20-1b07-4a15-9371-58418c698541?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:37 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput/operationResults/c5880f20-1b07-4a15-9371-58418c698541?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection redistribute-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --target-partition-info + --source-partition-info + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/c5880f20-1b07-4a15-9371-58418c698541?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:08 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection redistribute-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --target-partition-info + --source-partition-info + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput/operationResults/c5880f20-1b07-4a15-9371-58418c698541?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings/redistributeThroughput","name":"foFh","properties":{"resource":{"physicalPartitionThroughputInfo":[{"throughput":1200.0,"id":"0"},{"throughput":1200.0,"id":"1"},{"throughput":599.99999999999966,"id":"2"}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '544' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:08 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection redistribute-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --evenly-distribute + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '404' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:09 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"throughputPolicy": "equal", "targetPhysicalPartitionThroughputInfo": + [], "sourcePhysicalPartitionThroughputInfo": []}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection redistribute-partition-throughput + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --account-name --database-name --name --evenly-distribute + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/66d83d7e-b20f-49d8-87a0-54a469dd704f?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:09 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput/operationResults/66d83d7e-b20f-49d8-87a0-54a469dd704f?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection redistribute-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --evenly-distribute + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/66d83d7e-b20f-49d8-87a0-54a469dd704f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection redistribute-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --evenly-distribute + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput/operationResults/66d83d7e-b20f-49d8-87a0-54a469dd704f?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/redistributeThroughput","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings/redistributeThroughput","name":"foFh","properties":{"resource":{"physicalPartitionThroughputInfo":[{"throughput":1000.0,"id":"0"},{"throughput":1000.0,"id":"1"},{"throughput":1000.0,"id":"2"}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '532' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection_backupinfo.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection_backupinfo.yaml index 3aee1b7d3fb..130c5725ba1 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection_backupinfo.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection_backupinfo.yaml @@ -13,9 +13,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/cli000004'' @@ -29,7 +29,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:08 GMT + - Thu, 29 Sep 2022 07:28:52 GMT expires: - '-1' pragma: @@ -57,12 +57,13 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001","name":"cli_test_cosmosdb_mongodb_collection_backupinfo000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001","name":"cli_test_cosmosdb_mongodb_collection_backupinfo000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:28:48Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -71,7 +72,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:09 GMT + - Thu, 29 Sep 2022 07:28:51 GMT expires: - '-1' pragma: @@ -107,30 +108,30 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:12.274667Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"7e9f61e1-0e71-4282-9176-59df801f1512","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:28:55.1804829Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:28:55.1804829Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:28:55.1804829Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:28:55.1804829Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:28:55.1804829Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e9cbae6a-3896-4684-8e87-e84ed0c9a6ea?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '1961' + - '2389' content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:14 GMT + - Thu, 29 Sep 2022 07:28:56 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/e9cbae6a-3896-4684-8e87-e84ed0c9a6ea?api-version=2022-08-15-preview pragma: - no-cache server: @@ -164,9 +165,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e9cbae6a-3896-4684-8e87-e84ed0c9a6ea?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -178,7 +179,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:44 GMT + - Thu, 29 Sep 2022 07:29:26 GMT pragma: - no-cache server: @@ -210,9 +211,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e9cbae6a-3896-4684-8e87-e84ed0c9a6ea?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -224,7 +225,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:14 GMT + - Thu, 29 Sep 2022 07:29:57 GMT pragma: - no-cache server: @@ -256,9 +257,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e9cbae6a-3896-4684-8e87-e84ed0c9a6ea?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -270,7 +271,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:45 GMT + - Thu, 29 Sep 2022 07:30:27 GMT pragma: - no-cache server: @@ -302,9 +303,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e9cbae6a-3896-4684-8e87-e84ed0c9a6ea?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -316,7 +317,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:15 GMT + - Thu, 29 Sep 2022 07:30:57 GMT pragma: - no-cache server: @@ -348,9 +349,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e9cbae6a-3896-4684-8e87-e84ed0c9a6ea?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -362,7 +363,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:44 GMT + - Thu, 29 Sep 2022 07:31:27 GMT pragma: - no-cache server: @@ -394,9 +395,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e9cbae6a-3896-4684-8e87-e84ed0c9a6ea?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -408,7 +409,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:14 GMT + - Thu, 29 Sep 2022 07:31:58 GMT pragma: - no-cache server: @@ -440,9 +441,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e9cbae6a-3896-4684-8e87-e84ed0c9a6ea?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -454,7 +455,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:44 GMT + - Thu, 29 Sep 2022 07:32:28 GMT pragma: - no-cache server: @@ -486,9 +487,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e9cbae6a-3896-4684-8e87-e84ed0c9a6ea?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -500,7 +501,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:15 GMT + - Thu, 29 Sep 2022 07:32:58 GMT pragma: - no-cache server: @@ -532,9 +533,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e9cbae6a-3896-4684-8e87-e84ed0c9a6ea?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -546,7 +547,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:45 GMT + - Thu, 29 Sep 2022 07:33:27 GMT pragma: - no-cache server: @@ -578,55 +579,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:33:15 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/5aa0a04a-ffaf-4c39-83d0-980d7aefe72c?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e9cbae6a-3896-4684-8e87-e84ed0c9a6ea?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -638,7 +593,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:46 GMT + - Thu, 29 Sep 2022 07:33:58 GMT pragma: - no-cache server: @@ -670,26 +625,26 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:42.9167912Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","mongoEndpoint":"https://cli000004.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"7e9f61e1-0e71-4282-9176-59df801f1512","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:32:56.0962993Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","mongoEndpoint":"https://cli000004.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:32:56.0962993Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:32:56.0962993Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:32:56.0962993Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:32:56.0962993Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2353' + - '2780' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:46 GMT + - Thu, 29 Sep 2022 07:33:58 GMT pragma: - no-cache server: @@ -721,26 +676,26 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:42.9167912Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","mongoEndpoint":"https://cli000004.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"7e9f61e1-0e71-4282-9176-59df801f1512","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:32:56.0962993Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","mongoEndpoint":"https://cli000004.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:32:56.0962993Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:32:56.0962993Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:32:56.0962993Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:32:56.0962993Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2353' + - '2780' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:46 GMT + - Thu, 29 Sep 2022 07:33:58 GMT pragma: - no-cache server: @@ -772,26 +727,26 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:42.9167912Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","mongoEndpoint":"https://cli000004.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"7e9f61e1-0e71-4282-9176-59df801f1512","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:32:56.0962993Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","mongoEndpoint":"https://cli000004.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:32:56.0962993Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:32:56.0962993Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:32:56.0962993Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:32:56.0962993Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2353' + - '2780' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:46 GMT + - Thu, 29 Sep 2022 07:33:59 GMT pragma: - no-cache server: @@ -823,13 +778,13 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"code":"NotFound","message":"the database cli000003 doesn''t exist.\r\nActivityId: - 901ecae4-38b6-11ed-9d90-8cdcd4532c5b, Microsoft.Azure.Documents.Common/2.14.0"}' + 143f82a3-3fc9-11ed-9f42-9c7bef4baa38, Microsoft.Azure.Documents.Common/2.14.0"}' headers: cache-control: - no-store, no-cache @@ -838,7 +793,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:47 GMT + - Thu, 29 Sep 2022 07:34:00 GMT pragma: - no-cache server: @@ -870,15 +825,15 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1daa225d-e226-4dfe-ab35-ff07c7515ce2?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b9d0c226-e9da-477c-b46c-d215dac3b9aa?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -886,9 +841,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:48 GMT + - Thu, 29 Sep 2022 07:34:01 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/operationResults/1daa225d-e226-4dfe-ab35-ff07c7515ce2?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/operationResults/b9d0c226-e9da-477c-b46c-d215dac3b9aa?api-version=2022-08-15 pragma: - no-cache server: @@ -918,9 +873,9 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1daa225d-e226-4dfe-ab35-ff07c7515ce2?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b9d0c226-e9da-477c-b46c-d215dac3b9aa?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -932,7 +887,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:18 GMT + - Thu, 29 Sep 2022 07:34:32 GMT pragma: - no-cache server: @@ -964,9 +919,9 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003"}}}' @@ -978,7 +933,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:18 GMT + - Thu, 29 Sep 2022 07:34:32 GMT pragma: - no-cache server: @@ -1010,9 +965,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003"}}}' @@ -1024,7 +979,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:19 GMT + - Thu, 29 Sep 2022 07:34:34 GMT pragma: - no-cache server: @@ -1056,13 +1011,13 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15 response: body: string: '{"code":"NotFound","message":"The collection ''cli000003''.''cli000002'' - doesn''t exist.\r\nActivityId: a3603d18-38b6-11ed-b189-8cdcd4532c5b, Microsoft.Azure.Documents.Common/2.14.0"}' + doesn''t exist.\r\nActivityId: 2803e65f-3fc9-11ed-ab54-9c7bef4baa38, Microsoft.Azure.Documents.Common/2.14.0"}' headers: cache-control: - no-store, no-cache @@ -1071,7 +1026,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:20 GMT + - Thu, 29 Sep 2022 07:34:34 GMT pragma: - no-cache server: @@ -1104,15 +1059,15 @@ interactions: ParameterSetName: - -g -a -d -n --shard --throughput User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/808045d3-d4e2-4edd-a4c0-55161e0824e5?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/23d80e29-d170-4490-8ed1-53643059a086?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -1120,9 +1075,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:21 GMT + - Thu, 29 Sep 2022 07:34:35 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/operationResults/808045d3-d4e2-4edd-a4c0-55161e0824e5?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/operationResults/23d80e29-d170-4490-8ed1-53643059a086?api-version=2022-08-15 pragma: - no-cache server: @@ -1152,9 +1107,9 @@ interactions: ParameterSetName: - -g -a -d -n --shard --throughput User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/808045d3-d4e2-4edd-a4c0-55161e0824e5?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/23d80e29-d170-4490-8ed1-53643059a086?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -1166,7 +1121,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:51 GMT + - Thu, 29 Sep 2022 07:35:05 GMT pragma: - no-cache server: @@ -1198,9 +1153,9 @@ interactions: ParameterSetName: - -g -a -d -n --shard --throughput User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' @@ -1212,7 +1167,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:52 GMT + - Thu, 29 Sep 2022 07:35:06 GMT pragma: - no-cache server: @@ -1244,9 +1199,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003"}}}' @@ -1258,7 +1213,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:53 GMT + - Thu, 29 Sep 2022 07:35:07 GMT pragma: - no-cache server: @@ -1290,9 +1245,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' @@ -1304,7 +1259,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:54 GMT + - Thu, 29 Sep 2022 07:35:07 GMT pragma: - no-cache server: @@ -1340,9 +1295,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' @@ -1354,9 +1309,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:57 GMT + - Thu, 29 Sep 2022 07:35:08 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation/operationResults/993c57ee-921a-45ce-8e8c-6145b7a6ea23?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation/operationResults/c9f8039e-60cb-4e2e-b1e1-5fe41e4a5eca?api-version=2022-08-15 pragma: - no-cache server: @@ -1368,7 +1323,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 202 message: Accepted @@ -1386,13 +1341,13 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation/operationResults/993c57ee-921a-45ce-8e8c-6145b7a6ea23?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation/operationResults/c9f8039e-60cb-4e2e-b1e1-5fe41e4a5eca?api-version=2022-08-15 response: body: - string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/20/2022 - 7:35:03 AM"}}' + string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/29/2022 + 7:35:14 AM"}}' headers: cache-control: - no-store, no-cache @@ -1401,7 +1356,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:27 GMT + - Thu, 29 Sep 2022 07:35:39 GMT pragma: - no-cache server: @@ -1433,9 +1388,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003"}}}' @@ -1447,7 +1402,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:28 GMT + - Thu, 29 Sep 2022 07:35:39 GMT pragma: - no-cache server: @@ -1479,9 +1434,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' @@ -1493,7 +1448,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:28 GMT + - Thu, 29 Sep 2022 07:35:40 GMT pragma: - no-cache server: @@ -1529,9 +1484,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' @@ -1543,9 +1498,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:29 GMT + - Thu, 29 Sep 2022 07:35:40 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation/operationResults/f83d161e-7b09-4063-a2f0-c349089596ff?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation/operationResults/776495e3-6bc3-464a-93ea-10ed676e1b75?api-version=2022-08-15 pragma: - no-cache server: @@ -1557,7 +1512,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 202 message: Accepted @@ -1575,13 +1530,13 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation/operationResults/f83d161e-7b09-4063-a2f0-c349089596ff?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation/operationResults/776495e3-6bc3-464a-93ea-10ed676e1b75?api-version=2022-08-15 response: body: - string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/20/2022 - 7:35:34 AM"}}' + string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/29/2022 + 7:35:47 AM"}}' headers: cache-control: - no-store, no-cache @@ -1590,7 +1545,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:59 GMT + - Thu, 29 Sep 2022 07:36:10 GMT pragma: - no-cache server: @@ -1622,9 +1577,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003"}}}' @@ -1636,7 +1591,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:36:00 GMT + - Thu, 29 Sep 2022 07:36:12 GMT pragma: - no-cache server: @@ -1668,9 +1623,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' @@ -1682,7 +1637,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:36:00 GMT + - Thu, 29 Sep 2022 07:36:12 GMT pragma: - no-cache server: @@ -1718,9 +1673,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' @@ -1732,9 +1687,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:36:01 GMT + - Thu, 29 Sep 2022 07:36:13 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation/operationResults/5f742745-c333-4536-9688-e8b6d56435e3?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation/operationResults/eb888591-d540-419b-9b10-e46567da379d?api-version=2022-08-15 pragma: - no-cache server: @@ -1764,13 +1719,13 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation/operationResults/5f742745-c333-4536-9688-e8b6d56435e3?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_collection_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000003/collections/cli000002/retrieveContinuousBackupInformation/operationResults/eb888591-d540-419b-9b10-e46567da379d?api-version=2022-08-15 response: body: - string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/20/2022 - 7:36:06 AM"}}' + string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/29/2022 + 7:36:18 AM"}}' headers: cache-control: - no-store, no-cache @@ -1779,7 +1734,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:36:32 GMT + - Thu, 29 Sep 2022 07:36:43 GMT pragma: - no-cache server: diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection_merge.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection_merge.yaml index 797b1a99678..b5405a53531 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection_merge.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_collection_merge.yaml @@ -1,929 +1,929 @@ -interactions: -- request: - body: '{"properties": {"resource": {"id": "cli000003"}, "options": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb database create - Connection: - - keep-alive - Content-Length: - - '64' - Content-Type: - - application/json - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/888c80e3-3eef-4d1c-adf2-3297e7329a61?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:14:48 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/operationResults/888c80e3-3eef-4d1c-adf2-3297e7329a61?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb database create - Connection: - - keep-alive - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/888c80e3-3eef-4d1c-adf2-3297e7329a61?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:15:18 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb database create - Connection: - - keep-alive - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '312' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:15:18 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"id": "cli000002", "shardKey": {"theShardKey": - "Hash"}}, "options": {"throughput": 20000}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection create - Connection: - - keep-alive - Content-Length: - - '120' - Content-Type: - - application/json - ParameterSetName: - - -g -a -d -n --shard --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c11f1c48-01f6-4bd3-bc11-b449942e8718?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:15:20 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/operationResults/c11f1c48-01f6-4bd3-bc11-b449942e8718?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection create - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n --shard --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c11f1c48-01f6-4bd3-bc11-b449942e8718?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:15:50 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection create - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n --shard --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '417' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:15:51 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"throughput": 1000}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection throughput update - Connection: - - keep-alive - Content-Length: - - '50' - Content-Type: - - application/json - ParameterSetName: - - -g -a -d -n --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/38091c6d-7550-479d-8f19-59f0721a2196?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:15:53 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/operationResults/38091c6d-7550-479d-8f19-59f0721a2196?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection throughput update - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/38091c6d-7550-479d-8f19-59f0721a2196?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:23 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection throughput update - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings","name":"UDUY","properties":{"resource":{"throughput":1000,"minimumThroughput":"400"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '414' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:23 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '417' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:25 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"isDryRun": false}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection merge - Connection: - - keep-alive - Content-Length: - - '19' - Content-Type: - - application/json - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:28 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:58 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:17:28 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:17:59 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:18:30 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:19:00 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:19:30 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:20:00 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:20:31 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb mongodb collection merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mongomergeaccount/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/5de83d58-1082-40f7-bc58-99c71be6bad1?api-version=2022-02-15-preview - response: - body: - string: '{"physicalPartitionStorageInfoCollection":[{"storageInKB":0.0,"id":"4"}]}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '73' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:21:01 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -version: 1 +interactions: +- request: + body: '{"properties": {"resource": {"id": "cli000003"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/operationsStatus/51c003f3-075b-4d66-ac47-6da6c9c56737?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:26 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/operationResults/51c003f3-075b-4d66-ac47-6da6c9c56737?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/operationsStatus/51c003f3-075b-4d66-ac47-6da6c9c56737?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:56 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '300' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:56 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002", "shardKey": {"theShardKey": + "Hash"}}, "options": {"throughput": 20000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + Content-Length: + - '120' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --shard --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/operationsStatus/59399a6a-2a5a-489f-9ef0-ff6674fea9e4?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:58 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/operationResults/59399a6a-2a5a-489f-9ef0-ff6674fea9e4?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --shard --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/operationsStatus/59399a6a-2a5a-489f-9ef0-ff6674fea9e4?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --shard --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '405' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"throughput": 1000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection throughput update + Connection: + - keep-alive + Content-Length: + - '50' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/operationsStatus/8c713ecf-15f0-46f3-87c5-21461a240e73?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:30 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default/operationResults/8c713ecf-15f0-46f3-87c5-21461a240e73?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection throughput update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/operationsStatus/8c713ecf-15f0-46f3-87c5-21461a240e73?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection throughput update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/throughputSettings/default","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings","name":"34zG","properties":{"resource":{"throughput":1000,"minimumThroughput":"400"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '402' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '405' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"isDryRun": false}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection merge + Connection: + - keep-alive + Content-Length: + - '19' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:04 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:34 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:11:04 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:11:34 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:04 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:34 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:05 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:35 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:14:04 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest3/mongodbDatabases/cli000003/collections/cli000002/partitionMerge/operationResults/e20e4972-9425-437d-bcf1-97f3fb921e42?api-version=2022-08-15-preview + response: + body: + string: '{"physicalPartitionStorageInfoCollection":[{"storageInKB":0.0,"id":"4"}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '73' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:14:35 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_database.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_database.yaml new file mode 100644 index 00000000000..863f0d4d0fc --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_database.yaml @@ -0,0 +1,1093 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_mongodb_database000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001","name":"cli_test_cosmosdb_mongodb_database000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:03:48Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '358' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:03:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "MongoDB", "properties": {"locations": [{"locationName": + "WestUS", "failoverPriority": 0, "isZoneRedundant": false}], "databaseAccountOfferType": + "Standard", "apiProperties": {"serverVersion": "3.6"}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '355' + Content-Type: + - application/json + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:03:56.041539Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"276ac4e3-f1a9-4795-805b-58af9ca9581d","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:03:56.041539Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:03:56.041539Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:03:56.041539Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:03:56.041539Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9a2157de-ac8e-4859-b436-7feaf3357af9?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2357' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:03:58 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/9a2157de-ac8e-4859-b436-7feaf3357af9?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9a2157de-ac8e-4859-b436-7feaf3357af9?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:04:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9a2157de-ac8e-4859-b436-7feaf3357af9?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:04:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9a2157de-ac8e-4859-b436-7feaf3357af9?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:05:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9a2157de-ac8e-4859-b436-7feaf3357af9?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:05:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9a2157de-ac8e-4859-b436-7feaf3357af9?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9a2157de-ac8e-4859-b436-7feaf3357af9?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9a2157de-ac8e-4859-b436-7feaf3357af9?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9a2157de-ac8e-4859-b436-7feaf3357af9?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9a2157de-ac8e-4859-b436-7feaf3357af9?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:07:47.0378349Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","mongoEndpoint":"https://cli000003.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"276ac4e3-f1a9-4795-805b-58af9ca9581d","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:07:47.0378349Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:07:47.0378349Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:07:47.0378349Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:07:47.0378349Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2750' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:07:47.0378349Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","mongoEndpoint":"https://cli000003.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"276ac4e3-f1a9-4795-805b-58af9ca9581d","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:07:47.0378349Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:07:47.0378349Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:07:47.0378349Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:07:47.0378349Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2750' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"code":"NotFound","message":"the database cli000002 doesn''t exist.\r\nActivityId: + 83eb11ef-3fc5-11ed-bbad-9c7bef4baa38, Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '162' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 404 + message: NotFound +- request: + body: '{"properties": {"resource": {"id": "cli000002"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/84c95d17-d9a1-4834-a4f8-bd77f2283474?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:30 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000002/operationResults/84c95d17-d9a1-4834-a4f8-bd77f2283474?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/84c95d17-d9a1-4834-a4f8-bd77f2283474?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '329' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database show + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '329' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '341' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '329' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/7a3c320e-0a8d-40fb-9e4a-30a8e71d4c95?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:03 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000002/operationResults/7a3c320e-0a8d-40fb-9e4a-30a8e71d4c95?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/7a3c320e-0a8d-40fb-9e4a-30a8e71d4c95?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:35 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_normal_database_prov_collection_restore.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_normal_database_prov_collection_restore.yaml new file mode 100644 index 00000000000..4d0a2637750 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_normal_database_prov_collection_restore.yaml @@ -0,0 +1,4496 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001","name":"cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:03:48Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '420' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:03:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "MongoDB", "properties": {"locations": [{"locationName": + "WestUS", "failoverPriority": 0, "isZoneRedundant": false}], "databaseAccountOfferType": + "Standard", "apiProperties": {"serverVersion": "3.6"}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '355' + Content-Type: + - application/json + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:03:56.1567849Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:03:56.1567849Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:03:56.1567849Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:03:56.1567849Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:03:56.1567849Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/290f888f-8b10-4a0a-9c32-9453a9d7070f?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2393' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:03:57 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/290f888f-8b10-4a0a-9c32-9453a9d7070f?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/290f888f-8b10-4a0a-9c32-9453a9d7070f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:04:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/290f888f-8b10-4a0a-9c32-9453a9d7070f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:04:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/290f888f-8b10-4a0a-9c32-9453a9d7070f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:05:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/290f888f-8b10-4a0a-9c32-9453a9d7070f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:05:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/290f888f-8b10-4a0a-9c32-9453a9d7070f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/290f888f-8b10-4a0a-9c32-9453a9d7070f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/290f888f-8b10-4a0a-9c32-9453a9d7070f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/290f888f-8b10-4a0a-9c32-9453a9d7070f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/290f888f-8b10-4a0a-9c32-9453a9d7070f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/290f888f-8b10-4a0a-9c32-9453a9d7070f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:08:07.3035122Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","mongoEndpoint":"https://cli000003.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:08:07.3035122Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:08:07.3035122Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:08:07.3035122Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:08:07.3035122Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2781' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:08:07.3035122Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","mongoEndpoint":"https://cli000003.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:08:07.3035122Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:08:07.3035122Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:08:07.3035122Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:08:07.3035122Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2781' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000004"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/98314d74-d525-4e6b-9594-e480d8abd77b?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:59 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/operationResults/98314d74-d525-4e6b-9594-e480d8abd77b?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/98314d74-d525-4e6b-9594-e480d8abd77b?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000004","properties":{"resource":{"id":"cli000004"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '360' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"code":"NotFound","message":"The collection ''cli000004''.''cli000002'' + doesn''t exist.\r\nActivityId: a866570e-3fc5-11ed-9048-9c7bef4baa38, Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '178' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 404 + message: NotFound +- request: + body: '{"properties": {"resource": {"id": "cli000002", "shardKey": {"theShardKey": + "Hash"}}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + Content-Length: + - '101' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --shard + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ea5a84a-1e7e-4c1c-b7a2-8f819836b679?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:32 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002/operationResults/2ea5a84a-1e7e-4c1c-b7a2-8f819836b679?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --shard + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ea5a84a-1e7e-4c1c-b7a2-8f819836b679?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --shard + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '465' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:03 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '465' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:04 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '477' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:05 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '465' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:05 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/15604653-94f5-4867-8997-7f2498649701?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:06 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002/operationResults/15604653-94f5-4867-8997-7f2498649701?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/15604653-94f5-4867-8997-7f2498649701?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:36 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:37 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","oldestRestorableTime":"2022-09-29T07:07:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cli000003","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","oldestRestorableTime":"2022-09-29T07:08:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","oldestRestorableTime":"2022-09-29T07:12:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:15:39Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:15:38Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '67061' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:15:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000002", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180", + "restoreTimestampInUtc": "2022-09-29T07:10:04.264866Z"}, "createMode": "Restore"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + Content-Length: + - '352' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:40 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002/operationResults/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:11 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:17:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:17:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:18:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:18:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:19:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:19:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:20:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:20:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:21:13 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:21:43 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:22:13 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d1975b0-db0a-4dd3-8564-f32a7bf9c6f0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:22:43 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '465' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:22:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '477' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:22:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d8dd30-f591-4590-934a-efb1b737d03f?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:22:46 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/operationResults/54d8dd30-f591-4590-934a-efb1b737d03f?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d8dd30-f591-4590-934a-efb1b737d03f?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:23:16 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:23:17 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","oldestRestorableTime":"2022-09-29T07:19:50Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8680b861-bef3-493d-9344-27f17b06b5e3","creationTime":"2022-09-29T07:19:51Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","oldestRestorableTime":"2022-09-29T07:07:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cli000003","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","oldestRestorableTime":"2022-09-29T07:08:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","oldestRestorableTime":"2022-09-29T07:12:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:23:18Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '68918' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:23:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000004", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180", + "restoreTimestampInUtc": "2022-09-29T07:10:04.264866Z"}, "createMode": "Restore"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + Content-Length: + - '352' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/66dbc756-a2c3-4cc9-a962-c3556040b239?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:23:19 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/operationResults/66dbc756-a2c3-4cc9-a962-c3556040b239?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/66dbc756-a2c3-4cc9-a962-c3556040b239?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:23:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/66dbc756-a2c3-4cc9-a962-c3556040b239?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:24:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/66dbc756-a2c3-4cc9-a962-c3556040b239?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:24:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/66dbc756-a2c3-4cc9-a962-c3556040b239?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:25:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000004","properties":{"resource":{"id":"cli000004"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '360' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:25:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000004","properties":{"resource":{"id":"cli000004"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '372' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:25:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:25:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","oldestRestorableTime":"2022-09-29T07:19:50Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8680b861-bef3-493d-9344-27f17b06b5e3","creationTime":"2022-09-29T07:19:51Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","oldestRestorableTime":"2022-09-29T07:25:11Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"f895d646-7338-4417-a964-c374f9a113bb","creationTime":"2022-09-29T07:25:12Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","oldestRestorableTime":"2022-09-29T07:07:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cli000003","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","oldestRestorableTime":"2022-09-29T07:08:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","oldestRestorableTime":"2022-09-29T07:12:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:25:23Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '69727' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:25:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000002", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180", + "restoreTimestampInUtc": "2022-09-29T07:10:04.264866Z"}, "createMode": "Restore"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + Content-Length: + - '352' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:25:25 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002/operationResults/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:25:56 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:26:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:26:56 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:27:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:27:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:28:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:28:56 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:29:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:29:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:30:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:30:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:31:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:31:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/804ca59a-6d2a-401a-9293-241830d0db29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:32:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '465' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:32:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '477' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:32:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4d38ffcd-5718-4182-9713-c3af08ecc47f?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:32:30 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/operationResults/4d38ffcd-5718-4182-9713-c3af08ecc47f?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4d38ffcd-5718-4182-9713-c3af08ecc47f?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:33:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:33:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:33:03 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_shared_database_prov_collection_restore.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_shared_database_prov_collection_restore.yaml new file mode 100644 index 00000000000..08cf20bbac3 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_shared_database_prov_collection_restore.yaml @@ -0,0 +1,4411 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001","name":"cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:03:48Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '420' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:03:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "MongoDB", "properties": {"locations": [{"locationName": + "WestUS", "failoverPriority": 0, "isZoneRedundant": false}], "databaseAccountOfferType": + "Standard", "apiProperties": {"serverVersion": "3.6"}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '355' + Content-Type: + - application/json + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:03:55.5182081Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"45fa1d23-fdce-4019-89b0-d30326434019","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:03:55.5182081Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:03:55.5182081Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:03:55.5182081Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:03:55.5182081Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ac153c-4ee8-4ef7-b3e1-eea0a5010fba?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2393' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:03:57 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/34ac153c-4ee8-4ef7-b3e1-eea0a5010fba?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ac153c-4ee8-4ef7-b3e1-eea0a5010fba?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:04:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ac153c-4ee8-4ef7-b3e1-eea0a5010fba?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:04:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ac153c-4ee8-4ef7-b3e1-eea0a5010fba?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:05:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ac153c-4ee8-4ef7-b3e1-eea0a5010fba?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:05:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ac153c-4ee8-4ef7-b3e1-eea0a5010fba?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ac153c-4ee8-4ef7-b3e1-eea0a5010fba?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ac153c-4ee8-4ef7-b3e1-eea0a5010fba?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ac153c-4ee8-4ef7-b3e1-eea0a5010fba?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:07:19.0414453Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","mongoEndpoint":"https://cli000004.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"45fa1d23-fdce-4019-89b0-d30326434019","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:07:19.0414453Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:07:19.0414453Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:07:19.0414453Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:07:19.0414453Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2781' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:07:19.0414453Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","mongoEndpoint":"https://cli000004.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"45fa1d23-fdce-4019-89b0-d30326434019","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:07:19.0414453Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:07:19.0414453Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:07:19.0414453Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:07:19.0414453Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2781' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000005"}, "options": {"throughput": + 1000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + Content-Length: + - '82' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/db5ef6ca-b0fd-4cf0-b88c-f3fbdd5caac7?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:58 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/operationResults/db5ef6ca-b0fd-4cf0-b88c-f3fbdd5caac7?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/db5ef6ca-b0fd-4cf0-b88c-f3fbdd5caac7?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000005","properties":{"resource":{"id":"cli000005"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '360' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"code":"NotFound","message":"The collection ''cli000005''.''cli000002'' + doesn''t exist.\r\nActivityId: 84cdf075-3fc5-11ed-9db9-9c7bef4baa38, Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '178' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 404 + message: NotFound +- request: + body: '{"properties": {"resource": {"id": "cli000002", "shardKey": {"theShardKey": + "Hash"}}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + Content-Length: + - '101' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --shard + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/d0f3f496-9d86-462c-85e3-b4df04e65bc2?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:32 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002/operationResults/d0f3f496-9d86-462c-85e3-b4df04e65bc2?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --shard + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/d0f3f496-9d86-462c-85e3-b4df04e65bc2?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --shard + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '465' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000003", "shardKey": {"theShardKey": + "Hash"}}, "options": {"throughput": 1000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + Content-Length: + - '119' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --shard --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a0c7039e-acb6-422e-a106-1879ead2e066?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:03 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000003/operationResults/a0c7039e-acb6-422e-a106-1879ead2e066?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --shard --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a0c7039e-acb6-422e-a106-1879ead2e066?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --shard --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000003","properties":{"resource":{"id":"cli000003","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '465' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '465' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:35 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000003","properties":{"resource":{"id":"cli000003","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '943' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:35 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '465' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:36 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/747116d9-309c-4606-96b7-1da007bd1e68?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:14:37 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002/operationResults/747116d9-309c-4606-96b7-1da007bd1e68?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/747116d9-309c-4606-96b7-1da007bd1e68?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:08 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5d7ae50b-d52e-4da0-b917-1431a890cbd3?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:09 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000003/operationResults/5d7ae50b-d52e-4da0-b917-1431a890cbd3?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5d7ae50b-d52e-4da0-b917-1431a890cbd3?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"cli000004","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","oldestRestorableTime":"2022-09-29T07:07:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","oldestRestorableTime":"2022-09-29T07:08:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","oldestRestorableTime":"2022-09-29T07:12:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:15:41Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '67061' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:15:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000002", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019", + "restoreTimestampInUtc": "2022-09-29T07:09:34.786197Z"}, "createMode": "Restore"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + Content-Length: + - '352' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/03ee66e5-8691-46a9-9ca8-22e2f6e94f89?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:44 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002/operationResults/03ee66e5-8691-46a9-9ca8-22e2f6e94f89?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/03ee66e5-8691-46a9-9ca8-22e2f6e94f89?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Failed","error":{"code":"BadRequest","message":"Partial + restore of shared throughput data is not allowed. Please perform restore operation + on a shared throughput database or a provisioned collection.\r\nActivityId: + 85290b99-3fc6-11ed-8976-9c7bef4baa38, Microsoft.Azure.Documents.Common/2.14.0, + Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Documents.Common/2.14.0, + Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Documents.Common/2.14.0, + Microsoft.Azure.Documents.Common/2.14.0"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '511' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:14 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/cf539c9e-ffb0-41f3-89b4-78c55564a5c8?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:17 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/operationResults/cf539c9e-ffb0-41f3-89b4-78c55564a5c8?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/cf539c9e-ffb0-41f3-89b4-78c55564a5c8?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"cli000004","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","oldestRestorableTime":"2022-09-29T07:07:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","oldestRestorableTime":"2022-09-29T07:08:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","oldestRestorableTime":"2022-09-29T07:12:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:16:49Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '67578' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:16:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000005", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019", + "restoreTimestampInUtc": "2022-09-29T07:09:34.786197Z"}, "createMode": "Restore"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + Content-Length: + - '352' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:51 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/operationResults/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:17:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:17:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:18:21 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:18:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:19:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:19:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:20:21 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:20:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:21:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:21:52 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:22:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:22:52 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:23:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ba01f58-6536-4fa4-b464-cae5f49dfca3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:23:52 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000005","properties":{"resource":{"id":"cli000005"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '360' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:23:53 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000005","properties":{"resource":{"id":"cli000005"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '372' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:23:54 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '477' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:23:55 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","oldestRestorableTime":"2022-09-29T07:19:50Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8680b861-bef3-493d-9344-27f17b06b5e3","creationTime":"2022-09-29T07:19:51Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"cli000004","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","oldestRestorableTime":"2022-09-29T07:07:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","oldestRestorableTime":"2022-09-29T07:08:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","oldestRestorableTime":"2022-09-29T07:12:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:23:56Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '68918' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:23:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000003", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019", + "restoreTimestampInUtc": "2022-09-29T07:09:34.786197Z"}, "createMode": "Restore"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + Content-Length: + - '352' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:23:58 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000003/operationResults/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:24:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:24:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:25:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:25:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:26:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:26:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:27:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:27:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:28:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:28:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:29:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:29:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:30:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/13936015-7ba9-403a-af57-e82e473c7ffb?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:30:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000003","properties":{"resource":{"id":"cli000003","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '465' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:30:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/collections/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000003","properties":{"resource":{"id":"cli000003","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '943' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:31:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/71be3bb1-825e-44bf-9651-80478eae579a?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:31:01 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases/cli000005/operationResults/71be3bb1-825e-44bf-9651-80478eae579a?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/71be3bb1-825e-44bf-9651-80478eae579a?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:31:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/mongodbDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:31:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_shared_resources_restore.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_shared_resources_restore.yaml new file mode 100644 index 00000000000..31fe78dc470 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_mongodb_shared_resources_restore.yaml @@ -0,0 +1,1108 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001","name":"cli_test_cosmosdb_mongodb_shared_resources_restore000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-26T17:04:01Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '390' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 26 Sep 2022 17:04:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "MongoDB", "properties": {"locations": [{"locationName": + "CentralUS", "failoverPriority": 0, "isZoneRedundant": false}], "databaseAccountOfferType": + "Standard", "apiProperties": {"serverVersion": "3.6"}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '358' + Content-Type: + - application/json + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:04:09.7812954Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"2ad9c9f1-450b-48ae-870d-32c54ccd9469","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-centralus","locationName":"Central + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-centralus","locationName":"Central + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-centralus","locationName":"Central + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-centralus","locationName":"Central + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-26T17:04:09.7812954Z"},"secondaryMasterKey":{"generationTime":"2022-09-26T17:04:09.7812954Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:04:09.7812954Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:04:09.7812954Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/50a1755d-d5f4-4524-a9cd-b1b56ca427cc?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2317' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:04:11 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/50a1755d-d5f4-4524-a9cd-b1b56ca427cc?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/50a1755d-d5f4-4524-a9cd-b1b56ca427cc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:04:41 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/50a1755d-d5f4-4524-a9cd-b1b56ca427cc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:05:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/50a1755d-d5f4-4524-a9cd-b1b56ca427cc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:05:41 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/50a1755d-d5f4-4524-a9cd-b1b56ca427cc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/50a1755d-d5f4-4524-a9cd-b1b56ca427cc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:06:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/50a1755d-d5f4-4524-a9cd-b1b56ca427cc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:07:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/50a1755d-d5f4-4524-a9cd-b1b56ca427cc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:07:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/50a1755d-d5f4-4524-a9cd-b1b56ca427cc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:08:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/50a1755d-d5f4-4524-a9cd-b1b56ca427cc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:08:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:07:58.8917401Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","mongoEndpoint":"https://cli000003.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"2ad9c9f1-450b-48ae-870d-32c54ccd9469","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000003-centralus","locationName":"Central + US","documentEndpoint":"https://cli000003-centralus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-centralus","locationName":"Central + US","documentEndpoint":"https://cli000003-centralus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-centralus","locationName":"Central + US","documentEndpoint":"https://cli000003-centralus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-centralus","locationName":"Central + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-26T17:07:58.8917401Z"},"secondaryMasterKey":{"generationTime":"2022-09-26T17:07:58.8917401Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:07:58.8917401Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:07:58.8917401Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2714' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:08:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --kind --server-version --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"MongoDB","tags":{},"systemData":{"createdAt":"2022-09-26T17:07:58.8917401Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","mongoEndpoint":"https://cli000003.mongo.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"MongoDB","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"FullFidelity"},"instanceId":"2ad9c9f1-450b-48ae-870d-32c54ccd9469","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"apiProperties":{"serverVersion":"3.6"},"configurationOverrides":{"EnableBsonSchema":"True"},"writeLocations":[{"id":"cli000003-centralus","locationName":"Central + US","documentEndpoint":"https://cli000003-centralus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-centralus","locationName":"Central + US","documentEndpoint":"https://cli000003-centralus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-centralus","locationName":"Central + US","documentEndpoint":"https://cli000003-centralus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-centralus","locationName":"Central + US","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableMongo"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-26T17:07:58.8917401Z"},"secondaryMasterKey":{"generationTime":"2022-09-26T17:07:58.8917401Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:07:58.8917401Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-26T17:07:58.8917401Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2714' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:08:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000004"}, "options": {"throughput": + 1000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + Content-Length: + - '82' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004?api-version=2022-05-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d2ff091-8e83-4ffd-a561-9e45eb017f7e?api-version=2022-05-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:08:43 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/operationResults/3d2ff091-8e83-4ffd-a561-9e45eb017f7e?api-version=2022-05-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3d2ff091-8e83-4ffd-a561-9e45eb017f7e?api-version=2022-05-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:09:13 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases","name":"cli000004","properties":{"resource":{"id":"cli000004"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '345' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:09:14 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-05-15 + response: + body: + string: '{"code":"NotFound","message":"The collection ''cli000004''.''cli000002'' + doesn''t exist.\r\nActivityId: f2306cfd-3dbd-11ed-9839-9c7bef4baa38, Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '178' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:09:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 404 + message: NotFound +- request: + body: '{"properties": {"resource": {"id": "cli000002", "shardKey": {"theShardKey": + "Hash"}}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + Content-Length: + - '101' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --shard + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-05-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ce92dbd9-95b1-45ae-ab92-fc777af1a7ff?api-version=2022-05-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:09:16 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002/operationResults/ce92dbd9-95b1-45ae-ab92-fc777af1a7ff?api-version=2022-05-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --shard + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ce92dbd9-95b1-45ae-ab92-fc777af1a7ff?api-version=2022-05-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:09:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --shard + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '450' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:09:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --idx + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-05-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections","name":"cli000002","properties":{"resource":{"id":"cli000002","shardKey":{"theShardKey":"Hash"},"indexes":[{"key":{"keys":["_id"]}}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '450' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:09:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002", "shardKey": {"theShardKey": + "Hash"}, "indexes": [{"key": {"keys": ["_ts"]}, "options": {"expireAfterSeconds": + 1000}}]}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection update + Connection: + - keep-alive + Content-Length: + - '183' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --idx + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002?api-version=2022-05-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/af83e36b-f64f-4492-ad65-330922cd9bd0?api-version=2022-05-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:09:49 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_mongodb_shared_resources_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/mongodbDatabases/cli000004/collections/cli000002/operationResults/af83e36b-f64f-4492-ad65-330922cd9bd0?api-version=2022-05-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb mongodb collection update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --idx + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/af83e36b-f64f-4492-ad65-330922cd9bd0?api-version=2022-05-15 + response: + body: + string: '{"status":"Failed","error":{"code":"BadRequest","message":"Index definition + does not contains ''_id'' index specification.\r\nActivityId: 05df2f53-3dbe-11ed-a464-9c7bef4baa38, + Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Documents.Common/2.14.0, + Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Documents.Common/2.14.0"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '339' + content-type: + - application/json + date: + - Mon, 26 Sep 2022 17:10:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container.yaml new file mode 100644 index 00000000000..8bb252599a6 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container.yaml @@ -0,0 +1,1048 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_container000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001","name":"cli_test_cosmosdb_sql_container000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:03:48Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '352' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:03:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "WestUS", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '342' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:03:56.9849002Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"3b16a147-c747-499d-8766-af387fccd08d","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:03:56.9849002Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:03:56.9849002Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:03:56.9849002Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:03:56.9849002Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3e671f9e-0b82-4774-a2f2-f8d0ffa36255?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2301' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:03:58 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/3e671f9e-0b82-4774-a2f2-f8d0ffa36255?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3e671f9e-0b82-4774-a2f2-f8d0ffa36255?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:04:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3e671f9e-0b82-4774-a2f2-f8d0ffa36255?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:04:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3e671f9e-0b82-4774-a2f2-f8d0ffa36255?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:05:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3e671f9e-0b82-4774-a2f2-f8d0ffa36255?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:05:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3e671f9e-0b82-4774-a2f2-f8d0ffa36255?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:05:52.715912Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"3b16a147-c747-499d-8766-af387fccd08d","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:05:52.715912Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:05:52.715912Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:05:52.715912Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:05:52.715912Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2595' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:05:52.715912Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"3b16a147-c747-499d-8766-af387fccd08d","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:05:52.715912Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:05:52.715912Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:05:52.715912Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:05:52.715912Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2595' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000004"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/d0a867ff-aef2-45a2-987d-283597c7cc6b?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:30 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/operationResults/d0a867ff-aef2-45a2-987d-283597c7cc6b?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/d0a867ff-aef2-45a2-987d-283597c7cc6b?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000004","properties":{"resource":{"id":"cli000004","_rid":"Sox-AA==","_self":"dbs/Sox-AA==/","_etag":"\"00003004-0000-0700-0000-633543fa0000\"","_colls":"colls/","_users":"users/","_ts":1664435194}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '464' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002", "indexingPolicy": {"automatic": + true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": + [{"path": "/\"_etag\"/?"}]}, "partitionKey": {"paths": ["/pk"], "kind": "Hash"}}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + Content-Length: + - '265' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n -p + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/26416ced-5c7e-4064-9a5d-7ac3c88db91e?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:01 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers/cli000002/operationResults/26416ced-5c7e-4064-9a5d-7ac3c88db91e?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/26416ced-5c7e-4064-9a5d-7ac3c88db91e?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"Sox-APDcPD0=","_ts":1664435226,"_self":"dbs/Sox-AA==/colls/Sox-APDcPD0=/","_etag":"\"00003304-0000-0700-0000-6335441a0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1103' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"Sox-APDcPD0=","_ts":1664435226,"_self":"dbs/Sox-AA==/colls/Sox-APDcPD0=/","_etag":"\"00003304-0000-0700-0000-6335441a0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1103' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"Sox-APDcPD0=","_ts":1664435226,"_self":"dbs/Sox-AA==/colls/Sox-APDcPD0=/","_etag":"\"00003304-0000-0700-0000-6335441a0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1103' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers/invalid?api-version=2022-08-15 + response: + body: + string: '{"code":"NotFound","message":"Message: {\"code\":\"NotFound\",\"message\":\"Message: + {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https:\\\\/\\\\/aka.ms\\\\/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: + 63504c0c-3fc5-11ed-be4d-9c7bef4baa38, Request URI: /apps/25ff1d5a-4a3c-439e-895e-627596b0951f/services/a53fdc6d-4d83-4b13-8753-86c001f0cfe3/partitions/27a51d0b-fce7-4f76-bfc5-0bc27b070ff5/replicas/133088736049728116s, + RequestStats: \\r\\nRequestStartTime: 2022-09-29T07:07:35.0913252Z, RequestEndTime: + 2022-09-29T07:07:35.0913252Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-29T07:06:26.2305547Z\\\",\\\"cpu\\\":2.041,\\\"memory\\\":626278976.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0207,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":240},{\\\"dateUtc\\\":\\\"2022-09-29T07:06:36.2406525Z\\\",\\\"cpu\\\":1.877,\\\"memory\\\":626178020.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0157,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":239},{\\\"dateUtc\\\":\\\"2022-09-29T07:06:46.2407823Z\\\",\\\"cpu\\\":1.489,\\\"memory\\\":626308220.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0202,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":239},{\\\"dateUtc\\\":\\\"2022-09-29T07:06:56.2508781Z\\\",\\\"cpu\\\":0.295,\\\"memory\\\":626228468.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0124,\\\"availableThreads\\\":32760,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":239},{\\\"dateUtc\\\":\\\"2022-09-29T07:07:06.2609887Z\\\",\\\"cpu\\\":0.244,\\\"memory\\\":626250864.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0309,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":219},{\\\"dateUtc\\\":\\\"2022-09-29T07:07:16.2711223Z\\\",\\\"cpu\\\":1.252,\\\"memory\\\":626185568.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0201,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":220}]}\\r\\nRequestStart: + 2022-09-29T07:07:35.0913252Z; ResponseTime: 2022-09-29T07:07:35.0913252Z; + StoreResult: StorePhysicalAddress: rntbd://10.0.1.11:11000/apps/25ff1d5a-4a3c-439e-895e-627596b0951f/services/a53fdc6d-4d83-4b13-8753-86c001f0cfe3/partitions/27a51d0b-fce7-4f76-bfc5-0bc27b070ff5/replicas/133088736049728116s, + LSN: 11, GlobalCommittedLsn: 11, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#11, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.232, ActivityId: + 63504c0c-3fc5-11ed-be4d-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:07:35.0913252Z\\\", \\\"durationInMs\\\": 0.0117},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:07:35.0913369Z\\\", + \\\"durationInMs\\\": 0.0037},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:07:35.0913406Z\\\", \\\"durationInMs\\\": 0.1262},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:07:35.0914668Z\\\", + \\\"durationInMs\\\": 0.4043},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:07:35.0918711Z\\\", \\\"durationInMs\\\": 0.0349},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:07:35.0919060Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:07:35.0513064Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:07:35.0513064Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:07:35.0913252Z\\\"},\\\"requestSizeInBytes\\\":482,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Collection, OperationType: Read\\r\\nRequestStart: 2022-09-29T07:07:35.0913252Z; + ResponseTime: 2022-09-29T07:07:35.0913252Z; StoreResult: StorePhysicalAddress: + rntbd://10.0.1.4:11300/apps/25ff1d5a-4a3c-439e-895e-627596b0951f/services/a53fdc6d-4d83-4b13-8753-86c001f0cfe3/partitions/27a51d0b-fce7-4f76-bfc5-0bc27b070ff5/replicas/133088736049728115s, + LSN: 11, GlobalCommittedLsn: 11, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#11, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.282, ActivityId: + 63504c0c-3fc5-11ed-be4d-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:07:35.0913252Z\\\", \\\"durationInMs\\\": 0.0046},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:07:35.0913298Z\\\", + \\\"durationInMs\\\": 0.0033},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:07:35.0913331Z\\\", \\\"durationInMs\\\": 0.0771},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:07:35.0914102Z\\\", + \\\"durationInMs\\\": 0.5681},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:07:35.0919783Z\\\", \\\"durationInMs\\\": 0.0328},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:07:35.0920111Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:07:35.0213066Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:07:35.0213066Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:07:35.0513064Z\\\"},\\\"requestSizeInBytes\\\":482,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Collection, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, + Request URI: /dbs/cli000004/colls/invalid, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '6545' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 404 + message: NotFound +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"Sox-APDcPD0=","_ts":1664435226,"_self":"dbs/Sox-AA==/colls/Sox-APDcPD0=/","_etag":"\"00003304-0000-0700-0000-6335441a0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1002' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:35 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/22346cdb-453c-49fe-8990-62c4c3629688?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:36 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000004/containers/cli000002/operationResults/22346cdb-453c-49fe-8990-62c4c3629688?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/22346cdb-453c-49fe-8990-62c4c3629688?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:06 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container_adaptiveru.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container_adaptiveru.yaml index cdb26b27f7a..40184bdf257 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container_adaptiveru.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container_adaptiveru.yaml @@ -1,1205 +1,1205 @@ -interactions: -- request: - body: '{"properties": {"resource": {"id": "cli000003"}, "options": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql database create - Connection: - - keep-alive - Content-Length: - - '64' - Content-Type: - - application/json - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3b36e9ad-e70c-49d0-bbe4-07947ce53804?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:14:33 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/operationResults/3b36e9ad-e70c-49d0-bbe4-07947ce53804?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql database create - Connection: - - keep-alive - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3b36e9ad-e70c-49d0-bbe4-07947ce53804?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:15:03 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql database create - Connection: - - keep-alive - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"0mtTAA==","_self":"dbs/0mtTAA==/","_etag":"\"0000d712-0000-0200-0000-632a3b4e0000\"","_colls":"colls/","_users":"users/","_ts":1663712078}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '441' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:15:04 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"id": "cli000002", "indexingPolicy": {"automatic": - true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": - [{"path": "/\"_etag\"/?"}]}, "partitionKey": {"paths": ["/pk"], "kind": "Hash"}}, - "options": {"throughput": 18000}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container create - Connection: - - keep-alive - Content-Length: - - '284' - Content-Type: - - application/json - ParameterSetName: - - -g -a -d -n -p --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/ce8a68af-1835-406e-b9d6-4d88d14b4a45?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:15:07 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/operationResults/ce8a68af-1835-406e-b9d6-4d88d14b4a45?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container create - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n -p --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/ce8a68af-1835-406e-b9d6-4d88d14b4a45?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:15:37 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container create - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n -p --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"0mtTAIqzAsM=","_ts":1663712113,"_self":"dbs/0mtTAA==/colls/0mtTAIqzAsM=/","_etag":"\"0000d912-0000-0200-0000-632a3b710000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '1250' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:15:37 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"throughput": 3000}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container throughput update - Connection: - - keep-alive - Content-Length: - - '50' - Content-Type: - - application/json - ParameterSetName: - - -g -a -d -n --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/ff912041-f2bf-43dc-a27f-6431d82b7f90?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:15:39 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/operationResults/ff912041-f2bf-43dc-a27f-6431d82b7f90?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container throughput update - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/ff912041-f2bf-43dc-a27f-6431d82b7f90?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:09 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container throughput update - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings","name":"w+ZB","properties":{"resource":{"throughput":3000,"minimumThroughput":"400"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '395' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:09 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container retrieve-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --all-partitions - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"0mtTAIqzAsM=","_ts":1663712113,"_self":"dbs/0mtTAA==/colls/0mtTAIqzAsM=/","_etag":"\"0000d912-0000-0200-0000-632a3b710000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '1250' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:10 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"physicalPartitionIds": [{"id": "-1"}]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container retrieve-partition-throughput - Connection: - - keep-alive - Content-Length: - - '70' - Content-Type: - - application/json - ParameterSetName: - - --resource-group --account-name --database-name --name --all-partitions - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bfb04e53-d716-45e0-a1c9-4d55b0a80f4a?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:11 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/bfb04e53-d716-45e0-a1c9-4d55b0a80f4a?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container retrieve-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --all-partitions - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bfb04e53-d716-45e0-a1c9-4d55b0a80f4a?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:41 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container retrieve-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --all-partitions - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/bfb04e53-d716-45e0-a1c9-4d55b0a80f4a?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings/retrieveThroughputDistribution","name":"w+ZB","properties":{"resource":{"physicalPartitionThroughputInfo":[{"throughput":1000.0,"id":"2"},{"throughput":1000.0,"id":"0"},{"throughput":1000.0,"id":"1"}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '542' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:41 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container retrieve-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --physical-partition-ids - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"0mtTAIqzAsM=","_ts":1663712113,"_self":"dbs/0mtTAA==/colls/0mtTAIqzAsM=/","_etag":"\"0000d912-0000-0200-0000-632a3b710000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '1250' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:42 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"physicalPartitionIds": [{"id": "0"}, {"id": - "1"}]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container retrieve-partition-throughput - Connection: - - keep-alive - Content-Length: - - '82' - Content-Type: - - application/json - ParameterSetName: - - --resource-group --account-name --database-name --name --physical-partition-ids - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/2aa5893e-3af1-42e1-a824-f0552913f5b4?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:16:43 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/2aa5893e-3af1-42e1-a824-f0552913f5b4?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container retrieve-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --physical-partition-ids - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/2aa5893e-3af1-42e1-a824-f0552913f5b4?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:17:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container retrieve-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --physical-partition-ids - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/2aa5893e-3af1-42e1-a824-f0552913f5b4?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings/retrieveThroughputDistribution","name":"w+ZB","properties":{"resource":{"physicalPartitionThroughputInfo":[{"throughput":1000.0,"id":"0"},{"throughput":1000.0,"id":"1"}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '511' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:17:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container redistribute-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --target-partition-info - --source-partition-info - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"0mtTAIqzAsM=","_ts":1663712113,"_self":"dbs/0mtTAA==/colls/0mtTAIqzAsM=/","_etag":"\"0000d912-0000-0200-0000-632a3b710000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '1250' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:17:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"throughputPolicy": "custom", "targetPhysicalPartitionThroughputInfo": - [{"id": "0", "throughput": 1200.0}, {"id": "1", "throughput": 1200.0}], "sourcePhysicalPartitionThroughputInfo": - [{"id": "2", "throughput": 0.0}]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container redistribute-partition-throughput - Connection: - - keep-alive - Content-Length: - - '248' - Content-Type: - - application/json - ParameterSetName: - - --resource-group --account-name --database-name --name --target-partition-info - --source-partition-info - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/4d2e8fa6-3400-4188-82c0-dde5f327164d?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:17:15 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput/operationResults/4d2e8fa6-3400-4188-82c0-dde5f327164d?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container redistribute-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --target-partition-info - --source-partition-info - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/4d2e8fa6-3400-4188-82c0-dde5f327164d?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:17:46 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container redistribute-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --target-partition-info - --source-partition-info - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput/operationResults/4d2e8fa6-3400-4188-82c0-dde5f327164d?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings/redistributeThroughput","name":"w+ZB","properties":{"resource":{"physicalPartitionThroughputInfo":[{"throughput":599.99999999999966,"id":"2"},{"throughput":1200.0,"id":"0"},{"throughput":1200.0,"id":"1"}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '538' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:17:46 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container redistribute-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --evenly-distribute - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"0mtTAIqzAsM=","_ts":1663712113,"_self":"dbs/0mtTAA==/colls/0mtTAIqzAsM=/","_etag":"\"0000d912-0000-0200-0000-632a3b710000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '1250' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:17:47 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"throughputPolicy": "equal", "targetPhysicalPartitionThroughputInfo": - [], "sourcePhysicalPartitionThroughputInfo": []}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container redistribute-partition-throughput - Connection: - - keep-alive - Content-Length: - - '149' - Content-Type: - - application/json - ParameterSetName: - - --resource-group --account-name --database-name --name --evenly-distribute - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/344f40cd-8ce8-4db4-9d62-ee3eee69806a?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:17:48 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput/operationResults/344f40cd-8ce8-4db4-9d62-ee3eee69806a?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container redistribute-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --evenly-distribute - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/344f40cd-8ce8-4db4-9d62-ee3eee69806a?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:18:18 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container redistribute-partition-throughput - Connection: - - keep-alive - ParameterSetName: - - --resource-group --account-name --database-name --name --evenly-distribute - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput/operationResults/344f40cd-8ce8-4db4-9d62-ee3eee69806a?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/sqladru2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings/redistributeThroughput","name":"w+ZB","properties":{"resource":{"physicalPartitionThroughputInfo":[{"throughput":1000.0,"id":"2"},{"throughput":1000.0,"id":"0"},{"throughput":1000.0,"id":"1"}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '526' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 22:18:18 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -version: 1 +interactions: +- request: + body: '{"properties": {"resource": {"id": "cli000003"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/d4bfff43-daa1-47da-af9d-f50e0768bdc1?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:02:48 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/operationResults/d4bfff43-daa1-47da-af9d-f50e0768bdc1?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/d4bfff43-daa1-47da-af9d-f50e0768bdc1?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:03:18 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"nh8JAA==","_self":"dbs/nh8JAA==/","_etag":"\"00005101-0000-1a00-0000-6335512d0000\"","_colls":"colls/","_users":"users/","_ts":1664438573}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '437' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:03:18 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002", "indexingPolicy": {"automatic": + true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": + [{"path": "/\"_etag\"/?"}]}, "partitionKey": {"paths": ["/pk"], "kind": "Hash"}}, + "options": {"throughput": 18000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + Content-Length: + - '284' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n -p --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/e4787db0-b8e6-4b58-8e2e-c8d7b0767e1e?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:03:21 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/operationResults/e4787db0-b8e6-4b58-8e2e-c8d7b0767e1e?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/e4787db0-b8e6-4b58-8e2e-c8d7b0767e1e?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:03:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"nh8JAIdmG4g=","_ts":1664438610,"_self":"dbs/nh8JAA==/colls/nh8JAIdmG4g=/","_etag":"\"00005301-0000-1a00-0000-633551520000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1246' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:03:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"throughput": 3000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container throughput update + Connection: + - keep-alive + Content-Length: + - '50' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/c80859c1-6c53-4b4b-b30b-db54dd503fa1?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:03:54 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/operationResults/c80859c1-6c53-4b4b-b30b-db54dd503fa1?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container throughput update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/c80859c1-6c53-4b4b-b30b-db54dd503fa1?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:24 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container throughput update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings","name":"tVyT","properties":{"resource":{"throughput":3000,"minimumThroughput":"400"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '391' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:24 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container retrieve-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --all-partitions + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"nh8JAIdmG4g=","_ts":1664438610,"_self":"dbs/nh8JAA==/colls/nh8JAIdmG4g=/","_etag":"\"00005301-0000-1a00-0000-633551520000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1246' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"physicalPartitionIds": [{"id": "-1"}]}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container retrieve-partition-throughput + Connection: + - keep-alive + Content-Length: + - '70' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --account-name --database-name --name --all-partitions + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/1500a51a-7ac6-48e5-a67a-81d5729c6f29?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:26 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/1500a51a-7ac6-48e5-a67a-81d5729c6f29?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container retrieve-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --all-partitions + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/1500a51a-7ac6-48e5-a67a-81d5729c6f29?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:56 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container retrieve-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --all-partitions + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/1500a51a-7ac6-48e5-a67a-81d5729c6f29?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings/retrieveThroughputDistribution","name":"tVyT","properties":{"resource":{"physicalPartitionThroughputInfo":[{"throughput":1000.0,"id":"0"},{"throughput":1000.0,"id":"1"},{"throughput":1000.0,"id":"2"}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '538' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container retrieve-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --physical-partition-ids + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"nh8JAIdmG4g=","_ts":1664438610,"_self":"dbs/nh8JAA==/colls/nh8JAIdmG4g=/","_etag":"\"00005301-0000-1a00-0000-633551520000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1246' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"physicalPartitionIds": [{"id": "0"}, {"id": + "1"}]}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container retrieve-partition-throughput + Connection: + - keep-alive + Content-Length: + - '82' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --account-name --database-name --name --physical-partition-ids + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/e3252c3b-83cf-4b37-8494-d7c42b4c20a1?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:59 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/e3252c3b-83cf-4b37-8494-d7c42b4c20a1?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container retrieve-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --physical-partition-ids + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/e3252c3b-83cf-4b37-8494-d7c42b4c20a1?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:05:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container retrieve-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --physical-partition-ids + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution/operationResults/e3252c3b-83cf-4b37-8494-d7c42b4c20a1?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/retrieveThroughputDistribution","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings/retrieveThroughputDistribution","name":"tVyT","properties":{"resource":{"physicalPartitionThroughputInfo":[{"throughput":1000.0,"id":"0"},{"throughput":1000.0,"id":"1"}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '507' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:05:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container redistribute-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --target-partition-info + --source-partition-info + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"nh8JAIdmG4g=","_ts":1664438610,"_self":"dbs/nh8JAA==/colls/nh8JAIdmG4g=/","_etag":"\"00005301-0000-1a00-0000-633551520000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1246' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:05:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"throughputPolicy": "custom", "targetPhysicalPartitionThroughputInfo": + [{"id": "0", "throughput": 1200.0}, {"id": "1", "throughput": 1200.0}], "sourcePhysicalPartitionThroughputInfo": + [{"id": "2", "throughput": 0.0}]}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container redistribute-partition-throughput + Connection: + - keep-alive + Content-Length: + - '248' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --account-name --database-name --name --target-partition-info + --source-partition-info + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/355b3dd6-ca5b-4e24-b5cb-98af78875432?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:05:31 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput/operationResults/355b3dd6-ca5b-4e24-b5cb-98af78875432?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container redistribute-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --target-partition-info + --source-partition-info + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/355b3dd6-ca5b-4e24-b5cb-98af78875432?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:06:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container redistribute-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --target-partition-info + --source-partition-info + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput/operationResults/355b3dd6-ca5b-4e24-b5cb-98af78875432?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings/redistributeThroughput","name":"tVyT","properties":{"resource":{"physicalPartitionThroughputInfo":[{"throughput":1200.0,"id":"0"},{"throughput":1200.0,"id":"1"},{"throughput":599.99999999999966,"id":"2"}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '534' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:06:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container redistribute-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --evenly-distribute + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"nh8JAIdmG4g=","_ts":1664438610,"_self":"dbs/nh8JAA==/colls/nh8JAIdmG4g=/","_etag":"\"00005301-0000-1a00-0000-633551520000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1246' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:06:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"throughputPolicy": "equal", "targetPhysicalPartitionThroughputInfo": + [], "sourcePhysicalPartitionThroughputInfo": []}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container redistribute-partition-throughput + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --account-name --database-name --name --evenly-distribute + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/5d86ed1e-e315-4e32-9d26-92928c8600ee?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:06:02 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput/operationResults/5d86ed1e-e315-4e32-9d26-92928c8600ee?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container redistribute-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --evenly-distribute + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/australiaeast/operationsStatus/5d86ed1e-e315-4e32-9d26-92928c8600ee?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:06:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container redistribute-partition-throughput + Connection: + - keep-alive + ParameterSetName: + - --resource-group --account-name --database-name --name --evenly-distribute + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput/operationResults/5d86ed1e-e315-4e32-9d26-92928c8600ee?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/adrutest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/redistributeThroughput","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings/redistributeThroughput","name":"tVyT","properties":{"resource":{"physicalPartitionThroughputInfo":[{"throughput":1000.0,"id":"0"},{"throughput":1000.0,"id":"1"},{"throughput":1000.0,"id":"2"}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '522' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:06:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container_backupinfo.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container_backupinfo.yaml index c50249dc398..2dc7bbb8184 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container_backupinfo.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container_backupinfo.yaml @@ -13,9 +13,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/cli000004'' @@ -29,7 +29,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:08 GMT + - Thu, 29 Sep 2022 07:36:49 GMT expires: - '-1' pragma: @@ -57,12 +57,13 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_container_backupinfo000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001","name":"cli_test_cosmosdb_sql_container_backupinfo000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001","name":"cli_test_cosmosdb_sql_container_backupinfo000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:36:45Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -71,7 +72,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:08 GMT + - Thu, 29 Sep 2022 07:36:49 GMT expires: - '-1' pragma: @@ -107,30 +108,30 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:12.8403383Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"08925518-7cca-41f1-881c-6b404c728f04","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:36:54.0205075Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"9ea6fb52-a251-464b-aace-42338f28d639","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:36:54.0205075Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:36:54.0205075Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:36:54.0205075Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:36:54.0205075Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/90eac32f-ff2d-4a18-a5f7-a7930da575cf?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b457c8bc-5118-414e-b47e-96c4a66ddaaa?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '1899' + - '2326' content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:13 GMT + - Thu, 29 Sep 2022 07:36:55 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/90eac32f-ff2d-4a18-a5f7-a7930da575cf?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/b457c8bc-5118-414e-b47e-96c4a66ddaaa?api-version=2022-08-15-preview pragma: - no-cache server: @@ -164,9 +165,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/90eac32f-ff2d-4a18-a5f7-a7930da575cf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b457c8bc-5118-414e-b47e-96c4a66ddaaa?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -178,7 +179,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:44 GMT + - Thu, 29 Sep 2022 07:37:26 GMT pragma: - no-cache server: @@ -210,9 +211,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/90eac32f-ff2d-4a18-a5f7-a7930da575cf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b457c8bc-5118-414e-b47e-96c4a66ddaaa?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -224,7 +225,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:14 GMT + - Thu, 29 Sep 2022 07:37:55 GMT pragma: - no-cache server: @@ -256,9 +257,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/90eac32f-ff2d-4a18-a5f7-a7930da575cf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b457c8bc-5118-414e-b47e-96c4a66ddaaa?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -270,7 +271,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:44 GMT + - Thu, 29 Sep 2022 07:38:26 GMT pragma: - no-cache server: @@ -302,9 +303,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/90eac32f-ff2d-4a18-a5f7-a7930da575cf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b457c8bc-5118-414e-b47e-96c4a66ddaaa?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -316,7 +317,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:15 GMT + - Thu, 29 Sep 2022 07:38:56 GMT pragma: - no-cache server: @@ -348,9 +349,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/90eac32f-ff2d-4a18-a5f7-a7930da575cf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b457c8bc-5118-414e-b47e-96c4a66ddaaa?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -362,7 +363,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:44 GMT + - Thu, 29 Sep 2022 07:39:26 GMT pragma: - no-cache server: @@ -394,9 +395,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/90eac32f-ff2d-4a18-a5f7-a7930da575cf?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b457c8bc-5118-414e-b47e-96c4a66ddaaa?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -408,7 +409,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:15 GMT + - Thu, 29 Sep 2022 07:39:56 GMT pragma: - no-cache server: @@ -440,26 +441,26 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:17.5254151Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"08925518-7cca-41f1-881c-6b404c728f04","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:38:59.0090968Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"9ea6fb52-a251-464b-aace-42338f28d639","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:38:59.0090968Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:38:59.0090968Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:38:59.0090968Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:38:59.0090968Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2201' + - '2628' content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:15 GMT + - Thu, 29 Sep 2022 07:39:56 GMT pragma: - no-cache server: @@ -491,26 +492,26 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:17.5254151Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"08925518-7cca-41f1-881c-6b404c728f04","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:38:59.0090968Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"9ea6fb52-a251-464b-aace-42338f28d639","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:38:59.0090968Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:38:59.0090968Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:38:59.0090968Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:38:59.0090968Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2201' + - '2628' content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:16 GMT + - Thu, 29 Sep 2022 07:39:56 GMT pragma: - no-cache server: @@ -542,26 +543,26 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:17.5254151Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"08925518-7cca-41f1-881c-6b404c728f04","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:38:59.0090968Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"9ea6fb52-a251-464b-aace-42338f28d639","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:38:59.0090968Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:38:59.0090968Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:38:59.0090968Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:38:59.0090968Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2201' + - '2628' content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:16 GMT + - Thu, 29 Sep 2022 07:39:57 GMT pragma: - no-cache server: @@ -593,60 +594,60 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"code":"NotFound","message":"Message: {\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https:\\\\/\\\\/aka.ms\\\\/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: - 36728629-38b6-11ed-9b23-8cdcd4532c5b, Request URI: /apps/dc128d2c-0ec6-4555-86e6-1ffdea64390e/services/74283fc5-6a19-417f-8031-6e893ab60f72/partitions/96a8e908-4539-4516-b5de-30bba5ce1be8/replicas/133079382131745289s, - RequestStats: \\r\\nRequestStartTime: 2022-09-20T07:31:17.6070355Z, RequestEndTime: - 2022-09-20T07:31:17.6070355Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-20T07:30:11.7174322Z\\\",\\\"cpu\\\":0.600,\\\"memory\\\":629648352.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0614,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":565},{\\\"dateUtc\\\":\\\"2022-09-20T07:30:21.7273735Z\\\",\\\"cpu\\\":0.985,\\\"memory\\\":629419388.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0138,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":565},{\\\"dateUtc\\\":\\\"2022-09-20T07:30:31.7372993Z\\\",\\\"cpu\\\":0.520,\\\"memory\\\":629317384.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0175,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":565},{\\\"dateUtc\\\":\\\"2022-09-20T07:30:41.7472133Z\\\",\\\"cpu\\\":0.288,\\\"memory\\\":629184328.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0278,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":565},{\\\"dateUtc\\\":\\\"2022-09-20T07:30:51.7571680Z\\\",\\\"cpu\\\":0.373,\\\"memory\\\":628971612.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0142,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":565},{\\\"dateUtc\\\":\\\"2022-09-20T07:31:01.7671235Z\\\",\\\"cpu\\\":0.500,\\\"memory\\\":628517276.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0843,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":565}]}\\r\\nRequestStart: - 2022-09-20T07:31:17.6070355Z; ResponseTime: 2022-09-20T07:31:17.6070355Z; - StoreResult: StorePhysicalAddress: rntbd://10.0.1.6:11300/apps/dc128d2c-0ec6-4555-86e6-1ffdea64390e/services/74283fc5-6a19-417f-8031-6e893ab60f72/partitions/96a8e908-4539-4516-b5de-30bba5ce1be8/replicas/133079382131745289s, + e9b38849-3fc9-11ed-9ff3-9c7bef4baa38, Request URI: /apps/894230b7-08ab-4a13-84bf-bf849e5cd255/services/6b740a7f-5b93-44c1-89b1-dc5c1aea8ff8/partitions/9b936c3b-6e01-47ba-a70c-ea2628dd04e5/replicas/133016211018784162s, + RequestStats: \\r\\nRequestStartTime: 2022-09-29T07:39:58.6126309Z, RequestEndTime: + 2022-09-29T07:39:58.6126309Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-29T07:38:55.9619761Z\\\",\\\"cpu\\\":0.276,\\\"memory\\\":655517188.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0192,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":126},{\\\"dateUtc\\\":\\\"2022-09-29T07:39:05.9720832Z\\\",\\\"cpu\\\":0.251,\\\"memory\\\":655394144.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.025,\\\"availableThreads\\\":32761,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":126},{\\\"dateUtc\\\":\\\"2022-09-29T07:39:25.9822872Z\\\",\\\"cpu\\\":0.281,\\\"memory\\\":654960572.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0135,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":127},{\\\"dateUtc\\\":\\\"2022-09-29T07:39:35.9923969Z\\\",\\\"cpu\\\":0.239,\\\"memory\\\":654957300.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.027,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":127},{\\\"dateUtc\\\":\\\"2022-09-29T07:39:46.0125002Z\\\",\\\"cpu\\\":0.241,\\\"memory\\\":654726564.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0275,\\\"availableThreads\\\":32752,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":127},{\\\"dateUtc\\\":\\\"2022-09-29T07:39:56.0226027Z\\\",\\\"cpu\\\":0.168,\\\"memory\\\":654744680.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0165,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":127}]}\\r\\nRequestStart: + 2022-09-29T07:39:58.6126309Z; ResponseTime: 2022-09-29T07:39:58.6126309Z; + StoreResult: StorePhysicalAddress: rntbd://10.0.1.4:11000/apps/894230b7-08ab-4a13-84bf-bf849e5cd255/services/6b740a7f-5b93-44c1-89b1-dc5c1aea8ff8/partitions/9b936c3b-6e01-47ba-a70c-ea2628dd04e5/replicas/133016211018784162s, LSN: 9, GlobalCommittedLsn: 9, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#9, - UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.714, ActivityId: - 36728629-38b6-11ed-9b23-8cdcd4532c5b, RetryAfterInMs: , TransportRequestTimeline: + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.852, ActivityId: + e9b38849-3fc9-11ed-9ff3-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:31:17.6070355Z\\\", \\\"durationInMs\\\": 0.0171},{\\\"event\\\": - \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:31:17.6070526Z\\\", - \\\"durationInMs\\\": 0.0033},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:31:17.6070559Z\\\", \\\"durationInMs\\\": 0.2402},{\\\"event\\\": - \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:31:17.6072961Z\\\", - \\\"durationInMs\\\": 0.8383},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:31:17.6081344Z\\\", \\\"durationInMs\\\": 0.1888},{\\\"event\\\": - \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:31:17.6083232Z\\\", - \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-20T07:31:17.5570455Z\\\",\\\"lastSend\\\":\\\"2022-09-20T07:31:17.5570455Z\\\",\\\"lastReceive\\\":\\\"2022-09-20T07:31:17.5670355Z\\\"},\\\"requestSizeInBytes\\\":466,\\\"responseMetadataSizeInBytes\\\":134,\\\"responseBodySizeInBytes\\\":87};\\r\\n - ResourceType: Database, OperationType: Read\\r\\nRequestStart: 2022-09-20T07:31:17.6070355Z; - ResponseTime: 2022-09-20T07:31:17.6070355Z; StoreResult: StorePhysicalAddress: - rntbd://10.0.1.7:11000/apps/dc128d2c-0ec6-4555-86e6-1ffdea64390e/services/74283fc5-6a19-417f-8031-6e893ab60f72/partitions/96a8e908-4539-4516-b5de-30bba5ce1be8/replicas/133079382131745288s, + \\\"2022-09-29T07:39:58.6126309Z\\\", \\\"durationInMs\\\": 0.0143},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:39:58.6126452Z\\\", + \\\"durationInMs\\\": 0.0112},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:39:58.6126564Z\\\", \\\"durationInMs\\\": 0.1112},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:39:58.6127676Z\\\", + \\\"durationInMs\\\": 1.199},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:39:58.6139666Z\\\", \\\"durationInMs\\\": 0.0789},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:39:58.6140455Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:39:52.1525630Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:39:52.1525630Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:39:52.1525630Z\\\"},\\\"requestSizeInBytes\\\":464,\\\"responseMetadataSizeInBytes\\\":134,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Database, OperationType: Read\\r\\nRequestStart: 2022-09-29T07:39:58.6126309Z; + ResponseTime: 2022-09-29T07:39:58.6126309Z; StoreResult: StorePhysicalAddress: + rntbd://10.0.1.13:11000/apps/894230b7-08ab-4a13-84bf-bf849e5cd255/services/6b740a7f-5b93-44c1-89b1-dc5c1aea8ff8/partitions/9b936c3b-6e01-47ba-a70c-ea2628dd04e5/replicas/133016211078035672s, LSN: 9, GlobalCommittedLsn: 9, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#9, - UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.825, ActivityId: - 36728629-38b6-11ed-9b23-8cdcd4532c5b, RetryAfterInMs: , TransportRequestTimeline: + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.737, ActivityId: + e9b38849-3fc9-11ed-9ff3-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:31:17.6070355Z\\\", \\\"durationInMs\\\": 0.0033},{\\\"event\\\": - \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:31:17.6070388Z\\\", - \\\"durationInMs\\\": 0.0012},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:31:17.6070400Z\\\", \\\"durationInMs\\\": 0.2446},{\\\"event\\\": - \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:31:17.6072846Z\\\", - \\\"durationInMs\\\": 0.8823},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:31:17.6081669Z\\\", \\\"durationInMs\\\": 0.0562},{\\\"event\\\": - \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:31:17.6082231Z\\\", - \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-20T07:31:17.5570455Z\\\",\\\"lastSend\\\":\\\"2022-09-20T07:31:17.5570455Z\\\",\\\"lastReceive\\\":\\\"2022-09-20T07:31:17.5670355Z\\\"},\\\"requestSizeInBytes\\\":466,\\\"responseMetadataSizeInBytes\\\":134,\\\"responseBodySizeInBytes\\\":87};\\r\\n + \\\"2022-09-29T07:39:58.6126309Z\\\", \\\"durationInMs\\\": 0.0048},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:39:58.6126357Z\\\", + \\\"durationInMs\\\": 0.0018},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:39:58.6126375Z\\\", \\\"durationInMs\\\": 0.0911},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:39:58.6127286Z\\\", + \\\"durationInMs\\\": 1.0668},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:39:58.6137954Z\\\", \\\"durationInMs\\\": 0.1472},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:39:58.6139426Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:39:58.5426439Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:39:58.5426439Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:39:58.5726310Z\\\"},\\\"requestSizeInBytes\\\":464,\\\"responseMetadataSizeInBytes\\\":134,\\\"responseBodySizeInBytes\\\":87};\\r\\n ResourceType: Database, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, Request URI: /dbs/cli000003, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0"}' headers: cache-control: - no-store, no-cache content-length: - - '6520' + - '6518' content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:16 GMT + - Thu, 29 Sep 2022 07:39:58 GMT pragma: - no-cache server: @@ -678,15 +679,15 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/d77e0bfa-54fa-4b7b-9d6d-d8f33772a188?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7f30aeeb-d5b7-4023-8409-9fa064fe8766?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -694,9 +695,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:17 GMT + - Thu, 29 Sep 2022 07:39:59 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/operationResults/d77e0bfa-54fa-4b7b-9d6d-d8f33772a188?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/operationResults/7f30aeeb-d5b7-4023-8409-9fa064fe8766?api-version=2022-08-15 pragma: - no-cache server: @@ -708,7 +709,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 202 message: Accepted @@ -726,9 +727,9 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/d77e0bfa-54fa-4b7b-9d6d-d8f33772a188?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7f30aeeb-d5b7-4023-8409-9fa064fe8766?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -740,7 +741,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:47 GMT + - Thu, 29 Sep 2022 07:40:30 GMT pragma: - no-cache server: @@ -772,12 +773,12 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"4VJCAA==","_self":"dbs/4VJCAA==/","_etag":"\"0000b902-0000-0200-0000-63296c4a0000\"","_colls":"colls/","_users":"users/","_ts":1663659082}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"T1cNAA==","_self":"dbs/T1cNAA==/","_etag":"\"0000c903-0000-0200-0000-63354bd40000\"","_colls":"colls/","_users":"users/","_ts":1664437204}}}' headers: cache-control: - no-store, no-cache @@ -786,7 +787,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:48 GMT + - Thu, 29 Sep 2022 07:40:30 GMT pragma: - no-cache server: @@ -818,12 +819,12 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"4VJCAA==","_self":"dbs/4VJCAA==/","_etag":"\"0000b902-0000-0200-0000-63296c4a0000\"","_colls":"colls/","_users":"users/","_ts":1663659082}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"T1cNAA==","_self":"dbs/T1cNAA==/","_etag":"\"0000c903-0000-0200-0000-63354bd40000\"","_colls":"colls/","_users":"users/","_ts":1664437204}}}' headers: cache-control: - no-store, no-cache @@ -832,7 +833,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:48 GMT + - Thu, 29 Sep 2022 07:40:31 GMT pragma: - no-cache server: @@ -864,60 +865,60 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15 response: body: string: '{"code":"NotFound","message":"Message: {\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https:\\\\/\\\\/aka.ms\\\\/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: - 49c03726-38b6-11ed-84a0-8cdcd4532c5b, Request URI: /apps/dc128d2c-0ec6-4555-86e6-1ffdea64390e/services/74283fc5-6a19-417f-8031-6e893ab60f72/partitions/96a8e908-4539-4516-b5de-30bba5ce1be8/replicas/133079382131745289s, - RequestStats: \\r\\nRequestStartTime: 2022-09-20T07:31:49.9378995Z, RequestEndTime: - 2022-09-20T07:31:49.9378995Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-20T07:30:54.8883525Z\\\",\\\"cpu\\\":0.436,\\\"memory\\\":639466492.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0116,\\\"availableThreads\\\":32765,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":385},{\\\"dateUtc\\\":\\\"2022-09-20T07:31:04.8982768Z\\\",\\\"cpu\\\":0.571,\\\"memory\\\":639430120.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0141,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":385},{\\\"dateUtc\\\":\\\"2022-09-20T07:31:14.9082092Z\\\",\\\"cpu\\\":0.219,\\\"memory\\\":639399236.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0238,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":385},{\\\"dateUtc\\\":\\\"2022-09-20T07:31:24.9180818Z\\\",\\\"cpu\\\":0.292,\\\"memory\\\":639411484.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0178,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":387},{\\\"dateUtc\\\":\\\"2022-09-20T07:31:34.9279800Z\\\",\\\"cpu\\\":0.342,\\\"memory\\\":639288396.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0202,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":387},{\\\"dateUtc\\\":\\\"2022-09-20T07:31:44.9379345Z\\\",\\\"cpu\\\":0.363,\\\"memory\\\":639294896.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0283,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":374}]}\\r\\nRequestStart: - 2022-09-20T07:31:49.9378995Z; ResponseTime: 2022-09-20T07:31:49.9378995Z; - StoreResult: StorePhysicalAddress: rntbd://10.0.1.6:11300/apps/dc128d2c-0ec6-4555-86e6-1ffdea64390e/services/74283fc5-6a19-417f-8031-6e893ab60f72/partitions/96a8e908-4539-4516-b5de-30bba5ce1be8/replicas/133079382131745289s, + fd5dcfda-3fc9-11ed-b703-9c7bef4baa38, Request URI: /apps/894230b7-08ab-4a13-84bf-bf849e5cd255/services/6b740a7f-5b93-44c1-89b1-dc5c1aea8ff8/partitions/9b936c3b-6e01-47ba-a70c-ea2628dd04e5/replicas/133031612828383173s, + RequestStats: \\r\\nRequestStartTime: 2022-09-29T07:40:32.5106122Z, RequestEndTime: + 2022-09-29T07:40:32.5106122Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-29T07:39:32.5490441Z\\\",\\\"cpu\\\":0.292,\\\"memory\\\":654435764.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0305,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":173},{\\\"dateUtc\\\":\\\"2022-09-29T07:39:42.5591718Z\\\",\\\"cpu\\\":0.164,\\\"memory\\\":654317992.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0148,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":173},{\\\"dateUtc\\\":\\\"2022-09-29T07:39:52.5601710Z\\\",\\\"cpu\\\":0.188,\\\"memory\\\":654085432.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0525,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":173},{\\\"dateUtc\\\":\\\"2022-09-29T07:40:02.5702911Z\\\",\\\"cpu\\\":0.899,\\\"memory\\\":653603256.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0296,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":172},{\\\"dateUtc\\\":\\\"2022-09-29T07:40:12.5803990Z\\\",\\\"cpu\\\":1.404,\\\"memory\\\":653411968.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0211,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":172},{\\\"dateUtc\\\":\\\"2022-09-29T07:40:22.5904882Z\\\",\\\"cpu\\\":1.543,\\\"memory\\\":653237436.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0398,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":172}]}\\r\\nRequestStart: + 2022-09-29T07:40:32.5106122Z; ResponseTime: 2022-09-29T07:40:32.5106122Z; + StoreResult: StorePhysicalAddress: rntbd://10.0.1.6:11300/apps/894230b7-08ab-4a13-84bf-bf849e5cd255/services/6b740a7f-5b93-44c1-89b1-dc5c1aea8ff8/partitions/9b936c3b-6e01-47ba-a70c-ea2628dd04e5/replicas/133031612828383173s, LSN: 10, GlobalCommittedLsn: 10, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#10, - UsingLocalLSN: False, TransportException: null, BELatencyMs: 1.326, ActivityId: - 49c03726-38b6-11ed-84a0-8cdcd4532c5b, RetryAfterInMs: , TransportRequestTimeline: + UsingLocalLSN: False, TransportException: null, BELatencyMs: 1.146, ActivityId: + fd5dcfda-3fc9-11ed-b703-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:31:49.9378995Z\\\", \\\"durationInMs\\\": 0.014},{\\\"event\\\": - \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:31:49.9379135Z\\\", - \\\"durationInMs\\\": 0.0034},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:31:49.9379169Z\\\", \\\"durationInMs\\\": 0.1945},{\\\"event\\\": - \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:31:49.9381114Z\\\", - \\\"durationInMs\\\": 1.5388},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:31:49.9396502Z\\\", \\\"durationInMs\\\": 0.0234},{\\\"event\\\": - \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:31:49.9396736Z\\\", - \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-20T07:31:49.6879085Z\\\",\\\"lastSend\\\":\\\"2022-09-20T07:31:49.6879085Z\\\",\\\"lastReceive\\\":\\\"2022-09-20T07:31:49.6879085Z\\\"},\\\"requestSizeInBytes\\\":494,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n - ResourceType: Collection, OperationType: Read\\r\\nRequestStart: 2022-09-20T07:31:49.9378995Z; - ResponseTime: 2022-09-20T07:31:49.9378995Z; StoreResult: StorePhysicalAddress: - rntbd://10.0.1.8:11000/apps/dc128d2c-0ec6-4555-86e6-1ffdea64390e/services/74283fc5-6a19-417f-8031-6e893ab60f72/partitions/96a8e908-4539-4516-b5de-30bba5ce1be8/replicas/133079382131745287s, + \\\"2022-09-29T07:40:32.5106122Z\\\", \\\"durationInMs\\\": 0.0153},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:40:32.5106275Z\\\", + \\\"durationInMs\\\": 0.0033},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:40:32.5106308Z\\\", \\\"durationInMs\\\": 0.1163},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:40:32.5107471Z\\\", + \\\"durationInMs\\\": 1.4011},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:40:32.5121482Z\\\", \\\"durationInMs\\\": 0.0503},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:40:32.5121985Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:40:32.3506080Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:40:32.3506080Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:40:32.3506080Z\\\"},\\\"requestSizeInBytes\\\":494,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Collection, OperationType: Read\\r\\nRequestStart: 2022-09-29T07:40:32.5106122Z; + ResponseTime: 2022-09-29T07:40:32.5106122Z; StoreResult: StorePhysicalAddress: + rntbd://10.0.1.13:11000/apps/894230b7-08ab-4a13-84bf-bf849e5cd255/services/6b740a7f-5b93-44c1-89b1-dc5c1aea8ff8/partitions/9b936c3b-6e01-47ba-a70c-ea2628dd04e5/replicas/133016211078035672s, LSN: 10, GlobalCommittedLsn: 10, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#10, - UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.686, ActivityId: - 49c03726-38b6-11ed-84a0-8cdcd4532c5b, RetryAfterInMs: , TransportRequestTimeline: + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.823, ActivityId: + fd5dcfda-3fc9-11ed-b703-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:31:49.9378995Z\\\", \\\"durationInMs\\\": 0.0037},{\\\"event\\\": - \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:31:49.9379032Z\\\", - \\\"durationInMs\\\": 0.0012},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:31:49.9379044Z\\\", \\\"durationInMs\\\": 0.1458},{\\\"event\\\": - \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:31:49.9380502Z\\\", - \\\"durationInMs\\\": 1.1098},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:31:49.9391600Z\\\", \\\"durationInMs\\\": 0.0688},{\\\"event\\\": - \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:31:49.9392288Z\\\", - \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-20T07:31:49.6879085Z\\\",\\\"lastSend\\\":\\\"2022-09-20T07:31:49.6879085Z\\\",\\\"lastReceive\\\":\\\"2022-09-20T07:31:49.6879085Z\\\"},\\\"requestSizeInBytes\\\":494,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + \\\"2022-09-29T07:40:32.5106122Z\\\", \\\"durationInMs\\\": 0.0048},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:40:32.5106170Z\\\", + \\\"durationInMs\\\": 0.0013},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:40:32.5106183Z\\\", \\\"durationInMs\\\": 0.0741},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:40:32.5106924Z\\\", + \\\"durationInMs\\\": 1.1919},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:40:32.5118843Z\\\", \\\"durationInMs\\\": 0.0849},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:40:32.5119692Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:40:32.2606078Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:40:32.2606078Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:40:32.2606078Z\\\"},\\\"requestSizeInBytes\\\":494,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n ResourceType: Collection, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, Request URI: /dbs/cli000003/colls/cli000002, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0"}' headers: cache-control: - no-store, no-cache content-length: - - '6545' + - '6547' content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:49 GMT + - Thu, 29 Sep 2022 07:40:31 GMT pragma: - no-cache server: @@ -952,15 +953,15 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/77aa30da-93bc-48ec-8516-4027ccf4ffcc?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/fac139d2-c534-40db-bda0-a75dc9abd292?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -968,9 +969,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:50 GMT + - Thu, 29 Sep 2022 07:40:33 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/operationResults/77aa30da-93bc-48ec-8516-4027ccf4ffcc?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/operationResults/fac139d2-c534-40db-bda0-a75dc9abd292?api-version=2022-08-15 pragma: - no-cache server: @@ -982,7 +983,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' status: code: 202 message: Accepted @@ -1000,9 +1001,9 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/77aa30da-93bc-48ec-8516-4027ccf4ffcc?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/fac139d2-c534-40db-bda0-a75dc9abd292?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -1014,7 +1015,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:20 GMT + - Thu, 29 Sep 2022 07:41:03 GMT pragma: - no-cache server: @@ -1046,12 +1047,12 @@ interactions: ParameterSetName: - -g -a -d -n -p User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"4VJCAOeJz80=","_ts":1663659117,"_self":"dbs/4VJCAA==/colls/4VJCAOeJz80=/","_etag":"\"0000bc02-0000-0200-0000-63296c6d0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"T1cNAJZDSBw=","_ts":1664437238,"_self":"dbs/T1cNAA==/colls/T1cNAJZDSBw=/","_etag":"\"0000cd03-0000-0200-0000-63354bf60000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' headers: cache-control: - no-store, no-cache @@ -1060,7 +1061,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:20 GMT + - Thu, 29 Sep 2022 07:41:04 GMT pragma: - no-cache server: @@ -1092,12 +1093,12 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"4VJCAA==","_self":"dbs/4VJCAA==/","_etag":"\"0000b902-0000-0200-0000-63296c4a0000\"","_colls":"colls/","_users":"users/","_ts":1663659082}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"T1cNAA==","_self":"dbs/T1cNAA==/","_etag":"\"0000c903-0000-0200-0000-63354bd40000\"","_colls":"colls/","_users":"users/","_ts":1664437204}}}' headers: cache-control: - no-store, no-cache @@ -1106,7 +1107,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:21 GMT + - Thu, 29 Sep 2022 07:41:05 GMT pragma: - no-cache server: @@ -1138,12 +1139,12 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"4VJCAOeJz80=","_ts":1663659117,"_self":"dbs/4VJCAA==/colls/4VJCAOeJz80=/","_etag":"\"0000bc02-0000-0200-0000-63296c6d0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"T1cNAJZDSBw=","_ts":1664437238,"_self":"dbs/T1cNAA==/colls/T1cNAJZDSBw=/","_etag":"\"0000cd03-0000-0200-0000-63354bf60000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' headers: cache-control: - no-store, no-cache @@ -1152,7 +1153,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:22 GMT + - Thu, 29 Sep 2022 07:41:05 GMT pragma: - no-cache server: @@ -1188,9 +1189,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' @@ -1202,9 +1203,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:22 GMT + - Thu, 29 Sep 2022 07:41:05 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation/operationResults/93a6926e-cef0-4a82-a815-2b05562ae4fa?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation/operationResults/18737661-d166-458c-ac9e-85e7ddbaae2c?api-version=2022-08-15 pragma: - no-cache server: @@ -1234,13 +1235,13 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation/operationResults/93a6926e-cef0-4a82-a815-2b05562ae4fa?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation/operationResults/18737661-d166-458c-ac9e-85e7ddbaae2c?api-version=2022-08-15 response: body: - string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/20/2022 - 7:32:28 AM"}}' + string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/29/2022 + 7:41:11 AM"}}' headers: cache-control: - no-store, no-cache @@ -1249,7 +1250,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:53 GMT + - Thu, 29 Sep 2022 07:41:35 GMT pragma: - no-cache server: @@ -1281,12 +1282,12 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"4VJCAA==","_self":"dbs/4VJCAA==/","_etag":"\"0000b902-0000-0200-0000-63296c4a0000\"","_colls":"colls/","_users":"users/","_ts":1663659082}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"T1cNAA==","_self":"dbs/T1cNAA==/","_etag":"\"0000c903-0000-0200-0000-63354bd40000\"","_colls":"colls/","_users":"users/","_ts":1664437204}}}' headers: cache-control: - no-store, no-cache @@ -1295,7 +1296,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:53 GMT + - Thu, 29 Sep 2022 07:41:37 GMT pragma: - no-cache server: @@ -1327,12 +1328,12 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"4VJCAOeJz80=","_ts":1663659117,"_self":"dbs/4VJCAA==/colls/4VJCAOeJz80=/","_etag":"\"0000bc02-0000-0200-0000-63296c6d0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"T1cNAJZDSBw=","_ts":1664437238,"_self":"dbs/T1cNAA==/colls/T1cNAJZDSBw=/","_etag":"\"0000cd03-0000-0200-0000-63354bf60000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' headers: cache-control: - no-store, no-cache @@ -1341,7 +1342,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:54 GMT + - Thu, 29 Sep 2022 07:41:37 GMT pragma: - no-cache server: @@ -1377,9 +1378,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' @@ -1391,9 +1392,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:54 GMT + - Thu, 29 Sep 2022 07:41:38 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation/operationResults/4d9206d2-0bd4-44b8-8910-fcafb47e3822?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation/operationResults/2b967edc-6abb-43fd-9282-6b50c5af46c0?api-version=2022-08-15 pragma: - no-cache server: @@ -1423,13 +1424,13 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation/operationResults/4d9206d2-0bd4-44b8-8910-fcafb47e3822?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation/operationResults/2b967edc-6abb-43fd-9282-6b50c5af46c0?api-version=2022-08-15 response: body: - string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/20/2022 - 7:33:00 AM"}}' + string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/29/2022 + 7:41:43 AM"}}' headers: cache-control: - no-store, no-cache @@ -1438,7 +1439,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:25 GMT + - Thu, 29 Sep 2022 07:42:08 GMT pragma: - no-cache server: @@ -1470,12 +1471,12 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"4VJCAA==","_self":"dbs/4VJCAA==/","_etag":"\"0000b902-0000-0200-0000-63296c4a0000\"","_colls":"colls/","_users":"users/","_ts":1663659082}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"T1cNAA==","_self":"dbs/T1cNAA==/","_etag":"\"0000c903-0000-0200-0000-63354bd40000\"","_colls":"colls/","_users":"users/","_ts":1664437204}}}' headers: cache-control: - no-store, no-cache @@ -1484,7 +1485,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:25 GMT + - Thu, 29 Sep 2022 07:42:10 GMT pragma: - no-cache server: @@ -1516,12 +1517,12 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"4VJCAOeJz80=","_ts":1663659117,"_self":"dbs/4VJCAA==/colls/4VJCAOeJz80=/","_etag":"\"0000bc02-0000-0200-0000-63296c6d0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"T1cNAJZDSBw=","_ts":1664437238,"_self":"dbs/T1cNAA==/colls/T1cNAJZDSBw=/","_etag":"\"0000cd03-0000-0200-0000-63354bf60000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' headers: cache-control: - no-store, no-cache @@ -1530,7 +1531,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:26 GMT + - Thu, 29 Sep 2022 07:42:10 GMT pragma: - no-cache server: @@ -1566,9 +1567,9 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' @@ -1580,9 +1581,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:26 GMT + - Thu, 29 Sep 2022 07:42:11 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation/operationResults/45689b43-777a-499a-99e3-c49113e3a564?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation/operationResults/f73880f9-ee28-4fe7-8157-64b155a817c8?api-version=2022-08-15 pragma: - no-cache server: @@ -1612,13 +1613,13 @@ interactions: ParameterSetName: - -g -a -d -c -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation/operationResults/45689b43-777a-499a-99e3-c49113e3a564?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_container_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000003/containers/cli000002/retrieveContinuousBackupInformation/operationResults/f73880f9-ee28-4fe7-8157-64b155a817c8?api-version=2022-08-15 response: body: - string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/20/2022 - 7:33:31 AM"}}' + string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/29/2022 + 7:42:16 AM"}}' headers: cache-control: - no-store, no-cache @@ -1627,7 +1628,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:56 GMT + - Thu, 29 Sep 2022 07:42:41 GMT pragma: - no-cache server: diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container_merge.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container_merge.yaml index 80068fc2074..2b25c83e61e 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container_merge.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_container_merge.yaml @@ -1,931 +1,931 @@ -interactions: -- request: - body: '{"properties": {"resource": {"id": "cli000003"}, "options": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql database create - Connection: - - keep-alive - Content-Length: - - '64' - Content-Type: - - application/json - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c2c3741e-959a-4777-b983-48a6ca134bb7?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:39:01 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/operationResults/c2c3741e-959a-4777-b983-48a6ca134bb7?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql database create - Connection: - - keep-alive - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c2c3741e-959a-4777-b983-48a6ca134bb7?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:39:31 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql database create - Connection: - - keep-alive - ParameterSetName: - - -g -a -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"eBJMAA==","_self":"dbs/eBJMAA==/","_etag":"\"0000ed06-0000-0200-0000-632a32fb0000\"","_colls":"colls/","_users":"users/","_ts":1663709947}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '442' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:39:32 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"id": "cli000002", "indexingPolicy": {"automatic": - true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": - [{"path": "/\"_etag\"/?"}]}, "partitionKey": {"paths": ["/pk"], "kind": "Hash"}}, - "options": {"throughput": 30000}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container create - Connection: - - keep-alive - Content-Length: - - '284' - Content-Type: - - application/json - ParameterSetName: - - -g -a -d -n -p --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/100a3369-f110-4138-a9bc-054064fb3910?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:39:34 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/operationResults/100a3369-f110-4138-a9bc-054064fb3910?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container create - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n -p --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/100a3369-f110-4138-a9bc-054064fb3910?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:04 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container create - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n -p --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"eBJMAONI-pI=","_ts":1663709981,"_self":"dbs/eBJMAA==/colls/eBJMAONI-pI=/","_etag":"\"0000f006-0000-0200-0000-632a331d0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"3","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"4","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '1447' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:04 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"resource": {"throughput": 3000}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container throughput update - Connection: - - keep-alive - Content-Length: - - '50' - Content-Type: - - application/json - ParameterSetName: - - -g -a -d -n --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default?api-version=2022-05-15 - response: - body: - string: '{"status":"Enqueued"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a8733f97-9197-4dee-a419-f8fbae47c889?api-version=2022-05-15 - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:07 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/operationResults/a8733f97-9197-4dee-a419-f8fbae47c889?api-version=2022-05-15 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container throughput update - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a8733f97-9197-4dee-a419-f8fbae47c889?api-version=2022-05-15 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:37 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container throughput update - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n --throughput - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default?api-version=2022-05-15 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings","name":"kQdC","properties":{"resource":{"throughput":3000,"minimumThroughput":"400"}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '396' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:37 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"eBJMAONI-pI=","_ts":1663709981,"_self":"dbs/eBJMAA==/colls/eBJMAONI-pI=/","_etag":"\"0000f006-0000-0200-0000-632a331d0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"4","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"3","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '1447' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:38 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"isDryRun": false}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container merge - Connection: - - keep-alive - Content-Length: - - '19' - Content-Type: - - application/json - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Enqueued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:40:42 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:41:13 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:41:43 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:42:13 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:42:43 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:43:13 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:43:43 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:44:14 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:44:44 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb sql container merge - Connection: - - keep-alive - ParameterSetName: - - -g -a -d -n - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canary-sdk-test/providers/Microsoft.DocumentDB/databaseAccounts/mergetest/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/03f03094-9927-46a3-ae75-4a89bf894e54?api-version=2022-02-15-preview - response: - body: - string: '{"physicalPartitionStorageInfoCollection":[{"storageInKB":0.0,"id":"5"}]}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '73' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 21:45:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -version: 1 +interactions: +- request: + body: '{"properties": {"resource": {"id": "cli000003"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/operationsStatus/5cee61b5-bdf0-4e6a-8fc5-870818d2168d?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:14:41 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/operationResults/5cee61b5-bdf0-4e6a-8fc5-870818d2168d?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/operationsStatus/5cee61b5-bdf0-4e6a-8fc5-870818d2168d?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:11 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000003","properties":{"resource":{"id":"cli000003","_rid":"XNJiAA==","_self":"dbs/XNJiAA==/","_etag":"\"0000a006-0000-0300-0000-633545e60000\"","_colls":"colls/","_users":"users/","_ts":1664435686}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '438' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:11 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002", "indexingPolicy": {"automatic": + true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": + [{"path": "/\"_etag\"/?"}]}, "partitionKey": {"paths": ["/pk"], "kind": "Hash"}}, + "options": {"throughput": 30000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + Content-Length: + - '284' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n -p --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/operationsStatus/805c7802-b52d-41b5-9430-cc97c1d83184?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:13 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/operationResults/805c7802-b52d-41b5-9430-cc97c1d83184?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/operationsStatus/805c7802-b52d-41b5-9430-cc97c1d83184?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"XNJiAOysjcQ=","_ts":1664435720,"_self":"dbs/XNJiAA==/colls/XNJiAOysjcQ=/","_etag":"\"0000a206-0000-0300-0000-633546080000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"3","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"4","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1443' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"throughput": 3000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container throughput update + Connection: + - keep-alive + Content-Length: + - '50' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/operationsStatus/87a7a2e0-a97a-463b-9ddc-530fdc81f1e0?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:46 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default/operationResults/87a7a2e0-a97a-463b-9ddc-530fdc81f1e0?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container throughput update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/operationsStatus/87a7a2e0-a97a-463b-9ddc-530fdc81f1e0?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:16 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container throughput update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/throughputSettings/default","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings","name":"Yt8X","properties":{"resource":{"throughput":3000,"minimumThroughput":"500"}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '392' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:16 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000002","properties":{"resource":{"id":"cli000002","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/pk"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[]},"conflictResolutionPolicy":{"mode":"LastWriterWins","conflictResolutionPath":"/_ts","conflictResolutionProcedure":""},"geospatialConfig":{"type":"Geography"},"_rid":"XNJiAOysjcQ=","_ts":1664435720,"_self":"dbs/XNJiAA==/colls/XNJiAOysjcQ=/","_etag":"\"0000a206-0000-0300-0000-633546080000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"1","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"4","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"2","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]},{"id":"3","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1443' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:18 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"isDryRun": false}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container merge + Connection: + - keep-alive + Content-Length: + - '19' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:20 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:16:50 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:17:20 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:17:50 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:18:20 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:18:50 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:19:21 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:19:51 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:20:21 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container merge + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cosmosTest/providers/Microsoft.DocumentDB/databaseAccounts/mergetest2/sqlDatabases/cli000003/containers/cli000002/partitionMerge/operationResults/a61013e0-7116-4cca-90d0-3fb2f153db71?api-version=2022-08-15-preview + response: + body: + string: '{"physicalPartitionStorageInfoCollection":[{"storageInKB":0.0,"id":"5"}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '73' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:20:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_continuous30days.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_continuous30days.yaml index ea2d11b507a..c30646ed7a1 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_continuous30days.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_continuous30days.yaml @@ -1,804 +1,805 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_provision_continuous30days000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001","name":"cli_test_cosmosdb_sql_provision_continuous30days000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '387' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 20 Sep 2022 07:28:08 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus2", "kind": "GlobalDocumentDB", "properties": {"locations": - [{"locationName": "eastus2", "failoverPriority": 0, "isZoneRedundant": false}], - "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", - "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": - "Continuous30Days"}}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - Content-Length: - - '344' - Content-Type: - - application/json - ParameterSetName: - - -n -g --backup-policy-type --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:12.3560922Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"604b862e-8311-4252-84ec-94dc06e4adcc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0cb7ee30-8af9-4f84-ae1f-d6a634e4e39c?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '1989' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:13 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004/operationResults/0cb7ee30-8af9-4f84-ae1f-d6a634e4e39c?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0cb7ee30-8af9-4f84-ae1f-d6a634e4e39c?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:44 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0cb7ee30-8af9-4f84-ae1f-d6a634e4e39c?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:29:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0cb7ee30-8af9-4f84-ae1f-d6a634e4e39c?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:29:44 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0cb7ee30-8af9-4f84-ae1f-d6a634e4e39c?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:15 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/0cb7ee30-8af9-4f84-ae1f-d6a634e4e39c?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:45 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:50.4908255Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"604b862e-8311-4252-84ec-94dc06e4adcc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2347' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:45 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:50.4908255Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"604b862e-8311-4252-84ec-94dc06e4adcc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2347' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:45 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb show - Connection: - - keep-alive - ParameterSetName: - - -n -g - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:50.4908255Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"604b862e-8311-4252-84ec-94dc06e4adcc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2347' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:46 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:50.4908255Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"604b862e-8311-4252-84ec-94dc06e4adcc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2347' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:46 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"apiProperties": {}, "backupPolicy": {"type": "Continuous", - "continuousModeProperties": {"tier": "Continuous7Days"}}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - Content-Length: - - '134' - Content-Type: - - application/json - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:50.4908255Z"},"properties":{"provisioningState":"Updating","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"604b862e-8311-4252-84ec-94dc06e4adcc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a0375af8-671e-4508-8a9c-89358041bbb9?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '2346' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:50 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004/operationResults/a0375af8-671e-4508-8a9c-89358041bbb9?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a0375af8-671e-4508-8a9c-89358041bbb9?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:20 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:50.4908255Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"604b862e-8311-4252-84ec-94dc06e4adcc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2346' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:21 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:50.4908255Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"604b862e-8311-4252-84ec-94dc06e4adcc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2346' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:21 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb show - Connection: - - keep-alive - ParameterSetName: - - -n -g - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:50.4908255Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"604b862e-8311-4252-84ec-94dc06e4adcc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2346' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:21 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -version: 1 +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_provision_continuous30days000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001","name":"cli_test_cosmosdb_sql_provision_continuous30days000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:58:23Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:58:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "eastus2", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '344' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:58:30.41755Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"06fb5229-145a-492c-aff7-e33709cc2157","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:58:30.41755Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:58:30.41755Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:58:30.41755Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:58:30.41755Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/8ba449e9-d30a-4a5d-97eb-1b78d966d366?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2406' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:31 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004/operationResults/8ba449e9-d30a-4a5d-97eb-1b78d966d366?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/8ba449e9-d30a-4a5d-97eb-1b78d966d366?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/8ba449e9-d30a-4a5d-97eb-1b78d966d366?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/8ba449e9-d30a-4a5d-97eb-1b78d966d366?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/8ba449e9-d30a-4a5d-97eb-1b78d966d366?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/8ba449e9-d30a-4a5d-97eb-1b78d966d366?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:03 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:00:29.8042436Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"06fb5229-145a-492c-aff7-e33709cc2157","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2774' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:03 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:00:29.8042436Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"06fb5229-145a-492c-aff7-e33709cc2157","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2774' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:03 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:00:29.8042436Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"06fb5229-145a-492c-aff7-e33709cc2157","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2774' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:04 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:00:29.8042436Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"06fb5229-145a-492c-aff7-e33709cc2157","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2774' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:04 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"apiProperties": {}, "backupPolicy": {"type": "Continuous", + "continuousModeProperties": {"tier": "Continuous7Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + Content-Length: + - '134' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:00:29.8042436Z"},"properties":{"provisioningState":"Updating","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"06fb5229-145a-492c-aff7-e33709cc2157","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/166b7219-f331-461a-8fcc-66d18d6ecccc?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2773' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:08 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004/operationResults/166b7219-f331-461a-8fcc-66d18d6ecccc?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/166b7219-f331-461a-8fcc-66d18d6ecccc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:00:29.8042436Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"06fb5229-145a-492c-aff7-e33709cc2157","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2773' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:00:29.8042436Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"06fb5229-145a-492c-aff7-e33709cc2157","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2773' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous30days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous30-000004","name":"cli-continuous30-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:00:29.8042436Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous30-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"06fb5229-145a-492c-aff7-e33709cc2157","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous30-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous30-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:00:29.8042436Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2773' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_continuous7days.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_continuous7days.yaml index e7e5f0f6dda..7625bb01daa 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_continuous7days.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_continuous7days.yaml @@ -1,850 +1,805 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_provision_continuous7days000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001","name":"cli_test_cosmosdb_sql_provision_continuous7days000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '385' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 20 Sep 2022 07:28:09 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus2", "kind": "GlobalDocumentDB", "properties": {"locations": - [{"locationName": "eastus2", "failoverPriority": 0, "isZoneRedundant": false}], - "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", - "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": - "Continuous7Days"}}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - Content-Length: - - '343' - Content-Type: - - application/json - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:12.6834854Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/409d65e2-c60f-4ab6-9872-ecdb13c79ee3?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '1981' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:14 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004/operationResults/409d65e2-c60f-4ab6-9872-ecdb13c79ee3?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/409d65e2-c60f-4ab6-9872-ecdb13c79ee3?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:43 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/409d65e2-c60f-4ab6-9872-ecdb13c79ee3?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:29:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/409d65e2-c60f-4ab6-9872-ecdb13c79ee3?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:29:44 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/409d65e2-c60f-4ab6-9872-ecdb13c79ee3?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/409d65e2-c60f-4ab6-9872-ecdb13c79ee3?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:45 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/409d65e2-c60f-4ab6-9872-ecdb13c79ee3?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:15 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:24.0723044Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2335' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:15 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:24.0723044Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2335' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:15 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb show - Connection: - - keep-alive - ParameterSetName: - - -n -g - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:24.0723044Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2335' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:16 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:24.0723044Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2335' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:17 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"apiProperties": {}, "backupPolicy": {"type": "Continuous", - "continuousModeProperties": {"tier": "Continuous30Days"}}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - Content-Length: - - '135' - Content-Type: - - application/json - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:24.0723044Z"},"properties":{"provisioningState":"Updating","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c62414ab-1b27-4bd1-b316-afcf0dd5138b?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '2334' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:21 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004/operationResults/c62414ab-1b27-4bd1-b316-afcf0dd5138b?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c62414ab-1b27-4bd1-b316-afcf0dd5138b?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:51 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:24.0723044Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2336' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:51 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:24.0723044Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2336' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:51 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb show - Connection: - - keep-alive - ParameterSetName: - - -n -g - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:30:24.0723044Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2336' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:51 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -version: 1 +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_provision_continuous7days000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001","name":"cli_test_cosmosdb_sql_provision_continuous7days000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T08:07:19Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '385' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:07:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "eastus2", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous7Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '343' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:07:27.7261919Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"a29fac7e-1dfd-43de-af2d-16dc9963483a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:07:27.7261919Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:07:27.7261919Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:07:27.7261919Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:07:27.7261919Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/ced0b6cc-cae8-43bf-a75d-3562e77af283?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2408' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:07:29 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004/operationResults/ced0b6cc-cae8-43bf-a75d-3562e77af283?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/ced0b6cc-cae8-43bf-a75d-3562e77af283?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:08:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/ced0b6cc-cae8-43bf-a75d-3562e77af283?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:08:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/ced0b6cc-cae8-43bf-a75d-3562e77af283?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:08:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/ced0b6cc-cae8-43bf-a75d-3562e77af283?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:09:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/ced0b6cc-cae8-43bf-a75d-3562e77af283?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:10:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:09:18.997393Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"a29fac7e-1dfd-43de-af2d-16dc9963483a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2757' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:10:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:09:18.997393Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"a29fac7e-1dfd-43de-af2d-16dc9963483a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2757' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:10:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:09:18.997393Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"a29fac7e-1dfd-43de-af2d-16dc9963483a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2757' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:10:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:09:18.997393Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"a29fac7e-1dfd-43de-af2d-16dc9963483a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2757' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:10:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"apiProperties": {}, "backupPolicy": {"type": "Continuous", + "continuousModeProperties": {"tier": "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + Content-Length: + - '135' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:09:18.997393Z"},"properties":{"provisioningState":"Updating","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"a29fac7e-1dfd-43de-af2d-16dc9963483a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/d6fb27df-e957-4ef1-ab55-428570a2ee6a?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2756' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:10:05 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004/operationResults/d6fb27df-e957-4ef1-ab55-428570a2ee6a?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/d6fb27df-e957-4ef1-ab55-428570a2ee6a?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:10:36 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:09:18.997393Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"a29fac7e-1dfd-43de-af2d-16dc9963483a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2758' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:10:36 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:09:18.997393Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"a29fac7e-1dfd-43de-af2d-16dc9963483a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2758' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:10:36 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_provision_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:09:18.997393Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"a29fac7e-1dfd-43de-af2d-16dc9963483a","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:09:18.997393Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2758' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:10:36 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_database.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_database.yaml new file mode 100644 index 00000000000..91a5b2ef3c8 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_database.yaml @@ -0,0 +1,1028 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_database000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001","name":"cli_test_cosmosdb_sql_database000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:03:48Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:03:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "WestUS", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '342' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:03:56.1890607Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"672a69b0-34ed-4149-9797-af1388f4d04d","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:03:56.1890607Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:03:56.1890607Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:03:56.1890607Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:03:56.1890607Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/906efcd8-4fd1-40f5-87a4-951d037460b0?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2300' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:03:57 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/906efcd8-4fd1-40f5-87a4-951d037460b0?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/906efcd8-4fd1-40f5-87a4-951d037460b0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:04:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/906efcd8-4fd1-40f5-87a4-951d037460b0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:04:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/906efcd8-4fd1-40f5-87a4-951d037460b0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:05:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/906efcd8-4fd1-40f5-87a4-951d037460b0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:05:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/906efcd8-4fd1-40f5-87a4-951d037460b0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/906efcd8-4fd1-40f5-87a4-951d037460b0?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:06:13.4022209Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"672a69b0-34ed-4149-9797-af1388f4d04d","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:06:13.4022209Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:06:13.4022209Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:06:13.4022209Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:06:13.4022209Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2599' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:06:13.4022209Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"672a69b0-34ed-4149-9797-af1388f4d04d","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:06:13.4022209Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:06:13.4022209Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:06:13.4022209Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:06:13.4022209Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2599' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/b932b8f9-426f-4574-a558-470068d46ac8?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:06:59 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002/operationResults/b932b8f9-426f-4574-a558-470068d46ac8?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/b932b8f9-426f-4574-a558-470068d46ac8?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"NA0yAA==","_self":"dbs/NA0yAA==/","_etag":"\"00001f00-0000-0700-0000-633544180000\"","_colls":"colls/","_users":"users/","_ts":1664435224}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '463' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database show + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"NA0yAA==","_self":"dbs/NA0yAA==/","_etag":"\"00001f00-0000-0700-0000-633544180000\"","_colls":"colls/","_users":"users/","_ts":1664435224}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '463' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"NA0yAA==","_self":"dbs/NA0yAA==/","_etag":"\"00001f00-0000-0700-0000-633544180000\"","_colls":"colls/","_users":"users/","_ts":1664435224}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '463' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/invalid?api-version=2022-08-15 + response: + body: + string: '{"code":"NotFound","message":"Message: {\"code\":\"NotFound\",\"message\":\"Message: + {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https:\\\\/\\\\/aka.ms\\\\/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: + 610249d1-3fc5-11ed-9b64-9c7bef4baa38, Request URI: /apps/415f1edc-fe46-4515-b598-30d9e20e0162/services/0745847a-ed0c-48ea-a404-4facbd8a69a4/partitions/35e16f48-51fd-4303-8119-197e897b6795/replicas/133088763040923815s, + RequestStats: \\r\\nRequestStartTime: 2022-09-29T07:07:31.3548038Z, RequestEndTime: + 2022-09-29T07:07:31.3548038Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-29T07:06:34.1942405Z\\\",\\\"cpu\\\":0.390,\\\"memory\\\":656560048.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0158,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":144},{\\\"dateUtc\\\":\\\"2022-09-29T07:06:44.2042146Z\\\",\\\"cpu\\\":0.217,\\\"memory\\\":656089260.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0298,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":142},{\\\"dateUtc\\\":\\\"2022-09-29T07:06:54.2148896Z\\\",\\\"cpu\\\":0.146,\\\"memory\\\":656064360.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0206,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":142},{\\\"dateUtc\\\":\\\"2022-09-29T07:07:04.2248644Z\\\",\\\"cpu\\\":0.190,\\\"memory\\\":656080280.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0115,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":142},{\\\"dateUtc\\\":\\\"2022-09-29T07:07:14.2348404Z\\\",\\\"cpu\\\":0.212,\\\"memory\\\":655970572.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0205,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":142},{\\\"dateUtc\\\":\\\"2022-09-29T07:07:24.2548155Z\\\",\\\"cpu\\\":0.137,\\\"memory\\\":655844196.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0331,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":143}]}\\r\\nRequestStart: + 2022-09-29T07:07:31.3548038Z; ResponseTime: 2022-09-29T07:07:31.3548038Z; + StoreResult: StorePhysicalAddress: rntbd://10.0.1.6:11300/apps/415f1edc-fe46-4515-b598-30d9e20e0162/services/0745847a-ed0c-48ea-a404-4facbd8a69a4/partitions/35e16f48-51fd-4303-8119-197e897b6795/replicas/133088763040923815s, + LSN: 10, GlobalCommittedLsn: 10, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#10, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.24, ActivityId: + 610249d1-3fc5-11ed-9b64-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:07:31.3548038Z\\\", \\\"durationInMs\\\": 0.0148},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:07:31.3548186Z\\\", + \\\"durationInMs\\\": 0.0038},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:07:31.3548224Z\\\", \\\"durationInMs\\\": 0.0963},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:07:31.3549187Z\\\", + \\\"durationInMs\\\": 0.576},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:07:31.3554947Z\\\", \\\"durationInMs\\\": 0.0896},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:07:31.3555843Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:07:31.2947996Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:07:31.2947996Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:07:31.3248015Z\\\"},\\\"requestSizeInBytes\\\":458,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Database, OperationType: Read\\r\\nRequestStart: 2022-09-29T07:07:31.3548038Z; + ResponseTime: 2022-09-29T07:07:31.3548038Z; StoreResult: StorePhysicalAddress: + rntbd://10.0.1.10:11300/apps/415f1edc-fe46-4515-b598-30d9e20e0162/services/0745847a-ed0c-48ea-a404-4facbd8a69a4/partitions/35e16f48-51fd-4303-8119-197e897b6795/replicas/133088763040923817s, + LSN: 10, GlobalCommittedLsn: 10, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#10, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.292, ActivityId: + 610249d1-3fc5-11ed-9b64-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:07:31.3548038Z\\\", \\\"durationInMs\\\": 0.0045},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:07:31.3548083Z\\\", + \\\"durationInMs\\\": 0.0014},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:07:31.3548097Z\\\", \\\"durationInMs\\\": 0.0619},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:07:31.3548716Z\\\", + \\\"durationInMs\\\": 0.5887},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:07:31.3554603Z\\\", \\\"durationInMs\\\": 0.0505},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:07:31.3555108Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:07:31.2947996Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:07:31.2947996Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:07:31.3248015Z\\\"},\\\"requestSizeInBytes\\\":458,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Database, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, + Request URI: /dbs/invalid, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '6523' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 404 + message: NotFound +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"NA0yAA==","_self":"dbs/NA0yAA==/","_etag":"\"00001f00-0000-0700-0000-633544180000\"","_colls":"colls/","_users":"users/","_ts":1664435224}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '475' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2732baa9-2eb7-43fa-a3f8-2f47dd05ff4d?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:07:33 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002/operationResults/2732baa9-2eb7-43fa-a3f8-2f47dd05ff4d?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2732baa9-2eb7-43fa-a3f8-2f47dd05ff4d?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:03 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_database000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"code":"NotFound","message":"Message: {\"code\":\"NotFound\",\"message\":\"Message: + {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https:\\\\/\\\\/aka.ms\\\\/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: + 751261d0-3fc5-11ed-8f58-9c7bef4baa38, Request URI: /apps/415f1edc-fe46-4515-b598-30d9e20e0162/services/0745847a-ed0c-48ea-a404-4facbd8a69a4/partitions/35e16f48-51fd-4303-8119-197e897b6795/replicas/133088763040923817s, + RequestStats: \\r\\nRequestStartTime: 2022-09-29T07:08:04.7636039Z, RequestEndTime: + 2022-09-29T07:08:04.7636039Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-29T07:07:02.7732397Z\\\",\\\"cpu\\\":0.474,\\\"memory\\\":669581880.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0347,\\\"availableThreads\\\":32765,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":126},{\\\"dateUtc\\\":\\\"2022-09-29T07:07:12.7832322Z\\\",\\\"cpu\\\":0.894,\\\"memory\\\":670624428.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0283,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":126},{\\\"dateUtc\\\":\\\"2022-09-29T07:07:22.7932155Z\\\",\\\"cpu\\\":0.934,\\\"memory\\\":670748304.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0454,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":124},{\\\"dateUtc\\\":\\\"2022-09-29T07:07:32.8031980Z\\\",\\\"cpu\\\":0.544,\\\"memory\\\":670613284.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0289,\\\"availableThreads\\\":32765,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":124},{\\\"dateUtc\\\":\\\"2022-09-29T07:07:42.8131816Z\\\",\\\"cpu\\\":0.288,\\\"memory\\\":670506552.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0201,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":124},{\\\"dateUtc\\\":\\\"2022-09-29T07:07:52.8136210Z\\\",\\\"cpu\\\":0.480,\\\"memory\\\":670679748.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.017,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":119}]}\\r\\nRequestStart: + 2022-09-29T07:08:04.7636039Z; ResponseTime: 2022-09-29T07:08:04.7636039Z; + StoreResult: StorePhysicalAddress: rntbd://10.0.1.10:11300/apps/415f1edc-fe46-4515-b598-30d9e20e0162/services/0745847a-ed0c-48ea-a404-4facbd8a69a4/partitions/35e16f48-51fd-4303-8119-197e897b6795/replicas/133088763040923817s, + LSN: 11, GlobalCommittedLsn: 11, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#11, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.156, ActivityId: + 751261d0-3fc5-11ed-8f58-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:08:04.7636039Z\\\", \\\"durationInMs\\\": 0.0077},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:08:04.7636116Z\\\", + \\\"durationInMs\\\": 0.002},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:08:04.7636136Z\\\", \\\"durationInMs\\\": 0.0829},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:08:04.7636965Z\\\", + \\\"durationInMs\\\": 0.3536},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:08:04.7640501Z\\\", \\\"durationInMs\\\": 0.0398},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:08:04.7640899Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:08:04.7336058Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:08:04.7336058Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:08:04.7636039Z\\\"},\\\"requestSizeInBytes\\\":466,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Database, OperationType: Read\\r\\nRequestStart: 2022-09-29T07:08:04.7636039Z; + ResponseTime: 2022-09-29T07:08:04.7636039Z; StoreResult: StorePhysicalAddress: + rntbd://10.0.1.6:11300/apps/415f1edc-fe46-4515-b598-30d9e20e0162/services/0745847a-ed0c-48ea-a404-4facbd8a69a4/partitions/35e16f48-51fd-4303-8119-197e897b6795/replicas/133088763040923815s, + LSN: 11, GlobalCommittedLsn: 11, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#11, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.149, ActivityId: + 751261d0-3fc5-11ed-8f58-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:08:04.7636039Z\\\", \\\"durationInMs\\\": 0.0038},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:08:04.7636077Z\\\", + \\\"durationInMs\\\": 0.0012},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:08:04.7636089Z\\\", \\\"durationInMs\\\": 0.063},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:08:04.7636719Z\\\", + \\\"durationInMs\\\": 0.3538},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:08:04.7640257Z\\\", \\\"durationInMs\\\": 0.0506},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:08:04.7640763Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:08:04.7336058Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:08:04.7336058Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:08:04.7636039Z\\\"},\\\"requestSizeInBytes\\\":466,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Database, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, + Request URI: /dbs/cli000002, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '6524' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:08:04 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 404 + message: NotFound +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_migrate_periodic_to_continuous7days.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_migrate_periodic_to_continuous7days.yaml index 20426f030fa..0d646b6d876 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_migrate_periodic_to_continuous7days.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_migrate_periodic_to_continuous7days.yaml @@ -1,2724 +1,3231 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001","name":"cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '405' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 20 Sep 2022 07:28:08 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus2", "kind": "GlobalDocumentDB", "properties": {"locations": - [{"locationName": "eastus2", "failoverPriority": 0, "isZoneRedundant": false}], - "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - Content-Length: - - '246' - Content-Type: - - application/json - ParameterSetName: - - -n -g --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:12.5315822Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Invalid"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/37b62a68-d126-4afc-896b-169c6ab08a99?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '2022' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:13 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004/operationResults/37b62a68-d126-4afc-896b-169c6ab08a99?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/37b62a68-d126-4afc-896b-169c6ab08a99?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:44 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/37b62a68-d126-4afc-896b-169c6ab08a99?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:29:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/37b62a68-d126-4afc-896b-169c6ab08a99?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:29:44 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/37b62a68-d126-4afc-896b-169c6ab08a99?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/37b62a68-d126-4afc-896b-169c6ab08a99?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:44 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2360' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:44 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2360' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:45 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb show - Connection: - - keep-alive - ParameterSetName: - - -n -g - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2360' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:45 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2360' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:46 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"apiProperties": {}, "backupPolicy": {"type": "Continuous", - "continuousModeProperties": {"tier": "Continuous7Days"}}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - Content-Length: - - '134' - Content-Type: - - application/json - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Updating","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '2359' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:50 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004/operationResults/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:20 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:50 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:32:20 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:32:50 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:33:21 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:33:50 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:34:21 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:34:51 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:35:21 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:35:51 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:36:21 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:36:51 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:37:22 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:37:51 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:38:21 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:38:52 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:39:22 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:39:52 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:40:22 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:40:53 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:41:23 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:41:52 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:42:23 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:42:53 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:43:23 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:43:54 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:44:23 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:44:53 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:45:24 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:45:54 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:46:23 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:46:54 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:47:24 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:47:54 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:48:25 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/93e02e8f-9974-4f4c-af81-d593701b568f?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:48:55 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2315' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:48:55 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2315' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:48:55 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb show - Connection: - - keep-alive - ParameterSetName: - - -n -g - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2315' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:48:56 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2315' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:48:56 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: '{"properties": {"apiProperties": {}, "backupPolicy": {"type": "Continuous", - "continuousModeProperties": {"tier": "Continuous30Days"}}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - Content-Length: - - '135' - Content-Type: - - application/json - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Updating","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/57f43418-a3c3-497a-bdd4-1f9a50a3fb1d?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '2314' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:49:01 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004/operationResults/57f43418-a3c3-497a-bdd4-1f9a50a3fb1d?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/57f43418-a3c3-497a-bdd4-1f9a50a3fb1d?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:49:32 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2316' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:49:32 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb update - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2316' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:49:32 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb show - Connection: - - keep-alive - ParameterSetName: - - -n -g - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:53.7752692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2382ffd9-e354-4c07-922c-cd6e7111b89a","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2316' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:49:32 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -version: 1 +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001","name":"cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:38:39Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '405' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:38:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "eastus2", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '246' + Content-Type: + - application/json + ParameterSetName: + - -n -g --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:38:46.3444058Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Invalid"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:38:46.3444058Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:38:46.3444058Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:38:46.3444058Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:38:46.3444058Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1e1b2f5e-7664-476c-96b5-0bdaf1dd885f?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2449' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:38:48 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004/operationResults/1e1b2f5e-7664-476c-96b5-0bdaf1dd885f?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1e1b2f5e-7664-476c-96b5-0bdaf1dd885f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:39:17 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1e1b2f5e-7664-476c-96b5-0bdaf1dd885f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:39:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1e1b2f5e-7664-476c-96b5-0bdaf1dd885f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:40:18 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1e1b2f5e-7664-476c-96b5-0bdaf1dd885f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:40:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1e1b2f5e-7664-476c-96b5-0bdaf1dd885f?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:18 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2787' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:18 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2787' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:18 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2787' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2787' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"apiProperties": {}, "backupPolicy": {"type": "Continuous", + "continuousModeProperties": {"tier": "Continuous7Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + Content-Length: + - '134' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Updating","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2786' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:24 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004/operationResults/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:54 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:42:25 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:42:55 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:43:25 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:43:55 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:44:25 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:44:55 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:45:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:45:56 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:46:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:46:56 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:47:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:47:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:48:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:48:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:49:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:49:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:50:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:50:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:51:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:51:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:52:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:52:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:53:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:53:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:54:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:55:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:55:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:56:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:56:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:02:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:02:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:03:03 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:03:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:03 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bd10c8e6-0309-4ab7-b3f1-85faa696e092?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2742' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2742' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2742' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2742' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:35 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"apiProperties": {}, "backupPolicy": {"type": "Continuous", + "continuousModeProperties": {"tier": "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + Content-Length: + - '135' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Updating","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/be40b688-3f73-4a84-b174-e2c0a4c23113?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2741' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:38 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004/operationResults/be40b688-3f73-4a84-b174-e2c0a4c23113?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/be40b688-3f73-4a84-b174-e2c0a4c23113?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:05:09 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/be40b688-3f73-4a84-b174-e2c0a4c23113?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:05:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2743' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:05:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb update + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2743' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:05:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_migrate_periodic_to_continuous7days000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-periodic-000004","name":"cli-periodic-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:40:18.5414123Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-periodic-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-periodic-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-periodic-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:40:18.5414123Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2743' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:05:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_normal_database_prov_container_restore.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_normal_database_prov_container_restore.yaml new file mode 100644 index 00000000000..4a0678afc32 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_normal_database_prov_container_restore.yaml @@ -0,0 +1,4368 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001","name":"cli_test_cosmosdb_sql_normal_database_prov_container_restore000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:10:07Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:10:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "WestUS", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '342' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:10:14.61635Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:10:14.61635Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:10:14.61635Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:10:14.61635Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:10:14.61635Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9cb12493-cde3-489b-b155-436af8509d86?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2320' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:15 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/9cb12493-cde3-489b-b155-436af8509d86?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9cb12493-cde3-489b-b155-436af8509d86?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9cb12493-cde3-489b-b155-436af8509d86?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:11:16 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9cb12493-cde3-489b-b155-436af8509d86?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:11:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9cb12493-cde3-489b-b155-436af8509d86?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:16 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/9cb12493-cde3-489b-b155-436af8509d86?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:12:07.632183Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:12:07.632183Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:12:07.632183Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:12:07.632183Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:12:07.632183Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2624' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:12:07.632183Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:12:07.632183Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:12:07.632183Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:12:07.632183Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:12:07.632183Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2624' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ef22a0f-eb51-4256-9739-a6657b1d0989?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:49 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/operationResults/3ef22a0f-eb51-4256-9739-a6657b1d0989?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/3ef22a0f-eb51-4256-9739-a6657b1d0989?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"0gdDAA==","_self":"dbs/0gdDAA==/","_etag":"\"00000a31-0000-0700-0000-633545750000\"","_colls":"colls/","_users":"users/","_ts":1664435573}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '493' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"code":"NotFound","message":"Message: {\"code\":\"NotFound\",\"message\":\"Message: + {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https:\\\\/\\\\/aka.ms\\\\/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: + 315800e9-3fc6-11ed-ba6b-9c7bef4baa38, Request URI: /apps/7b50bc62-a5f8-470f-9798-97893f3a4f08/services/5a8b07ac-b753-49ab-8a88-a26d4a78bb55/partitions/77b02c12-b99c-4b54-b62d-a7a2bc9e5616/replicas/133088799052387718s, + RequestStats: \\r\\nRequestStartTime: 2022-09-29T07:13:20.7275136Z, RequestEndTime: + 2022-09-29T07:13:20.7275136Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-29T07:12:28.0369734Z\\\",\\\"cpu\\\":0.451,\\\"memory\\\":628277320.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0242,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":215},{\\\"dateUtc\\\":\\\"2022-09-29T07:12:38.0470630Z\\\",\\\"cpu\\\":0.505,\\\"memory\\\":628048128.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0171,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":215},{\\\"dateUtc\\\":\\\"2022-09-29T07:12:48.0571673Z\\\",\\\"cpu\\\":0.522,\\\"memory\\\":627805404.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0167,\\\"availableThreads\\\":32751,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":215},{\\\"dateUtc\\\":\\\"2022-09-29T07:12:58.0672663Z\\\",\\\"cpu\\\":0.385,\\\"memory\\\":627774972.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.017,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":214},{\\\"dateUtc\\\":\\\"2022-09-29T07:13:08.0773740Z\\\",\\\"cpu\\\":0.351,\\\"memory\\\":627633640.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0582,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":214},{\\\"dateUtc\\\":\\\"2022-09-29T07:13:18.0874754Z\\\",\\\"cpu\\\":0.415,\\\"memory\\\":627492672.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0183,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":214}]}\\r\\nRequestStart: + 2022-09-29T07:13:20.7275136Z; ResponseTime: 2022-09-29T07:13:20.7275136Z; + StoreResult: StorePhysicalAddress: rntbd://10.0.1.11:11300/apps/7b50bc62-a5f8-470f-9798-97893f3a4f08/services/5a8b07ac-b753-49ab-8a88-a26d4a78bb55/partitions/77b02c12-b99c-4b54-b62d-a7a2bc9e5616/replicas/133088799052387718s, + LSN: 10, GlobalCommittedLsn: 10, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#10, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.784, ActivityId: + 315800e9-3fc6-11ed-ba6b-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:13:20.7275136Z\\\", \\\"durationInMs\\\": 0.0122},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:13:20.7275258Z\\\", + \\\"durationInMs\\\": 0.0023},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:13:20.7275281Z\\\", \\\"durationInMs\\\": 0.1002},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:13:20.7276283Z\\\", + \\\"durationInMs\\\": 1.0307},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:13:20.7286590Z\\\", \\\"durationInMs\\\": 0.09},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:13:20.7287490Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:13:20.6575080Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:13:20.6575080Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:13:20.6875064Z\\\"},\\\"requestSizeInBytes\\\":494,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Collection, OperationType: Read\\r\\nRequestStart: 2022-09-29T07:13:20.7275136Z; + ResponseTime: 2022-09-29T07:13:20.7275136Z; StoreResult: StorePhysicalAddress: + rntbd://10.0.1.8:11300/apps/7b50bc62-a5f8-470f-9798-97893f3a4f08/services/5a8b07ac-b753-49ab-8a88-a26d4a78bb55/partitions/77b02c12-b99c-4b54-b62d-a7a2bc9e5616/replicas/133088799052387717s, + LSN: 10, GlobalCommittedLsn: 10, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#10, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.768, ActivityId: + 315800e9-3fc6-11ed-ba6b-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:13:20.7275136Z\\\", \\\"durationInMs\\\": 0.0046},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:13:20.7275182Z\\\", + \\\"durationInMs\\\": 0.0013},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:13:20.7275195Z\\\", \\\"durationInMs\\\": 0.0591},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:13:20.7275786Z\\\", + \\\"durationInMs\\\": 1.0639},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:13:20.7286425Z\\\", \\\"durationInMs\\\": 0.0526},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:13:20.7286951Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:13:20.6575080Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:13:20.6575080Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:13:20.6875064Z\\\"},\\\"requestSizeInBytes\\\":494,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Collection, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, + Request URI: /dbs/cli000002/colls/cli000003, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '6544' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 404 + message: NotFound +- request: + body: '{"properties": {"resource": {"id": "cli000003", "indexingPolicy": {"automatic": + true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": + [{"path": "/headquarters/employees/?"}]}, "partitionKey": {"paths": ["/thePartitionKey"], + "kind": "Hash"}, "uniqueKeyPolicy": {"uniqueKeys": [{"paths": ["/path/to/key1"]}, + {"paths": ["/path/to/key2"]}]}, "conflictResolutionPolicy": {"mode": "lastWriterWins", + "conflictResolutionPath": "/path"}}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + Content-Length: + - '479' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n -p --unique-key-policy --conflict-resolution-policy --idx + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/63e78a45-0065-4efe-b41e-3eba17f3ed3c?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:21 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/63e78a45-0065-4efe-b41e-3eba17f3ed3c?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p --unique-key-policy --conflict-resolution-policy --idx + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/63e78a45-0065-4efe-b41e-3eba17f3ed3c?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p --unique-key-policy --conflict-resolution-policy --idx + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"0gdDAJtRNk8=","_ts":1664435606,"_self":"dbs/0gdDAA==/colls/0gdDAJtRNk8=/","_etag":"\"00001431-0000-0700-0000-633545960000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1238' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"0gdDAJtRNk8=","_ts":1664435606,"_self":"dbs/0gdDAA==/colls/0gdDAJtRNk8=/","_etag":"\"00001431-0000-0700-0000-633545960000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1238' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:52 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000003", "indexingPolicy": {"automatic": + true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": + [{"path": "/headquarters/employees/?"}, {"path": "/\"_etag\"/?"}]}, "partitionKey": + {"paths": ["/thePartitionKey"], "kind": "Hash"}, "uniqueKeyPolicy": {"uniqueKeys": + [{"paths": ["/path/to/key1"]}, {"paths": ["/path/to/key2"]}]}, "conflictResolutionPolicy": + {"mode": "lastWriterWins", "conflictResolutionPath": "/path", "conflictResolutionProcedure": + ""}}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container update + Connection: + - keep-alive + Content-Length: + - '540' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/dfdeccd3-ddc8-45e2-bfc4-0ff64fe1a6ed?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:52 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/dfdeccd3-ddc8-45e2-bfc4-0ff64fe1a6ed?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/dfdeccd3-ddc8-45e2-bfc4-0ff64fe1a6ed?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:14:23 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"0gdDAJtRNk8=","_ts":1664435606,"_self":"dbs/0gdDAA==/colls/0gdDAJtRNk8=/","_etag":"\"00001431-0000-0700-0000-633545960000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1238' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:14:23 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"0gdDAJtRNk8=","_ts":1664435606,"_self":"dbs/0gdDAA==/colls/0gdDAJtRNk8=/","_etag":"\"00001431-0000-0700-0000-633545960000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1238' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:14:24 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"0gdDAJtRNk8=","_ts":1664435606,"_self":"dbs/0gdDAA==/colls/0gdDAJtRNk8=/","_etag":"\"00001431-0000-0700-0000-633545960000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1137' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:14:24 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"0gdDAJtRNk8=","_ts":1664435606,"_self":"dbs/0gdDAA==/colls/0gdDAJtRNk8=/","_etag":"\"00001431-0000-0700-0000-633545960000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":128,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1240' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:19:25 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a7c6a19b-1f50-46ea-905c-1fce1c2ecba0?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:19:26 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/a7c6a19b-1f50-46ea-905c-1fce1c2ecba0?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a7c6a19b-1f50-46ea-905c-1fce1c2ecba0?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:19:56 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:19:57 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","oldestRestorableTime":"2022-09-29T07:19:50Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8680b861-bef3-493d-9344-27f17b06b5e3","creationTime":"2022-09-29T07:19:51Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","oldestRestorableTime":"2022-09-29T07:07:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","oldestRestorableTime":"2022-09-29T07:08:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cli000004","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","oldestRestorableTime":"2022-09-29T07:12:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:19:58Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '68918' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:19:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000003", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7", + "restoreTimestampInUtc": "2022-09-29T07:14:23.254639Z"}, "createMode": "Restore"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + Content-Length: + - '352' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:20:00 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:20:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:21:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:21:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:22:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:22:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:23:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:23:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:24:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:24:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:25:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:25:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:26:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:26:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5eed3211-5131-4061-a07e-418e790ca554?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:27:00 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"0gdDAJtRNk8=","_ts":1664436179,"_self":"dbs/0gdDAA==/colls/0gdDAJtRNk8=/","_etag":"\"00003131-0000-0700-0000-633547d30000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":128,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1240' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:27:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"0gdDAJtRNk8=","_ts":1664436179,"_self":"dbs/0gdDAA==/colls/0gdDAJtRNk8=/","_etag":"\"00003131-0000-0700-0000-633547d30000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1137' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:27:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/27ffe274-18e9-4685-9dc3-5769b60d5738?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:27:03 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/operationResults/27ffe274-18e9-4685-9dc3-5769b60d5738?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/27ffe274-18e9-4685-9dc3-5769b60d5738?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:27:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:27:34 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","oldestRestorableTime":"2022-09-29T07:19:50Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8680b861-bef3-493d-9344-27f17b06b5e3","creationTime":"2022-09-29T07:19:51Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","oldestRestorableTime":"2022-09-29T07:25:11Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"f895d646-7338-4417-a964-c374f9a113bb","creationTime":"2022-09-29T07:25:12Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","oldestRestorableTime":"2022-09-29T07:07:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","oldestRestorableTime":"2022-09-29T07:08:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cli000004","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","oldestRestorableTime":"2022-09-29T07:12:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:27:36Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '69727' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:27:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000002", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7", + "restoreTimestampInUtc": "2022-09-29T07:14:23.254639Z"}, "createMode": "Restore"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + Content-Length: + - '337' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/03177aa5-d518-4cb1-a212-5ccf4e59b39e?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:27:39 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/operationResults/03177aa5-d518-4cb1-a212-5ccf4e59b39e?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/03177aa5-d518-4cb1-a212-5ccf4e59b39e?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:28:09 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/03177aa5-d518-4cb1-a212-5ccf4e59b39e?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:28:38 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/03177aa5-d518-4cb1-a212-5ccf4e59b39e?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:29:09 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/03177aa5-d518-4cb1-a212-5ccf4e59b39e?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:29:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"0gdDAA==","_self":"dbs/0gdDAA==/","_etag":"\"00003631-0000-0700-0000-6335490b0000\"","_colls":"colls/","_users":"users/","_ts":1664436491}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '493' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:29:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database show + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"0gdDAA==","_self":"dbs/0gdDAA==/","_etag":"\"00003631-0000-0700-0000-6335490b0000\"","_colls":"colls/","_users":"users/","_ts":1664436491}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '493' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:29:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:29:41 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","oldestRestorableTime":"2022-09-29T07:19:50Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8680b861-bef3-493d-9344-27f17b06b5e3","creationTime":"2022-09-29T07:19:51Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","deletionTime":"2022-09-29T07:29:11Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","oldestRestorableTime":"2022-09-29T07:07:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","oldestRestorableTime":"2022-09-29T07:08:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cli000004","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","oldestRestorableTime":"2022-09-29T07:12:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:29:42Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '69624' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:29:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000003", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7", + "restoreTimestampInUtc": "2022-09-29T07:14:23.254639Z"}, "createMode": "Restore"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + Content-Length: + - '352' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:29:44 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:30:13 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:30:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:31:14 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:31:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:32:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:32:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:33:14 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:33:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:34:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:34:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/523b0452-49c9-48de-9212-e99706174eb8?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"0gdDAJtRNk8=","_ts":1664436762,"_self":"dbs/0gdDAA==/colls/0gdDAJtRNk8=/","_etag":"\"00003c31-0000-0700-0000-63354a1a0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":128,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1240' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"0gdDAJtRNk8=","_ts":1664436762,"_self":"dbs/0gdDAA==/colls/0gdDAJtRNk8=/","_etag":"\"00003c31-0000-0700-0000-63354a1a0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1137' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"0gdDAJtRNk8=","_ts":1664436762,"_self":"dbs/0gdDAA==/colls/0gdDAJtRNk8=/","_etag":"\"00003c31-0000-0700-0000-63354a1a0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":128,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1240' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_normal_database_restore.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_normal_database_restore.yaml new file mode 100644 index 00000000000..b9a13ceff1c --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_normal_database_restore.yaml @@ -0,0 +1,1672 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_normal_database_restore000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001","name":"cli_test_cosmosdb_sql_normal_database_restore000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:09:34Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '380' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:09:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "WestUS", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '342' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:09:40.9746492Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:09:40.9746492Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:09:40.9746492Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:09:40.9746492Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:09:40.9746492Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e113e83d-a8e6-4c45-a904-3493aa5f563b?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2315' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:09:41 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/e113e83d-a8e6-4c45-a904-3493aa5f563b?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e113e83d-a8e6-4c45-a904-3493aa5f563b?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e113e83d-a8e6-4c45-a904-3493aa5f563b?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:10:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e113e83d-a8e6-4c45-a904-3493aa5f563b?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:11:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e113e83d-a8e6-4c45-a904-3493aa5f563b?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:11:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e113e83d-a8e6-4c45-a904-3493aa5f563b?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:11:32.2202012Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:11:32.2202012Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:11:32.2202012Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:11:32.2202012Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:11:32.2202012Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2614' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:11:32.2202012Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus","locationName":"West + US","documentEndpoint":"https://cli000003-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:11:32.2202012Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:11:32.2202012Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:11:32.2202012Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:11:32.2202012Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2614' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"code":"NotFound","message":"Message: {\"code\":\"NotFound\",\"message\":\"Message: + {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https:\\\\/\\\\/aka.ms\\\\/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: + 0973e619-3fc6-11ed-a021-9c7bef4baa38, Request URI: /apps/e77cbcf6-3068-496d-94e2-e75125488806/services/99e15dc8-0dd2-49d6-967a-c33962f68c72/partitions/3fd12ba9-c7fc-4398-9b78-775a7e87f07e/replicas/133087107048429915s, + RequestStats: \\r\\nRequestStartTime: 2022-09-29T07:12:14.0787661Z, RequestEndTime: + 2022-09-29T07:12:14.0787661Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-29T07:11:13.3584995Z\\\",\\\"cpu\\\":0.276,\\\"memory\\\":638998688.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.029,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":201},{\\\"dateUtc\\\":\\\"2022-09-29T07:11:23.3685447Z\\\",\\\"cpu\\\":0.298,\\\"memory\\\":638780940.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0188,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":201},{\\\"dateUtc\\\":\\\"2022-09-29T07:11:33.3785915Z\\\",\\\"cpu\\\":0.212,\\\"memory\\\":638754756.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0185,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":201},{\\\"dateUtc\\\":\\\"2022-09-29T07:11:43.3886344Z\\\",\\\"cpu\\\":0.425,\\\"memory\\\":638710748.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0137,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":201},{\\\"dateUtc\\\":\\\"2022-09-29T07:12:03.3987198Z\\\",\\\"cpu\\\":0.363,\\\"memory\\\":638461332.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0189,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":201},{\\\"dateUtc\\\":\\\"2022-09-29T07:12:13.4087656Z\\\",\\\"cpu\\\":0.300,\\\"memory\\\":638349524.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0174,\\\"availableThreads\\\":32756,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":201}]}\\r\\nRequestStart: + 2022-09-29T07:12:14.0787661Z; ResponseTime: 2022-09-29T07:12:14.0787661Z; + StoreResult: StorePhysicalAddress: rntbd://10.0.1.9:11000/apps/e77cbcf6-3068-496d-94e2-e75125488806/services/99e15dc8-0dd2-49d6-967a-c33962f68c72/partitions/3fd12ba9-c7fc-4398-9b78-775a7e87f07e/replicas/133087107048429915s, + LSN: 9, GlobalCommittedLsn: 9, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#9, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.736, ActivityId: + 0973e619-3fc6-11ed-a021-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:12:14.0787661Z\\\", \\\"durationInMs\\\": 0.0096},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:12:14.0787757Z\\\", + \\\"durationInMs\\\": 0.0034},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:12:14.0787791Z\\\", \\\"durationInMs\\\": 0.0978},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:12:14.0788769Z\\\", + \\\"durationInMs\\\": 1.0466},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:12:14.0799235Z\\\", \\\"durationInMs\\\": 0.0531},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:12:14.0799766Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:12:14.0087815Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:12:14.0087815Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:12:14.0387838Z\\\"},\\\"requestSizeInBytes\\\":462,\\\"responseMetadataSizeInBytes\\\":134,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Database, OperationType: Read\\r\\nRequestStart: 2022-09-29T07:12:14.0787661Z; + ResponseTime: 2022-09-29T07:12:14.0787661Z; StoreResult: StorePhysicalAddress: + rntbd://10.0.1.5:11300/apps/e77cbcf6-3068-496d-94e2-e75125488806/services/99e15dc8-0dd2-49d6-967a-c33962f68c72/partitions/3fd12ba9-c7fc-4398-9b78-775a7e87f07e/replicas/133087107048429917s, + LSN: 9, GlobalCommittedLsn: 9, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#9, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.808, ActivityId: + 0973e619-3fc6-11ed-a021-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:12:14.0787661Z\\\", \\\"durationInMs\\\": 0.004},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:12:14.0787701Z\\\", + \\\"durationInMs\\\": 0.002},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:12:14.0787721Z\\\", \\\"durationInMs\\\": 0.0551},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:12:14.0788272Z\\\", + \\\"durationInMs\\\": 1.0597},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:12:14.0798869Z\\\", \\\"durationInMs\\\": 0.0443},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:12:14.0799312Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:12:13.9287849Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:12:13.9287849Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:12:13.9587848Z\\\"},\\\"requestSizeInBytes\\\":462,\\\"responseMetadataSizeInBytes\\\":134,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Database, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, + Request URI: /dbs/cli000002, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '6517' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:13 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 404 + message: NotFound +- request: + body: '{"properties": {"resource": {"id": "cli000002"}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/bfcdb313-ada5-4bd7-8bfa-56fd62d9f95b?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:15 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002/operationResults/bfcdb313-ada5-4bd7-8bfa-56fd62d9f95b?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/bfcdb313-ada5-4bd7-8bfa-56fd62d9f95b?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Vps2AA==","_self":"dbs/Vps2AA==/","_etag":"\"0100c31c-0000-0700-0000-633545540000\"","_colls":"colls/","_users":"users/","_ts":1664435540}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '478' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database show + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Vps2AA==","_self":"dbs/Vps2AA==/","_etag":"\"0100c31c-0000-0700-0000-633545540000\"","_colls":"colls/","_users":"users/","_ts":1664435540}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '478' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Vps2AA==","_self":"dbs/Vps2AA==/","_etag":"\"0100c31c-0000-0700-0000-633545540000\"","_colls":"colls/","_users":"users/","_ts":1664435540}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '490' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Vps2AA==","_self":"dbs/Vps2AA==/","_etag":"\"0100c31c-0000-0700-0000-633545540000\"","_colls":"colls/","_users":"users/","_ts":1664435540}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '478' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/183434a9-1083-432a-ad8b-4e181eb18d3c?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:12:50 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002/operationResults/183434a9-1083-432a-ad8b-4e181eb18d3c?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/183434a9-1083-432a-ad8b-4e181eb18d3c?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","oldestRestorableTime":"2022-09-29T07:07:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","oldestRestorableTime":"2022-09-29T07:08:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"cli000003","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","oldestRestorableTime":"2022-09-29T07:11:33Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","oldestRestorableTime":"2022-09-29T07:12:08Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:13:22Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:13:21Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '67679' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:13:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000002", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b", + "restoreTimestampInUtc": "2022-09-29T07:12:45.551861Z"}, "createMode": "Restore"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + Content-Length: + - '337' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c7e04d58-84e8-4d58-85eb-4afd64bf5784?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:23 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002/operationResults/c7e04d58-84e8-4d58-85eb-4afd64bf5784?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c7e04d58-84e8-4d58-85eb-4afd64bf5784?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:13:54 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c7e04d58-84e8-4d58-85eb-4afd64bf5784?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:14:24 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c7e04d58-84e8-4d58-85eb-4afd64bf5784?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:14:53 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c7e04d58-84e8-4d58-85eb-4afd64bf5784?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:23 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Vps2AA==","_self":"dbs/Vps2AA==/","_etag":"\"0100c61c-0000-0700-0000-633545b60000\"","_colls":"colls/","_users":"users/","_ts":1664435638}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '478' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:23 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database show + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Vps2AA==","_self":"dbs/Vps2AA==/","_etag":"\"0100c61c-0000-0700-0000-633545b60000\"","_colls":"colls/","_users":"users/","_ts":1664435638}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '478' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:25 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Vps2AA==","_self":"dbs/Vps2AA==/","_etag":"\"0100c61c-0000-0700-0000-633545b60000\"","_colls":"colls/","_users":"users/","_ts":1664435638}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '490' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_normal_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:15:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_oldestRestorableTime.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_oldestRestorableTime.yaml index f3bbca69458..6a308e17fee 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_oldestRestorableTime.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_oldestRestorableTime.yaml @@ -1,1038 +1,1219 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_oldestRestorableTime000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001","name":"cli_test_cosmosdb_sql_oldestRestorableTime000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '375' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 20 Sep 2022 07:28:08 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus2", "kind": "GlobalDocumentDB", "properties": {"locations": - [{"locationName": "eastus2", "failoverPriority": 0, "isZoneRedundant": false}], - "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", - "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": - "Continuous7Days"}}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - Content-Length: - - '343' - Content-Type: - - application/json - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:11.944966Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"d9b2cd74-5d52-4332-b8cf-63763160af03","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/76d7bc1f-3883-4edb-a181-21f79b6229b0?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '1975' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:13 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004/operationResults/76d7bc1f-3883-4edb-a181-21f79b6229b0?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/76d7bc1f-3883-4edb-a181-21f79b6229b0?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:43 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/76d7bc1f-3883-4edb-a181-21f79b6229b0?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:29:14 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/76d7bc1f-3883-4edb-a181-21f79b6229b0?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:29:43 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/76d7bc1f-3883-4edb-a181-21f79b6229b0?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:13 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/76d7bc1f-3883-4edb-a181-21f79b6229b0?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:43 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:49.1785692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"d9b2cd74-5d52-4332-b8cf-63763160af03","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2330' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:43 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:49.1785692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"d9b2cd74-5d52-4332-b8cf-63763160af03","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2330' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:45 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb show - Connection: - - keep-alive - ParameterSetName: - - -n -g - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:49.1785692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"d9b2cd74-5d52-4332-b8cf-63763160af03","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2330' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:45 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_oldestRestorableTime000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001","name":"cli_test_cosmosdb_sql_oldestRestorableTime000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '375' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 20 Sep 2022 07:30:46 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus2", "kind": "GlobalDocumentDB", "properties": {"locations": - [{"locationName": "eastus2", "failoverPriority": 0, "isZoneRedundant": false}], - "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", - "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": - "Continuous7Days"}}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - Content-Length: - - '343' - Content-Type: - - application/json - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:49.1785692Z"},"properties":{"provisioningState":"Updating","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"d9b2cd74-5d52-4332-b8cf-63763160af03","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/27b4d2a9-4520-48bf-9ac8-7a88e8c28e20?api-version=2022-02-15-preview - cache-control: - - no-store, no-cache - content-length: - - '2329' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:30:48 GMT - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004/operationResults/27b4d2a9-4520-48bf-9ac8-7a88e8c28e20?api-version=2022-02-15-preview - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/27b4d2a9-4520-48bf-9ac8-7a88e8c28e20?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '22' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:18 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:49.1785692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"d9b2cd74-5d52-4332-b8cf-63763160af03","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2330' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:18 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --continuous-tier --locations --kind - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:49.1785692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"d9b2cd74-5d52-4332-b8cf-63763160af03","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2330' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:18 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb show - Connection: - - keep-alive - ParameterSetName: - - -n -g - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-02-15-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:29:49.1785692Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"d9b2cd74-5d52-4332-b8cf-63763160af03","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '2330' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:19 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb restorable-database-account show - Connection: - - keep-alive - ParameterSetName: - - --location --instance-id - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d9b2cd74-5d52-4332-b8cf-63763160af03?api-version=2022-02-15-preview - response: - body: - string: '{"name":"d9b2cd74-5d52-4332-b8cf-63763160af03","location":"East US - 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d9b2cd74-5d52-4332-b8cf-63763160af03","properties":{"accountName":"cli-continuous7-000004","apiType":"Sql","creationTime":"2022-09-20T07:29:50Z","oldestRestorableTime":"2022-09-20T07:29:50Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"d6ecb5e4-1261-4e50-99c0-29e8cc17e887","creationTime":"2022-09-20T07:29:51Z"}]}}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '629' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:31:20 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb restorable-database-account list - Connection: - - keep-alive - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-02-15-preview - response: - body: - string: '{"value":[{"name":"257c9845-9c76-4e02-b6aa-c45df6d74351","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/257c9845-9c76-4e02-b6aa-c45df6d74351","properties":{"accountName":"cliqwlgknilbfow","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:57:56Z","oldestRestorableTime":"2022-09-20T06:57:56Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"00e3cba5-bdef-4dd4-96d4-c184fb94784f","creationTime":"2022-09-20T06:57:58Z"}]}},{"name":"d26ff24f-5217-4b0c-b52b-a6326be32c87","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/d26ff24f-5217-4b0c-b52b-a6326be32c87","properties":{"accountName":"clirie7hraznup4","apiType":"Table, - Sql","creationTime":"2022-09-20T06:58:00Z","oldestRestorableTime":"2022-09-20T06:58:00Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"43a328e8-5ccc-497d-a356-4ee4d7e306e2","creationTime":"2022-09-20T06:58:01Z"}]}},{"name":"e039d441-9698-42ba-8471-f78728e3932f","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e039d441-9698-42ba-8471-f78728e3932f","properties":{"accountName":"clixsligrhnkthm","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:07:36Z","oldestRestorableTime":"2022-09-20T07:07:36Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"b3d364b8-b3a2-428f-988a-27bb4cf0c112","creationTime":"2022-09-20T07:07:37Z"}]}},{"name":"6cbb9e3c-1fa3-4d80-85e5-6131c42811fb","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/6cbb9e3c-1fa3-4d80-85e5-6131c42811fb","properties":{"accountName":"cli2jvorduabbs6","apiType":"Table, - Sql","creationTime":"2022-09-20T07:07:41Z","oldestRestorableTime":"2022-09-20T07:07:41Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"fc8a971e-ad61-47a9-a731-4e706e0ec024","creationTime":"2022-09-20T07:07:42Z"}]}},{"name":"de173432-0f17-4f34-bbcf-111200be4f1a","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/de173432-0f17-4f34-bbcf-111200be4f1a","properties":{"accountName":"climaslmt6clahf","apiType":"Table, - Sql","creationTime":"2022-09-20T07:26:46Z","oldestRestorableTime":"2022-09-20T07:26:46Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"a6203059-530c-4847-b8dd-be2b45aadf6c","creationTime":"2022-09-20T07:26:46Z"}]}},{"name":"dfb7ab5f-d103-4498-bab0-d77e2cbbe6da","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/dfb7ab5f-d103-4498-bab0-d77e2cbbe6da","properties":{"accountName":"clihhselzsgnxci","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:26:51Z","oldestRestorableTime":"2022-09-20T07:26:51Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"6696a646-0dd5-4419-ae9e-45d0921194f7","creationTime":"2022-09-20T07:26:51Z"}]}},{"name":"e175b9a1-eeae-4331-b509-8516a500995b","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e175b9a1-eeae-4331-b509-8516a500995b","properties":{"accountName":"clia4wonnytzxku","apiType":"Table, - Sql","creationTime":"2022-09-20T07:31:06Z","oldestRestorableTime":"2022-09-20T07:31:06Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"d64e8aa5-4fae-4784-a1e8-798868eee115","creationTime":"2022-09-20T07:31:07Z"}]}},{"name":"2b567c10-cb59-41b3-b522-341b45e961fd","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/2b567c10-cb59-41b3-b522-341b45e961fd","properties":{"accountName":"cli2bdyu5ikmib7","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:31:04Z","oldestRestorableTime":"2022-09-20T07:31:04Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"63270364-1197-4702-90bd-505cd5a9c39f","creationTime":"2022-09-20T07:31:05Z"}]}},{"name":"5d4c9410-0368-4540-a6d6-2acf346d055e","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/5d4c9410-0368-4540-a6d6-2acf346d055e","properties":{"accountName":"cli4xpfpmginjkx","apiType":"MongoDB","creationTime":"2022-09-20T06:58:53Z","oldestRestorableTime":"2022-09-20T06:58:53Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"364d03ae-5e1d-4028-9d7a-899e95e3390e","creationTime":"2022-09-20T06:58:54Z"}]}},{"name":"71e6d92e-64f7-4026-9239-68fb622c1cbd","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/71e6d92e-64f7-4026-9239-68fb622c1cbd","properties":{"accountName":"cliwuke4f7ez2bm","apiType":"Table, - Sql","creationTime":"2022-09-20T06:58:51Z","oldestRestorableTime":"2022-09-20T06:58:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"869e7338-783e-4277-8d0e-0a7257853ddc","creationTime":"2022-09-20T06:58:52Z"}]}},{"name":"508132ae-8315-4f07-8c38-8806a39dfe3b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/508132ae-8315-4f07-8c38-8806a39dfe3b","properties":{"accountName":"cliatg4hovhsjun","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:58:48Z","oldestRestorableTime":"2022-09-20T06:58:48Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"03886ad8-258b-4c22-ba99-956418af8c52","creationTime":"2022-09-20T06:58:50Z"}]}},{"name":"b9b05fe1-ff67-415a-9a47-9f7c814506c0","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9b05fe1-ff67-415a-9a47-9f7c814506c0","properties":{"accountName":"cligz5iirsuhy54","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:58:34Z","oldestRestorableTime":"2022-09-20T06:58:34Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"d98d0aed-ba88-4df6-960c-48323e132a1d","creationTime":"2022-09-20T06:58:35Z"}]}},{"name":"a57e21c5-4307-47aa-a67b-708e2cf5e045","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a57e21c5-4307-47aa-a67b-708e2cf5e045","properties":{"accountName":"clijexpfpgj4xel","apiType":"Table, - Sql","creationTime":"2022-09-20T06:59:25Z","oldestRestorableTime":"2022-09-20T06:59:25Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"806c35f4-94df-432a-aa5f-9eca0ab47262","creationTime":"2022-09-20T06:59:26Z"}]}},{"name":"7ecee14c-acd0-4d2d-9227-1a9cca60f606","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7ecee14c-acd0-4d2d-9227-1a9cca60f606","properties":{"accountName":"cliqwbd7wrqol4u","apiType":"Table, - Sql","creationTime":"2022-09-20T06:59:23Z","oldestRestorableTime":"2022-09-20T06:59:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"87b06295-42cb-4aa9-a639-8f52d4412111","creationTime":"2022-09-20T06:59:24Z"}]}},{"name":"5ed10bbe-201a-4cfa-b188-08964e31a970","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/5ed10bbe-201a-4cfa-b188-08964e31a970","properties":{"accountName":"clite3mysf2h7oc","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:59:24Z","oldestRestorableTime":"2022-09-20T06:59:24Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"096e5485-f140-4786-96b9-263670bf610d","creationTime":"2022-09-20T06:59:25Z"}]}},{"name":"faddd26c-1aea-4e26-bc85-ef2851e5b1ad","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/faddd26c-1aea-4e26-bc85-ef2851e5b1ad","properties":{"accountName":"cliiwxv2f7jtutq","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:32Z","oldestRestorableTime":"2022-09-20T07:09:32Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"e93ba2dd-f14e-4eeb-8607-59a65c670a8d","creationTime":"2022-09-20T07:09:34Z"}]}},{"name":"4bf354b5-2cc6-4362-b72d-06b810e007b8","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bf354b5-2cc6-4362-b72d-06b810e007b8","properties":{"accountName":"clidszljdbpajb2","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:09:31Z","oldestRestorableTime":"2022-09-20T07:09:31Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"50942b9d-b33b-4497-86af-aebdfa536490","creationTime":"2022-09-20T07:09:33Z"}]}},{"name":"c1a89bca-1680-44c9-8368-57fab7d3ce9f","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c1a89bca-1680-44c9-8368-57fab7d3ce9f","properties":{"accountName":"cli-periodic-cljpeqrfavoc","apiType":"Sql","creationTime":"2022-09-20T07:25:27Z","oldestRestorableTime":"2022-09-20T07:25:27Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"4c07c0cc-973d-4b4a-9d66-ae2d2fa9dd94","creationTime":"2022-09-20T07:25:27Z"}]}},{"name":"bd23a72e-8c62-47c7-bd05-1ccd468ee3ad","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/bd23a72e-8c62-47c7-bd05-1ccd468ee3ad","properties":{"accountName":"clih4tsxxvdyqam","apiType":"Table, - Sql","creationTime":"2022-09-20T07:29:02Z","oldestRestorableTime":"2022-09-20T07:29:02Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"6b63f457-fcca-425f-982d-30af45f213d3","creationTime":"2022-09-20T07:29:02Z"}]}},{"name":"a6a2dbf4-3fd8-473b-9102-c2ead58486d1","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a6a2dbf4-3fd8-473b-9102-c2ead58486d1","properties":{"accountName":"clinlw2brcr45fg","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:30:02Z","oldestRestorableTime":"2022-09-20T07:30:02Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"26aa104a-a6bc-4705-856e-8029bb9567f8","creationTime":"2022-09-20T07:30:02Z"}]}},{"name":"d9b2cd74-5d52-4332-b8cf-63763160af03","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d9b2cd74-5d52-4332-b8cf-63763160af03","properties":{"accountName":"cli-continuous7-000004","apiType":"Sql","creationTime":"2022-09-20T07:29:50Z","oldestRestorableTime":"2022-09-20T07:29:50Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"d6ecb5e4-1261-4e50-99c0-29e8cc17e887","creationTime":"2022-09-20T07:29:51Z"}]}},{"name":"604b862e-8311-4252-84ec-94dc06e4adcc","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/604b862e-8311-4252-84ec-94dc06e4adcc","properties":{"accountName":"cli-continuous30-pq5j3zii","apiType":"Sql","creationTime":"2022-09-20T07:29:51Z","oldestRestorableTime":"2022-09-20T07:29:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"bb12bee4-2f39-4dd2-811b-82c7cdafcd7b","creationTime":"2022-09-20T07:29:52Z"}]}},{"name":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ffdc6000-b5a4-4280-8914-7358f7c59e9b","properties":{"accountName":"cli-continuous7-p6aq45s3u","apiType":"Sql","creationTime":"2022-09-20T07:30:25Z","oldestRestorableTime":"2022-09-20T07:30:25Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c5b358c6-b898-46d9-a764-153b137004ce","creationTime":"2022-09-20T07:30:26Z"}]}},{"name":"08925518-7cca-41f1-881c-6b404c728f04","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/08925518-7cca-41f1-881c-6b404c728f04","properties":{"accountName":"cliimny6cecr4ww","apiType":"Sql","creationTime":"2022-09-20T07:30:18Z","oldestRestorableTime":"2022-09-20T07:30:18Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"e0b60541-9ee3-44c5-b9c0-e951c6f150c0","creationTime":"2022-09-20T07:30:19Z"}]}},{"name":"9cba50f9-b777-4e28-a639-d1f2cc46a2cb","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9cba50f9-b777-4e28-a639-d1f2cc46a2cb","properties":{"accountName":"cli-continuous30-bcltzefu","apiType":"Sql","creationTime":"2022-09-20T06:56:35Z","deletionTime":"2022-09-20T06:58:55Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"b1086a3e-d45d-472c-903a-099339e66ff4","creationTime":"2022-09-20T06:56:36Z","deletionTime":"2022-09-20T06:58:55Z"}]}},{"name":"71ad3372-2c99-46e7-999b-d029cafcde99","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/71ad3372-2c99-46e7-999b-d029cafcde99","properties":{"accountName":"cliqg2buoohhxib","apiType":"Sql","creationTime":"2022-09-20T06:56:47Z","deletionTime":"2022-09-20T07:01:37Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c2acb6ce-146b-4d7e-97b5-309e0d0ba031","creationTime":"2022-09-20T06:56:48Z","deletionTime":"2022-09-20T07:01:37Z"}]}},{"name":"0d5a1375-7285-42a7-a4c8-e30c0fc346ab","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d5a1375-7285-42a7-a4c8-e30c0fc346ab","properties":{"accountName":"cli-continuous7-65osau3nh","apiType":"Sql","creationTime":"2022-09-20T07:06:15Z","deletionTime":"2022-09-20T07:08:17Z","oldestRestorableTime":"2022-09-13T07:08:17Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"871c9ba5-22c7-4c12-9861-b39d3ec2c2e0","creationTime":"2022-09-20T07:06:16Z","deletionTime":"2022-09-20T07:08:17Z"}]}},{"name":"95d6104d-75c6-46dd-8ec6-f694477bc0d6","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/95d6104d-75c6-46dd-8ec6-f694477bc0d6","properties":{"accountName":"cli-continuous30-w3te74xk","apiType":"Sql","creationTime":"2022-09-20T07:06:17Z","deletionTime":"2022-09-20T07:08:26Z","oldestRestorableTime":"2022-09-13T07:08:26Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"7338fe3b-59c9-4171-a1b1-b7422e8d8afe","creationTime":"2022-09-20T07:06:18Z","deletionTime":"2022-09-20T07:08:26Z"}]}},{"name":"508d74a3-1d19-4142-9dd6-571d66a87c41","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/508d74a3-1d19-4142-9dd6-571d66a87c41","properties":{"accountName":"cli-continuous7-7v6xqmb63","apiType":"Sql","creationTime":"2022-09-20T07:06:22Z","deletionTime":"2022-09-20T07:09:32Z","oldestRestorableTime":"2022-09-13T07:07:19Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"457b2138-f06d-4638-82b6-1073189f628b","creationTime":"2022-09-20T07:06:23Z","deletionTime":"2022-09-20T07:09:32Z"}]}},{"name":"cfe3d7a7-45bc-4877-8472-736864c9b5f9","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cfe3d7a7-45bc-4877-8472-736864c9b5f9","properties":{"accountName":"clixilzxjjied4f","apiType":"Sql","creationTime":"2022-09-20T07:06:47Z","deletionTime":"2022-09-20T07:10:46Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"ba2dc9f5-269e-4ab0-a11c-4b9e688e2303","creationTime":"2022-09-20T07:06:48Z","deletionTime":"2022-09-20T07:10:46Z"}]}},{"name":"2690cc86-3796-4d1c-899a-ea2de74efa34","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2690cc86-3796-4d1c-899a-ea2de74efa34","properties":{"accountName":"cligfkup2qadxbs","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:08:17Z","deletionTime":"2022-09-20T07:12:28Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"f937c85d-0ebb-4356-b183-81995a031870","creationTime":"2022-09-20T07:08:18Z","deletionTime":"2022-09-20T07:12:28Z"}]}},{"name":"d907fff6-bfe7-439b-b0fe-0cda508ce935","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d907fff6-bfe7-439b-b0fe-0cda508ce935","properties":{"accountName":"cli46ku46eatxsg","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:08:23Z","deletionTime":"2022-09-20T07:12:49Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c7591c48-2839-4179-b387-11a03dc21faa","creationTime":"2022-09-20T07:08:24Z","deletionTime":"2022-09-20T07:12:49Z"}]}},{"name":"00f9d479-167f-46a7-9617-da1cd54ffa64","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/00f9d479-167f-46a7-9617-da1cd54ffa64","properties":{"accountName":"clinrcj6fzstkit","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:28Z","deletionTime":"2022-09-20T07:13:47Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"3e3add00-cae4-46f3-8806-2955fae16d7b","creationTime":"2022-09-20T07:09:29Z","deletionTime":"2022-09-20T07:13:47Z"}]}},{"name":"faf3657c-1a01-4ac5-9525-e70acbef0e71","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/faf3657c-1a01-4ac5-9525-e70acbef0e71","properties":{"accountName":"clibbwbehryuf3y","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:32Z","deletionTime":"2022-09-20T07:14:19Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"cf5da2c0-4bf1-4e8b-8133-bbc845bc811d","creationTime":"2022-09-20T07:09:33Z","deletionTime":"2022-09-20T07:14:19Z"}]}},{"name":"64521b27-67b5-45fa-85d1-d2be34e4130a","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/64521b27-67b5-45fa-85d1-d2be34e4130a","properties":{"accountName":"clizng4ucknrzlj","apiType":"MongoDB","creationTime":"2022-09-20T07:09:26Z","deletionTime":"2022-09-20T07:14:48Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"92e08db9-45a8-44bd-8170-de3b8fc8210e","creationTime":"2022-09-20T07:09:27Z","deletionTime":"2022-09-20T07:14:48Z"}]}},{"name":"cb60e313-4fce-4827-8b88-7b229922ba3f","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/cb60e313-4fce-4827-8b88-7b229922ba3f","properties":{"accountName":"clibfdc7nvbjcss","apiType":"MongoDB","creationTime":"2022-09-16T07:05:49Z","deletionTime":"2022-09-16T08:02:20Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"fab58a28-536e-490e-8057-e4fcbb2ce2fe","creationTime":"2022-09-16T07:05:50Z","deletionTime":"2022-09-16T08:02:20Z"}]}},{"name":"313977bf-0600-490f-bd43-cf3dbcc8acd6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/313977bf-0600-490f-bd43-cf3dbcc8acd6","properties":{"accountName":"clidu42bussweh4","apiType":"Sql","creationTime":"2022-09-16T07:03:41Z","deletionTime":"2022-09-16T22:33:00Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"bf443477-3631-4fc8-b2cf-39443b29b7fd","creationTime":"2022-09-16T07:03:43Z","deletionTime":"2022-09-16T22:33:00Z"}]}},{"name":"410ae43b-5529-4a01-ab04-ababa3b66da6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/410ae43b-5529-4a01-ab04-ababa3b66da6","properties":{"accountName":"clik5k4my5jiscc","apiType":"MongoDB","creationTime":"2022-09-16T07:05:48Z","deletionTime":"2022-09-16T22:33:01Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"3aecbccf-b953-4e18-b621-5354abb3023b","creationTime":"2022-09-16T07:05:50Z","deletionTime":"2022-09-16T22:33:01Z"}]}},{"name":"dbd5f878-e6fb-43b8-95e6-71e23c56ff2d","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dbd5f878-e6fb-43b8-95e6-71e23c56ff2d","properties":{"accountName":"dbaccount-7193","apiType":"Sql","creationTime":"2022-09-16T22:45:23Z","deletionTime":"2022-09-16T22:50:21Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"1e39a514-1472-475d-a9c8-c95f8fbc6083","creationTime":"2022-09-16T22:45:24Z","deletionTime":"2022-09-16T22:50:21Z"}]}},{"name":"8f992221-1433-4ae8-af34-c4c0e8b8be2a","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8f992221-1433-4ae8-af34-c4c0e8b8be2a","properties":{"accountName":"r-database-account-2123","apiType":"Sql","creationTime":"2022-09-16T22:54:15Z","deletionTime":"2022-09-16T22:55:13Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"13c00146-4006-4fd9-96bc-9db4a62ef07c","creationTime":"2022-09-16T22:54:16Z","deletionTime":"2022-09-16T22:55:13Z"}]}},{"name":"00e030b5-e4e6-4d1b-9fc1-92c4275ed52d","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/00e030b5-e4e6-4d1b-9fc1-92c4275ed52d","properties":{"accountName":"r-database-account-5280","apiType":"Sql","creationTime":"2022-09-16T23:05:11Z","deletionTime":"2022-09-16T23:06:10Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"063bae49-12e5-47f6-af4e-776ec0a5c368","creationTime":"2022-09-16T23:05:12Z","deletionTime":"2022-09-16T23:06:10Z"}]}},{"name":"b6ca1cd6-dad7-477d-93cb-90da1b86ff92","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ca1cd6-dad7-477d-93cb-90da1b86ff92","properties":{"accountName":"dbaccount-3711","apiType":"Sql","creationTime":"2022-09-16T23:16:39Z","deletionTime":"2022-09-16T23:21:31Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"74ac4413-8d2e-4e8a-baf3-9c2a5dfe7841","creationTime":"2022-09-16T23:16:40Z","deletionTime":"2022-09-16T23:21:31Z"}]}},{"name":"40638959-6393-4738-b2ef-7134c4f1b876","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/40638959-6393-4738-b2ef-7134c4f1b876","properties":{"accountName":"cliswrqd5krl5dz","apiType":"MongoDB","creationTime":"2022-09-19T07:07:09Z","deletionTime":"2022-09-19T08:13:36Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"cf381911-15ec-4bb9-befd-fcb968b79eb4","creationTime":"2022-09-19T07:07:10Z","deletionTime":"2022-09-19T08:13:36Z"}]}},{"name":"f31abfdd-f69b-4567-9b35-2cd0e82c54e6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f31abfdd-f69b-4567-9b35-2cd0e82c54e6","properties":{"accountName":"cli5avgifijfvao","apiType":"Sql","creationTime":"2022-09-19T07:05:33Z","deletionTime":"2022-09-19T08:13:38Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"571e5d29-d8d7-424a-8831-f03772fb3ba8","creationTime":"2022-09-19T07:05:34Z","deletionTime":"2022-09-19T08:13:38Z"}]}},{"name":"baa0e3fb-6014-44c3-b538-e233f9f21123","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/baa0e3fb-6014-44c3-b538-e233f9f21123","properties":{"accountName":"clifuwxyu6vqzpa","apiType":"MongoDB","creationTime":"2022-09-19T07:07:00Z","deletionTime":"2022-09-19T08:13:39Z","oldestRestorableTime":"2022-08-21T07:31:21Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"f219b5af-9d61-4c53-a33e-c6e9a06107eb","creationTime":"2022-09-19T07:07:01Z","deletionTime":"2022-09-19T08:13:39Z"}]}}]}' - headers: - cache-control: - - no-cache - content-length: - - '29883' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 20 Sep 2022 07:31:22 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-original-request-ids: - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - '' - status: - code: 200 - message: OK -version: 1 +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_oldestRestorableTime000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001","name":"cli_test_cosmosdb_sql_oldestRestorableTime000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:42:42Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '375' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:42:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "eastus2", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous7Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '343' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:42:50.2307072Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"844b164e-64e2-4fad-8594-095b10b18bbc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:42:50.2307072Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:42:50.2307072Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:42:50.2307072Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:42:50.2307072Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/04dde1a0-c06c-4a43-8f62-5d827f47d8bf?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2403' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:42:52 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004/operationResults/04dde1a0-c06c-4a43-8f62-5d827f47d8bf?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/04dde1a0-c06c-4a43-8f62-5d827f47d8bf?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:43:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/04dde1a0-c06c-4a43-8f62-5d827f47d8bf?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:43:52 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/04dde1a0-c06c-4a43-8f62-5d827f47d8bf?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:44:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/04dde1a0-c06c-4a43-8f62-5d827f47d8bf?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:44:52 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/04dde1a0-c06c-4a43-8f62-5d827f47d8bf?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:45:22 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/04dde1a0-c06c-4a43-8f62-5d827f47d8bf?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:45:53 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:45:03.9298403Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"844b164e-64e2-4fad-8594-095b10b18bbc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2757' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:45:53 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:45:03.9298403Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"844b164e-64e2-4fad-8594-095b10b18bbc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2757' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:45:53 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:45:03.9298403Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"844b164e-64e2-4fad-8594-095b10b18bbc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2757' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:45:54 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_oldestRestorableTime000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001","name":"cli_test_cosmosdb_sql_oldestRestorableTime000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:42:42Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '375' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:45:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "eastus2", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous7Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '343' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:45:03.9298403Z"},"properties":{"provisioningState":"Updating","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"844b164e-64e2-4fad-8594-095b10b18bbc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/55c258c8-620b-4f3e-b005-9f09bb6ea0d2?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2756' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:45:57 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004/operationResults/55c258c8-620b-4f3e-b005-9f09bb6ea0d2?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/55c258c8-620b-4f3e-b005-9f09bb6ea0d2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:46:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:45:03.9298403Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"844b164e-64e2-4fad-8594-095b10b18bbc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2757' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:46:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --continuous-tier --locations --kind + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:45:03.9298403Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"844b164e-64e2-4fad-8594-095b10b18bbc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2757' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:46:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_oldestRestorableTime000001/providers/Microsoft.DocumentDB/databaseAccounts/cli-continuous7-000004","name":"cli-continuous7-000004","location":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:45:03.9298403Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli-continuous7-000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"844b164e-64e2-4fad-8594-095b10b18bbc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","documentEndpoint":"https://cli-continuous7-000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli-continuous7-000004-eastus2","locationName":"East + US 2","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous7Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:45:03.9298403Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2757' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:46:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb restorable-database-account show + Connection: + - keep-alive + ParameterSetName: + - --location --instance-id + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/844b164e-64e2-4fad-8594-095b10b18bbc?api-version=2022-08-15-preview + response: + body: + string: '{"name":"844b164e-64e2-4fad-8594-095b10b18bbc","location":"East US + 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/844b164e-64e2-4fad-8594-095b10b18bbc","properties":{"accountName":"cli-continuous7-000004","apiType":"Sql","creationTime":"2022-09-29T07:45:04Z","oldestRestorableTime":"2022-09-29T07:45:04Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"71c587ae-6da8-453d-8865-a48d24fe21a9","creationTime":"2022-09-29T07:45:06Z"}]}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '629' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:46:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb restorable-database-account list + Connection: + - keep-alive + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","properties":{"accountName":"cliradomcstrzqt","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:40:51Z","oldestRestorableTime":"2022-09-29T07:40:51Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"e2ff0f1d-8209-4d81-a72a-b6942e344110","creationTime":"2022-09-29T07:40:52Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"572c38e5-5506-42c7-986f-2faf4e6b22e1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1","properties":{"accountName":"clintrakgcxza7v","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:45:52Z","oldestRestorableTime":"2022-09-29T07:45:52Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"4208e04d-fda7-42f0-b1b2-3b7e3769cde7","creationTime":"2022-09-29T07:45:53Z"}]}},{"name":"844b164e-64e2-4fad-8594-095b10b18bbc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/844b164e-64e2-4fad-8594-095b10b18bbc","properties":{"accountName":"cli-continuous7-000004","apiType":"Sql","creationTime":"2022-09-29T07:45:04Z","oldestRestorableTime":"2022-09-29T07:45:04Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"71c587ae-6da8-453d-8865-a48d24fe21a9","creationTime":"2022-09-29T07:45:06Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","deletionTime":"2022-09-29T07:29:11Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"f895d646-7338-4417-a964-c374f9a113bb","creationTime":"2022-09-29T07:25:12Z","deletionTime":"2022-09-29T07:29:11Z"}]}},{"name":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2b7ef41c-de96-4d76-8959-58fb40b3f4fc","properties":{"accountName":"cli2nmd2acsdvq2","apiType":"MongoDB","creationTime":"2022-09-29T07:32:57Z","deletionTime":"2022-09-29T07:37:10Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[]}},{"name":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","properties":{"accountName":"cli5d7r5woval7l","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:41:00Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[]}},{"name":"9ea6fb52-a251-464b-aace-42338f28d639","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9ea6fb52-a251-464b-aace-42338f28d639","properties":{"accountName":"clijhukzjokpayf","apiType":"Sql","creationTime":"2022-09-29T07:39:00Z","deletionTime":"2022-09-29T07:43:07Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[]}},{"name":"9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","properties":{"accountName":"cliabmdaxkqpzo7","apiType":"Sql","creationTime":"2022-09-29T07:33:49Z","oldestRestorableTime":"2022-09-29T07:33:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87589c6d-f091-4778-9118-8b70c299f205","creationTime":"2022-09-29T07:33:50Z"}]}},{"name":"647fa227-e369-4b93-8c3d-e261644d2fcf","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/647fa227-e369-4b93-8c3d-e261644d2fcf","properties":{"accountName":"clisb32fuxaefpe","apiType":"Sql","creationTime":"2022-09-29T07:35:16Z","oldestRestorableTime":"2022-09-29T07:35:16Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"5671631f-5ced-4ca6-97e8-273fac7d09c4","creationTime":"2022-09-29T07:35:17Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","deletionTime":"2022-09-29T07:31:57Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z","deletionTime":"2022-09-29T07:31:57Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","deletionTime":"2022-09-29T07:33:27Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z","deletionTime":"2022-09-29T07:33:27Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","deletionTime":"2022-09-29T07:37:12Z","oldestRestorableTime":"2022-08-30T07:46:31Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:46:30Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '74460' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:46:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_shared_database_prov_container_restore.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_shared_database_prov_container_restore.yaml new file mode 100644 index 00000000000..9599c2d8a94 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_shared_database_prov_container_restore.yaml @@ -0,0 +1,5117 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001","name":"cli_test_cosmosdb_sql_shared_database_prov_container_restore000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:33:03Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:33:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "WestUS", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '342' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:33:11.6488955Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"647fa227-e369-4b93-8c3d-e261644d2fcf","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:33:11.6488955Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:33:11.6488955Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:33:11.6488955Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:33:11.6488955Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4d325817-2497-4930-8429-5426c59f1852?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2330' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:33:13 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/4d325817-2497-4930-8429-5426c59f1852?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4d325817-2497-4930-8429-5426c59f1852?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:33:43 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4d325817-2497-4930-8429-5426c59f1852?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:34:14 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4d325817-2497-4930-8429-5426c59f1852?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:34:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4d325817-2497-4930-8429-5426c59f1852?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:13 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4d325817-2497-4930-8429-5426c59f1852?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4d325817-2497-4930-8429-5426c59f1852?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:14 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:35:15.4443361Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"647fa227-e369-4b93-8c3d-e261644d2fcf","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:35:15.4443361Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:35:15.4443361Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:35:15.4443361Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:35:15.4443361Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2629' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:14 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:35:15.4443361Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"647fa227-e369-4b93-8c3d-e261644d2fcf","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:35:15.4443361Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:35:15.4443361Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:35:15.4443361Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:35:15.4443361Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2629' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:14 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002"}, "options": {"throughput": + 1000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + Content-Length: + - '82' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a857eb3a-163e-487a-9c81-282580d65098?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:16 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/operationResults/a857eb3a-163e-487a-9c81-282580d65098?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a857eb3a-163e-487a-9c81-282580d65098?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"FlMbAA==","_self":"dbs/FlMbAA==/","_etag":"\"00000b00-0000-0700-0000-63354af70000\"","_colls":"colls/","_users":"users/","_ts":1664436983}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '493' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"code":"NotFound","message":"Message: {\"code\":\"NotFound\",\"message\":\"Message: + {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https:\\\\/\\\\/aka.ms\\\\/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: + 78256fd1-3fc9-11ed-a546-9c7bef4baa38, Request URI: /apps/c142d4d4-24af-445f-aa7f-35132d80c35a/services/3b01dab0-3f6d-4621-8c4f-44ef7955e0ba/partitions/0b2b2ee6-c0cd-4000-b3c1-62f33ca169a9/replicas/133089021066024928s, + RequestStats: \\r\\nRequestStartTime: 2022-09-29T07:36:48.1189985Z, RequestEndTime: + 2022-09-29T07:36:48.1189985Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-29T07:35:45.9391606Z\\\",\\\"cpu\\\":0.592,\\\"memory\\\":649429284.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0307,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":112},{\\\"dateUtc\\\":\\\"2022-09-29T07:35:55.9491301Z\\\",\\\"cpu\\\":0.171,\\\"memory\\\":649089936.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0247,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":112},{\\\"dateUtc\\\":\\\"2022-09-29T07:36:05.9591068Z\\\",\\\"cpu\\\":0.168,\\\"memory\\\":648701696.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0182,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":112},{\\\"dateUtc\\\":\\\"2022-09-29T07:36:25.9690551Z\\\",\\\"cpu\\\":0.369,\\\"memory\\\":648584052.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0209,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":109},{\\\"dateUtc\\\":\\\"2022-09-29T07:36:35.9792268Z\\\",\\\"cpu\\\":0.524,\\\"memory\\\":648731292.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.041,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":109},{\\\"dateUtc\\\":\\\"2022-09-29T07:36:45.9890213Z\\\",\\\"cpu\\\":0.525,\\\"memory\\\":648544376.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0299,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":109}]}\\r\\nRequestStart: + 2022-09-29T07:36:48.1189985Z; ResponseTime: 2022-09-29T07:36:48.1189985Z; + StoreResult: StorePhysicalAddress: rntbd://10.0.1.10:11000/apps/c142d4d4-24af-445f-aa7f-35132d80c35a/services/3b01dab0-3f6d-4621-8c4f-44ef7955e0ba/partitions/0b2b2ee6-c0cd-4000-b3c1-62f33ca169a9/replicas/133089021066024928s, + LSN: 10, GlobalCommittedLsn: 10, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#10, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.722, ActivityId: + 78256fd1-3fc9-11ed-a546-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:36:48.1189985Z\\\", \\\"durationInMs\\\": 0.0147},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:36:48.1190132Z\\\", + \\\"durationInMs\\\": 0.0025},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:36:48.1190157Z\\\", \\\"durationInMs\\\": 0.2138},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:36:48.1192295Z\\\", + \\\"durationInMs\\\": 1.0449},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:36:48.1202744Z\\\", \\\"durationInMs\\\": 0.0842},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:36:48.1203586Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:36:48.0589999Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:36:48.0589999Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:36:48.0889996Z\\\"},\\\"requestSizeInBytes\\\":490,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Collection, OperationType: Read\\r\\nRequestStart: 2022-09-29T07:36:48.1189985Z; + ResponseTime: 2022-09-29T07:36:48.1189985Z; StoreResult: StorePhysicalAddress: + rntbd://10.0.1.11:11000/apps/c142d4d4-24af-445f-aa7f-35132d80c35a/services/3b01dab0-3f6d-4621-8c4f-44ef7955e0ba/partitions/0b2b2ee6-c0cd-4000-b3c1-62f33ca169a9/replicas/133089021066024927s, + LSN: 10, GlobalCommittedLsn: 10, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#10, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.8, ActivityId: + 78256fd1-3fc9-11ed-a546-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:36:48.1189985Z\\\", \\\"durationInMs\\\": 0.0044},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:36:48.1190029Z\\\", + \\\"durationInMs\\\": 0.0011},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:36:48.1190040Z\\\", \\\"durationInMs\\\": 0.2129},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:36:48.1192169Z\\\", + \\\"durationInMs\\\": 0.9775},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:36:48.1201944Z\\\", \\\"durationInMs\\\": 0.0502},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:36:48.1202446Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:36:48.0589999Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:36:48.0589999Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:36:48.0889996Z\\\"},\\\"requestSizeInBytes\\\":490,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Collection, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, + Request URI: /dbs/cli000002/colls/cli000003, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '6545' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:47 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 404 + message: NotFound +- request: + body: '{"properties": {"resource": {"id": "cli000003", "indexingPolicy": {"automatic": + true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": + [{"path": "/headquarters/employees/?"}]}, "partitionKey": {"paths": ["/thePartitionKey"], + "kind": "Hash"}, "uniqueKeyPolicy": {"uniqueKeys": [{"paths": ["/path/to/key1"]}, + {"paths": ["/path/to/key2"]}]}, "conflictResolutionPolicy": {"mode": "lastWriterWins", + "conflictResolutionPath": "/path"}}, "options": {"throughput": 1000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + Content-Length: + - '497' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n -p --unique-key-policy --conflict-resolution-policy --idx --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/46c0e695-aaa2-4846-9311-8e127c304024?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:36:50 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/46c0e695-aaa2-4846-9311-8e127c304024?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p --unique-key-policy --conflict-resolution-policy --idx --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/46c0e695-aaa2-4846-9311-8e127c304024?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:37:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p --unique-key-policy --conflict-resolution-policy --idx --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"FlMbANisrgE=","_ts":1664437019,"_self":"dbs/FlMbAA==/colls/FlMbANisrgE=/","_etag":"\"00001000-0000-0700-0000-63354b1b0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1238' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:37:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"FlMbANisrgE=","_ts":1664437019,"_self":"dbs/FlMbAA==/colls/FlMbANisrgE=/","_etag":"\"00001000-0000-0700-0000-63354b1b0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1238' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:37:21 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000003", "indexingPolicy": {"automatic": + true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": + [{"path": "/headquarters/employees/?"}, {"path": "/\"_etag\"/?"}]}, "partitionKey": + {"paths": ["/thePartitionKey"], "kind": "Hash"}, "uniqueKeyPolicy": {"uniqueKeys": + [{"paths": ["/path/to/key1"]}, {"paths": ["/path/to/key2"]}]}, "conflictResolutionPolicy": + {"mode": "lastWriterWins", "conflictResolutionPath": "/path", "conflictResolutionProcedure": + ""}}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container update + Connection: + - keep-alive + Content-Length: + - '540' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4e974268-1791-423e-8fd4-c5e6eb2149ec?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:37:21 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/4e974268-1791-423e-8fd4-c5e6eb2149ec?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4e974268-1791-423e-8fd4-c5e6eb2149ec?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:37:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container update + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"FlMbANisrgE=","_ts":1664437019,"_self":"dbs/FlMbAA==/colls/FlMbANisrgE=/","_etag":"\"00001000-0000-0700-0000-63354b1b0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":128,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1240' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:37:52 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"FlMbANisrgE=","_ts":1664437019,"_self":"dbs/FlMbAA==/colls/FlMbANisrgE=/","_etag":"\"00001000-0000-0700-0000-63354b1b0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":128,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1240' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:37:53 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"FlMbANisrgE=","_ts":1664437019,"_self":"dbs/FlMbAA==/colls/FlMbANisrgE=/","_etag":"\"00001000-0000-0700-0000-63354b1b0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1137' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:37:53 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"FlMbANisrgE=","_ts":1664437019,"_self":"dbs/FlMbAA==/colls/FlMbANisrgE=/","_etag":"\"00001000-0000-0700-0000-63354b1b0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":128,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1240' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:42:54 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/56afbe89-c12b-4141-9522-47930d7fa0c0?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:42:56 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/56afbe89-c12b-4141-9522-47930d7fa0c0?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/56afbe89-c12b-4141-9522-47930d7fa0c0?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:43:27 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:43:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","properties":{"accountName":"cliradomcstrzqt","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:40:51Z","oldestRestorableTime":"2022-09-29T07:40:51Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"e2ff0f1d-8209-4d81-a72a-b6942e344110","creationTime":"2022-09-29T07:40:52Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","deletionTime":"2022-09-29T07:29:11Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"f895d646-7338-4417-a964-c374f9a113bb","creationTime":"2022-09-29T07:25:12Z","deletionTime":"2022-09-29T07:29:11Z"}]}},{"name":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2b7ef41c-de96-4d76-8959-58fb40b3f4fc","properties":{"accountName":"cli2nmd2acsdvq2","apiType":"MongoDB","creationTime":"2022-09-29T07:32:57Z","deletionTime":"2022-09-29T07:37:10Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[]}},{"name":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","properties":{"accountName":"cli5d7r5woval7l","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:41:00Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[]}},{"name":"9ea6fb52-a251-464b-aace-42338f28d639","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9ea6fb52-a251-464b-aace-42338f28d639","properties":{"accountName":"clijhukzjokpayf","apiType":"Sql","creationTime":"2022-09-29T07:39:00Z","deletionTime":"2022-09-29T07:43:07Z","oldestRestorableTime":"2022-08-30T07:43:28Z","restorableLocations":[]}},{"name":"9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","properties":{"accountName":"cliabmdaxkqpzo7","apiType":"Sql","creationTime":"2022-09-29T07:33:49Z","oldestRestorableTime":"2022-09-29T07:33:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87589c6d-f091-4778-9118-8b70c299f205","creationTime":"2022-09-29T07:33:50Z"}]}},{"name":"647fa227-e369-4b93-8c3d-e261644d2fcf","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/647fa227-e369-4b93-8c3d-e261644d2fcf","properties":{"accountName":"cli000004","apiType":"Sql","creationTime":"2022-09-29T07:35:16Z","oldestRestorableTime":"2022-09-29T07:35:16Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"5671631f-5ced-4ca6-97e8-273fac7d09c4","creationTime":"2022-09-29T07:35:17Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","deletionTime":"2022-09-29T07:31:57Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z","deletionTime":"2022-09-29T07:31:57Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","deletionTime":"2022-09-29T07:33:27Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z","deletionTime":"2022-09-29T07:33:27Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","deletionTime":"2022-09-29T07:37:12Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:43:29Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '73192' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:43:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000003", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/647fa227-e369-4b93-8c3d-e261644d2fcf", + "restoreTimestampInUtc": "2022-09-29T07:37:52.71738Z"}, "createMode": "Restore"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + Content-Length: + - '351' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:43:30 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:44:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:44:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:45:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:45:30 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:46:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:46:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:47:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:47:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:48:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:48:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:49:01 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:49:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:50:02 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2ef4b51a-fa66-4cdf-9361-5485c1db25e2?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:50:31 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"FlMbANisrgE=","_ts":1664437596,"_self":"dbs/FlMbAA==/colls/FlMbANisrgE=/","_etag":"\"00001c00-0000-0700-0000-63354d5c0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":128,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1240' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:50:32 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"FlMbANisrgE=","_ts":1664437596,"_self":"dbs/FlMbAA==/colls/FlMbANisrgE=/","_etag":"\"00001c00-0000-0700-0000-63354d5c0000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1137' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:50:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c2ad5873-7dd3-49df-babf-f627c2ceb081?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:50:34 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/operationResults/c2ad5873-7dd3-49df-babf-f627c2ceb081?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c2ad5873-7dd3-49df-babf-f627c2ceb081?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:51:04 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:51:05 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","properties":{"accountName":"cliradomcstrzqt","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:40:51Z","oldestRestorableTime":"2022-09-29T07:40:51Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"e2ff0f1d-8209-4d81-a72a-b6942e344110","creationTime":"2022-09-29T07:40:52Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"572c38e5-5506-42c7-986f-2faf4e6b22e1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1","properties":{"accountName":"clintrakgcxza7v","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:45:52Z","oldestRestorableTime":"2022-09-29T07:45:52Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"4208e04d-fda7-42f0-b1b2-3b7e3769cde7","creationTime":"2022-09-29T07:45:53Z"}]}},{"name":"0f76ace0-a6ac-41cd-afab-254a9e03f04c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0f76ace0-a6ac-41cd-afab-254a9e03f04c","properties":{"accountName":"cli65wqr6zeh554","apiType":"Table, + Sql","creationTime":"2022-09-29T07:50:21Z","oldestRestorableTime":"2022-09-29T07:50:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7a1e5609-4c43-420b-ac67-0c8a5af933cb","creationTime":"2022-09-29T07:50:23Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","deletionTime":"2022-09-29T07:29:11Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"f895d646-7338-4417-a964-c374f9a113bb","creationTime":"2022-09-29T07:25:12Z","deletionTime":"2022-09-29T07:29:11Z"}]}},{"name":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2b7ef41c-de96-4d76-8959-58fb40b3f4fc","properties":{"accountName":"cli2nmd2acsdvq2","apiType":"MongoDB","creationTime":"2022-09-29T07:32:57Z","deletionTime":"2022-09-29T07:37:10Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cbc92c38-f75d-463c-a639-8a8ac4ed01c6","creationTime":"2022-09-29T07:32:58Z","deletionTime":"2022-09-29T07:37:10Z"}]}},{"name":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","properties":{"accountName":"cli5d7r5woval7l","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:41:00Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[]}},{"name":"9ea6fb52-a251-464b-aace-42338f28d639","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9ea6fb52-a251-464b-aace-42338f28d639","properties":{"accountName":"clijhukzjokpayf","apiType":"Sql","creationTime":"2022-09-29T07:39:00Z","deletionTime":"2022-09-29T07:43:07Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[]}},{"name":"844b164e-64e2-4fad-8594-095b10b18bbc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/844b164e-64e2-4fad-8594-095b10b18bbc","properties":{"accountName":"cli-continuous7-rypbpuzam","apiType":"Sql","creationTime":"2022-09-29T07:45:04Z","deletionTime":"2022-09-29T07:46:55Z","oldestRestorableTime":"2022-09-22T07:46:55Z","restorableLocations":[]}},{"name":"9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","properties":{"accountName":"cliabmdaxkqpzo7","apiType":"Sql","creationTime":"2022-09-29T07:33:49Z","oldestRestorableTime":"2022-09-29T07:33:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87589c6d-f091-4778-9118-8b70c299f205","creationTime":"2022-09-29T07:33:50Z"}]}},{"name":"647fa227-e369-4b93-8c3d-e261644d2fcf","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/647fa227-e369-4b93-8c3d-e261644d2fcf","properties":{"accountName":"cli000004","apiType":"Sql","creationTime":"2022-09-29T07:35:16Z","oldestRestorableTime":"2022-09-29T07:35:16Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"5671631f-5ced-4ca6-97e8-273fac7d09c4","creationTime":"2022-09-29T07:35:17Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","deletionTime":"2022-09-29T07:31:57Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z","deletionTime":"2022-09-29T07:31:57Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","deletionTime":"2022-09-29T07:33:27Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z","deletionTime":"2022-09-29T07:33:27Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","deletionTime":"2022-09-29T07:37:12Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z","deletionTime":"2022-09-29T07:37:12Z"}]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:51:06Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '75340' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:51:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000002", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/647fa227-e369-4b93-8c3d-e261644d2fcf", + "restoreTimestampInUtc": "2022-09-29T07:37:52.71738Z"}, "createMode": "Restore"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + Content-Length: + - '336' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:51:07 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/operationResults/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:51:37 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:52:08 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:52:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:53:08 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:53:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:54:09 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:54:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:55:09 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:55:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:56:09 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:56:39 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:10 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04e3723e-6bad-4ef6-97ea-3f7ed3ccd639?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:10 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"FlMbAA==","_self":"dbs/FlMbAA==/","_etag":"\"00002200-0000-0700-0000-63354f120000\"","_colls":"colls/","_users":"users/","_ts":1664438034}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '493' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:10 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database show + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"FlMbAA==","_self":"dbs/FlMbAA==/","_etag":"\"00002200-0000-0700-0000-63354f120000\"","_colls":"colls/","_users":"users/","_ts":1664438034}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '493' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:10 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:11 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","properties":{"accountName":"cliradomcstrzqt","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:40:51Z","oldestRestorableTime":"2022-09-29T07:40:51Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"e2ff0f1d-8209-4d81-a72a-b6942e344110","creationTime":"2022-09-29T07:40:52Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","deletionTime":"2022-09-29T07:29:11Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"f895d646-7338-4417-a964-c374f9a113bb","creationTime":"2022-09-29T07:25:12Z","deletionTime":"2022-09-29T07:29:11Z"}]}},{"name":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2b7ef41c-de96-4d76-8959-58fb40b3f4fc","properties":{"accountName":"cli2nmd2acsdvq2","apiType":"MongoDB","creationTime":"2022-09-29T07:32:57Z","deletionTime":"2022-09-29T07:37:10Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cbc92c38-f75d-463c-a639-8a8ac4ed01c6","creationTime":"2022-09-29T07:32:58Z","deletionTime":"2022-09-29T07:37:10Z"}]}},{"name":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","properties":{"accountName":"cli5d7r5woval7l","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:41:00Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"10c6aaeb-9fdd-4de8-b7c0-d9c93ba73c47","creationTime":"2022-09-29T07:41:00Z","deletionTime":"2022-09-29T07:41:54Z"}]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8680b861-bef3-493d-9344-27f17b06b5e3","creationTime":"2022-09-29T07:19:51Z","deletionTime":"2022-09-29T07:41:54Z"}]}},{"name":"9ea6fb52-a251-464b-aace-42338f28d639","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9ea6fb52-a251-464b-aace-42338f28d639","properties":{"accountName":"clijhukzjokpayf","apiType":"Sql","creationTime":"2022-09-29T07:39:00Z","deletionTime":"2022-09-29T07:43:07Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"84631b94-7800-414a-be43-353118e84b4b","creationTime":"2022-09-29T07:39:01Z","deletionTime":"2022-09-29T07:43:07Z"}]}},{"name":"844b164e-64e2-4fad-8594-095b10b18bbc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/844b164e-64e2-4fad-8594-095b10b18bbc","properties":{"accountName":"cli-continuous7-rypbpuzam","apiType":"Sql","creationTime":"2022-09-29T07:45:04Z","deletionTime":"2022-09-29T07:46:55Z","oldestRestorableTime":"2022-09-22T07:46:55Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"71c587ae-6da8-453d-8865-a48d24fe21a9","creationTime":"2022-09-29T07:45:06Z","deletionTime":"2022-09-29T07:46:55Z"}]}},{"name":"572c38e5-5506-42c7-986f-2faf4e6b22e1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1","properties":{"accountName":"clintrakgcxza7v","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:45:52Z","deletionTime":"2022-09-29T07:51:21Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[]}},{"name":"0f76ace0-a6ac-41cd-afab-254a9e03f04c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0f76ace0-a6ac-41cd-afab-254a9e03f04c","properties":{"accountName":"cli65wqr6zeh554","apiType":"Table, + Sql","creationTime":"2022-09-29T07:50:21Z","deletionTime":"2022-09-29T07:55:12Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[]}},{"name":"443a5cfb-d99b-4128-b2e4-6f34c7aa9e93","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/443a5cfb-d99b-4128-b2e4-6f34c7aa9e93","properties":{"accountName":"cli2xh3uatq2hqo","apiType":"Table, + Sql","creationTime":"2022-09-29T07:53:53Z","deletionTime":"2022-09-29T07:57:15Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[]}},{"name":"9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","properties":{"accountName":"cliabmdaxkqpzo7","apiType":"Sql","creationTime":"2022-09-29T07:33:49Z","oldestRestorableTime":"2022-09-29T07:33:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87589c6d-f091-4778-9118-8b70c299f205","creationTime":"2022-09-29T07:33:50Z"}]}},{"name":"647fa227-e369-4b93-8c3d-e261644d2fcf","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/647fa227-e369-4b93-8c3d-e261644d2fcf","properties":{"accountName":"cli000004","apiType":"Sql","creationTime":"2022-09-29T07:35:16Z","oldestRestorableTime":"2022-09-29T07:35:16Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"5671631f-5ced-4ca6-97e8-273fac7d09c4","creationTime":"2022-09-29T07:35:17Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","deletionTime":"2022-09-29T07:31:57Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z","deletionTime":"2022-09-29T07:31:57Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","deletionTime":"2022-09-29T07:33:27Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z","deletionTime":"2022-09-29T07:33:27Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","deletionTime":"2022-09-29T07:37:12Z","oldestRestorableTime":"2022-08-30T07:58:13Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z","deletionTime":"2022-09-29T07:37:12Z"}]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:58:12Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '76377' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:58:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000003", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/647fa227-e369-4b93-8c3d-e261644d2fcf", + "restoreTimestampInUtc": "2022-09-29T07:37:52.71738Z"}, "createMode": "Restore"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + Content-Length: + - '351' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:14 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:14 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:59:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:00:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:01:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:02:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:02:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:03:16 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:03:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:04:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:05:16 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:05:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:06:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:06:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c5a144d3-4a96-4fcc-be52-2f47a1a1e066?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:07:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"FlMbANisrgE=","_ts":1664438594,"_self":"dbs/FlMbAA==/colls/FlMbANisrgE=/","_etag":"\"00003600-0000-0700-0000-633551420000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":128,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1240' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:07:16 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"FlMbANisrgE=","_ts":1664438594,"_self":"dbs/FlMbAA==/colls/FlMbANisrgE=/","_etag":"\"00003600-0000-0700-0000-633551420000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1137' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:07:16 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_prov_container_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"FlMbANisrgE=","_ts":1664438594,"_self":"dbs/FlMbAA==/colls/FlMbANisrgE=/","_etag":"\"00003600-0000-0700-0000-633551420000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":128,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1240' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:07:17 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_shared_database_restore.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_shared_database_restore.yaml new file mode 100644 index 00000000000..c36680b3923 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_sql_shared_database_restore.yaml @@ -0,0 +1,3117 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_sql_shared_database_restore000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001","name":"cli_test_cosmosdb_sql_shared_database_restore000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:31:32Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '380' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:31:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "GlobalDocumentDB", "properties": {"locations": + [{"locationName": "WestUS", "failoverPriority": 0, "isZoneRedundant": false}], + "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Default", + "backupPolicy": {"type": "Continuous", "continuousModeProperties": {"tier": + "Continuous30Days"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + Content-Length: + - '342' + Content-Type: + - application/json + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:31:38.9176967Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:31:38.9176967Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:31:38.9176967Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:31:38.9176967Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:31:38.9176967Z"}}},"identity":{"type":"None"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/341b3585-f3e5-4d81-b7dc-f3d790a40b57?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '2315' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:31:40 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/341b3585-f3e5-4d81-b7dc-f3d790a40b57?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/341b3585-f3e5-4d81-b7dc-f3d790a40b57?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:32:10 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/341b3585-f3e5-4d81-b7dc-f3d790a40b57?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:32:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/341b3585-f3e5-4d81-b7dc-f3d790a40b57?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:33:10 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/341b3585-f3e5-4d81-b7dc-f3d790a40b57?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:33:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/341b3585-f3e5-4d81-b7dc-f3d790a40b57?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:34:10 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/341b3585-f3e5-4d81-b7dc-f3d790a40b57?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:34:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:33:48.9876062Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:33:48.9876062Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:33:48.9876062Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:33:48.9876062Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:33:48.9876062Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2614' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:34:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:33:48.9876062Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus","locationName":"West + US","documentEndpoint":"https://cli000004-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus","locationName":"West + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:33:48.9876062Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:33:48.9876062Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:33:48.9876062Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:33:48.9876062Z"}}},"identity":{"type":"None"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '2614' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:34:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: '{"properties": {"resource": {"id": "cli000002"}, "options": {"throughput": + 1000}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + Content-Length: + - '82' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/105ca66c-45bb-49bb-9e5c-165e52e44707?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:34:41 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/operationResults/105ca66c-45bb-49bb-9e5c-165e52e44707?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/105ca66c-45bb-49bb-9e5c-165e52e44707?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:11 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database create + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --throughput + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"X44HAA==","_self":"dbs/X44HAA==/","_etag":"\"0000af01-0000-0700-0000-63354a9b0000\"","_colls":"colls/","_users":"users/","_ts":1664436891}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '478' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"code":"NotFound","message":"Message: {\"code\":\"NotFound\",\"message\":\"Message: + {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https:\\\\/\\\\/aka.ms\\\\/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: + 3fed3fdc-3fc9-11ed-b710-9c7bef4baa38, Request URI: /apps/5dab990a-8acb-427e-aba7-c62cd831188d/services/bd3228f5-92d5-4526-895a-1fcfc448a4f2/partitions/023137f2-f487-4c73-b980-fe0e8367c5a2/replicas/133088556034971684s, + RequestStats: \\r\\nRequestStartTime: 2022-09-29T07:35:13.7255703Z, RequestEndTime: + 2022-09-29T07:35:13.7255703Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-29T07:34:18.6155479Z\\\",\\\"cpu\\\":0.178,\\\"memory\\\":644175800.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0241,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":110},{\\\"dateUtc\\\":\\\"2022-09-29T07:34:28.6255540Z\\\",\\\"cpu\\\":0.325,\\\"memory\\\":644120924.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0185,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":110},{\\\"dateUtc\\\":\\\"2022-09-29T07:34:38.6355594Z\\\",\\\"cpu\\\":0.753,\\\"memory\\\":643883280.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0251,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":110},{\\\"dateUtc\\\":\\\"2022-09-29T07:34:48.6455655Z\\\",\\\"cpu\\\":1.033,\\\"memory\\\":643900444.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0155,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":110},{\\\"dateUtc\\\":\\\"2022-09-29T07:34:58.6655811Z\\\",\\\"cpu\\\":0.732,\\\"memory\\\":643889728.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0498,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":110},{\\\"dateUtc\\\":\\\"2022-09-29T07:35:08.6757533Z\\\",\\\"cpu\\\":0.300,\\\"memory\\\":643927052.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0287,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":110}]}\\r\\nRequestStart: + 2022-09-29T07:35:13.7255703Z; ResponseTime: 2022-09-29T07:35:13.7255703Z; + StoreResult: StorePhysicalAddress: rntbd://10.0.1.9:11300/apps/5dab990a-8acb-427e-aba7-c62cd831188d/services/bd3228f5-92d5-4526-895a-1fcfc448a4f2/partitions/023137f2-f487-4c73-b980-fe0e8367c5a2/replicas/133088556034971684s, + LSN: 10, GlobalCommittedLsn: 10, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#10, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.862, ActivityId: + 3fed3fdc-3fc9-11ed-b710-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:35:13.7255703Z\\\", \\\"durationInMs\\\": 0.0149},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:35:13.7255852Z\\\", + \\\"durationInMs\\\": 0.01},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:35:13.7255952Z\\\", \\\"durationInMs\\\": 0.1644},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:35:13.7257596Z\\\", + \\\"durationInMs\\\": 1.2484},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:35:13.7270080Z\\\", \\\"durationInMs\\\": 0.0967},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:35:13.7271047Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:35:11.7355714Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:35:11.7355714Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:35:11.7355714Z\\\"},\\\"requestSizeInBytes\\\":492,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Collection, OperationType: Read\\r\\nRequestStart: 2022-09-29T07:35:13.7255703Z; + ResponseTime: 2022-09-29T07:35:13.7255703Z; StoreResult: StorePhysicalAddress: + rntbd://10.0.1.13:11300/apps/5dab990a-8acb-427e-aba7-c62cd831188d/services/bd3228f5-92d5-4526-895a-1fcfc448a4f2/partitions/023137f2-f487-4c73-b980-fe0e8367c5a2/replicas/133088556009503104s, + LSN: 10, GlobalCommittedLsn: 10, PartitionKeyRangeId: , IsValid: True, StatusCode: + 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#10, + UsingLocalLSN: False, TransportException: null, BELatencyMs: 1.024, ActivityId: + 3fed3fdc-3fc9-11ed-b710-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: + {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:35:13.7255703Z\\\", \\\"durationInMs\\\": 0.0042},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:35:13.7255745Z\\\", + \\\"durationInMs\\\": 0.0016},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:35:13.7255761Z\\\", \\\"durationInMs\\\": 0.1281},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:35:13.7257042Z\\\", + \\\"durationInMs\\\": 1.3736},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:35:13.7270778Z\\\", \\\"durationInMs\\\": 0.037},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:35:13.7271148Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:35:13.6655703Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:35:13.6655703Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:35:13.6855682Z\\\"},\\\"requestSizeInBytes\\\":492,\\\"responseMetadataSizeInBytes\\\":135,\\\"responseBodySizeInBytes\\\":87};\\r\\n + ResourceType: Collection, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, + Request URI: /dbs/cli000002/colls/cli000003, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '6544' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:13 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 404 + message: NotFound +- request: + body: '{"properties": {"resource": {"id": "cli000003", "indexingPolicy": {"automatic": + true, "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], "excludedPaths": + [{"path": "/headquarters/employees/?"}]}, "partitionKey": {"paths": ["/thePartitionKey"], + "kind": "Hash"}, "uniqueKeyPolicy": {"uniqueKeys": [{"paths": ["/path/to/key1"]}, + {"paths": ["/path/to/key2"]}]}, "conflictResolutionPolicy": {"mode": "lastWriterWins", + "conflictResolutionPath": "/path"}}, "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + Content-Length: + - '479' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n -p --unique-key-policy --conflict-resolution-policy --idx + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2a905d06-eb13-4b3d-9a97-6bdcb03036b5?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:14 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/2a905d06-eb13-4b3d-9a97-6bdcb03036b5?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p --unique-key-policy --conflict-resolution-policy --idx + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/2a905d06-eb13-4b3d-9a97-6bdcb03036b5?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container create + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n -p --unique-key-policy --conflict-resolution-policy --idx + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"X44HAKS-bUY=","_ts":1664436919,"_self":"dbs/X44HAA==/colls/X44HAKS-bUY=/","_etag":"\"0000b401-0000-0700-0000-63354ab70000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1223' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"X44HAKS-bUY=","_ts":1664436919,"_self":"dbs/X44HAA==/colls/X44HAKS-bUY=/","_etag":"\"0000b401-0000-0700-0000-63354ab70000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":0,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1223' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"X44HAKS-bUY=","_ts":1664436919,"_self":"dbs/X44HAA==/colls/X44HAKS-bUY=/","_etag":"\"0000b401-0000-0700-0000-63354ab70000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1122' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:35:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container exists + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"X44HAKS-bUY=","_ts":1664436919,"_self":"dbs/X44HAA==/colls/X44HAKS-bUY=/","_etag":"\"0000b401-0000-0700-0000-63354ab70000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":128,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1225' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:40:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ad166e64-3c81-4c45-a6fb-3c53d1c3fa22?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:40:47 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/ad166e64-3c81-4c45-a6fb-3c53d1c3fa22?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/ad166e64-3c81-4c45-a6fb-3c53d1c3fa22?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:18 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:18 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","properties":{"accountName":"cliradomcstrzqt","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:40:51Z","oldestRestorableTime":"2022-09-29T07:40:51Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"e2ff0f1d-8209-4d81-a72a-b6942e344110","creationTime":"2022-09-29T07:40:52Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","oldestRestorableTime":"2022-09-29T07:19:50Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8680b861-bef3-493d-9344-27f17b06b5e3","creationTime":"2022-09-29T07:19:51Z"}]}},{"name":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","properties":{"accountName":"cli5d7r5woval7l","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:41:00Z","oldestRestorableTime":"2022-09-29T07:41:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"10c6aaeb-9fdd-4de8-b7c0-d9c93ba73c47","creationTime":"2022-09-29T07:41:00Z"}]}},{"name":"9ea6fb52-a251-464b-aace-42338f28d639","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9ea6fb52-a251-464b-aace-42338f28d639","properties":{"accountName":"clijhukzjokpayf","apiType":"Sql","creationTime":"2022-09-29T07:39:00Z","oldestRestorableTime":"2022-09-29T07:39:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"84631b94-7800-414a-be43-353118e84b4b","creationTime":"2022-09-29T07:39:01Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","deletionTime":"2022-09-29T07:29:11Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"f895d646-7338-4417-a964-c374f9a113bb","creationTime":"2022-09-29T07:25:12Z","deletionTime":"2022-09-29T07:29:11Z"}]}},{"name":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2b7ef41c-de96-4d76-8959-58fb40b3f4fc","properties":{"accountName":"cli2nmd2acsdvq2","apiType":"MongoDB","creationTime":"2022-09-29T07:32:57Z","deletionTime":"2022-09-29T07:37:10Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[]}},{"name":"9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","properties":{"accountName":"cli000004","apiType":"Sql","creationTime":"2022-09-29T07:33:49Z","oldestRestorableTime":"2022-09-29T07:33:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87589c6d-f091-4778-9118-8b70c299f205","creationTime":"2022-09-29T07:33:50Z"}]}},{"name":"647fa227-e369-4b93-8c3d-e261644d2fcf","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/647fa227-e369-4b93-8c3d-e261644d2fcf","properties":{"accountName":"clisb32fuxaefpe","apiType":"Sql","creationTime":"2022-09-29T07:35:16Z","oldestRestorableTime":"2022-09-29T07:35:16Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"5671631f-5ced-4ca6-97e8-273fac7d09c4","creationTime":"2022-09-29T07:35:17Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","deletionTime":"2022-09-29T07:31:57Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z","deletionTime":"2022-09-29T07:31:57Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","deletionTime":"2022-09-29T07:33:27Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","deletionTime":"2022-09-29T07:37:12Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:41:20Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '73324' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:41:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000003", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9dad7ecd-c4a4-418d-8b1a-2b65f14917b7", + "restoreTimestampInUtc": "2022-09-29T07:35:44.881255Z"}, "createMode": "Restore"}, + "options": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + Content-Length: + - '352' + Content-Type: + - application/json + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/abec488a-77b7-451e-a0a7-e47b7eadfc85?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:22 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003/operationResults/abec488a-77b7-451e-a0a7-e47b7eadfc85?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/abec488a-77b7-451e-a0a7-e47b7eadfc85?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Failed","error":{"code":"BadRequest","message":"Partial + restore of shared throughput data is not allowed. Please perform restore operation + on a shared throughput database or a provisioned collection.\r\nActivityId: + 1a541091-3fca-11ed-a568-9c7bef4baa38, Microsoft.Azure.Documents.Common/2.14.0, + Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Documents.Common/2.14.0, + Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Documents.Common/2.14.0, + Microsoft.Azure.Documents.Common/2.14.0"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '511' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:53 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:53 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/bd38a6f3-29eb-4e68-bdb3-77e36df4c367?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:41:55 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/operationResults/bd38a6f3-29eb-4e68-bdb3-77e36df4c367?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/bd38a6f3-29eb-4e68-bdb3-77e36df4c367?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:42:25 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:42:26 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview + response: + body: + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","properties":{"accountName":"cliradomcstrzqt","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:40:51Z","oldestRestorableTime":"2022-09-29T07:40:51Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"e2ff0f1d-8209-4d81-a72a-b6942e344110","creationTime":"2022-09-29T07:40:52Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"572c38e5-5506-42c7-986f-2faf4e6b22e1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1","properties":{"accountName":"clintrakgcxza7v","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:45:52Z","oldestRestorableTime":"2022-09-29T07:45:52Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"4208e04d-fda7-42f0-b1b2-3b7e3769cde7","creationTime":"2022-09-29T07:45:53Z"}]}},{"name":"0f76ace0-a6ac-41cd-afab-254a9e03f04c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0f76ace0-a6ac-41cd-afab-254a9e03f04c","properties":{"accountName":"cli65wqr6zeh554","apiType":"Table, + Sql","creationTime":"2022-09-29T07:50:21Z","oldestRestorableTime":"2022-09-29T07:50:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7a1e5609-4c43-420b-ac67-0c8a5af933cb","creationTime":"2022-09-29T07:50:23Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","deletionTime":"2022-09-29T07:29:11Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"f895d646-7338-4417-a964-c374f9a113bb","creationTime":"2022-09-29T07:25:12Z","deletionTime":"2022-09-29T07:29:11Z"}]}},{"name":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2b7ef41c-de96-4d76-8959-58fb40b3f4fc","properties":{"accountName":"cli2nmd2acsdvq2","apiType":"MongoDB","creationTime":"2022-09-29T07:32:57Z","deletionTime":"2022-09-29T07:37:10Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cbc92c38-f75d-463c-a639-8a8ac4ed01c6","creationTime":"2022-09-29T07:32:58Z","deletionTime":"2022-09-29T07:37:10Z"}]}},{"name":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","properties":{"accountName":"cli5d7r5woval7l","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:41:00Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[]}},{"name":"9ea6fb52-a251-464b-aace-42338f28d639","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9ea6fb52-a251-464b-aace-42338f28d639","properties":{"accountName":"clijhukzjokpayf","apiType":"Sql","creationTime":"2022-09-29T07:39:00Z","deletionTime":"2022-09-29T07:43:07Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[]}},{"name":"844b164e-64e2-4fad-8594-095b10b18bbc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/844b164e-64e2-4fad-8594-095b10b18bbc","properties":{"accountName":"cli-continuous7-rypbpuzam","apiType":"Sql","creationTime":"2022-09-29T07:45:04Z","deletionTime":"2022-09-29T07:46:55Z","oldestRestorableTime":"2022-09-22T07:46:55Z","restorableLocations":[]}},{"name":"9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","properties":{"accountName":"cli000004","apiType":"Sql","creationTime":"2022-09-29T07:33:49Z","oldestRestorableTime":"2022-09-29T07:33:49Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87589c6d-f091-4778-9118-8b70c299f205","creationTime":"2022-09-29T07:33:50Z"}]}},{"name":"647fa227-e369-4b93-8c3d-e261644d2fcf","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/647fa227-e369-4b93-8c3d-e261644d2fcf","properties":{"accountName":"clisb32fuxaefpe","apiType":"Sql","creationTime":"2022-09-29T07:35:16Z","oldestRestorableTime":"2022-09-29T07:35:16Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"5671631f-5ced-4ca6-97e8-273fac7d09c4","creationTime":"2022-09-29T07:35:17Z"}]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","deletionTime":"2022-09-29T07:31:57Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z","deletionTime":"2022-09-29T07:31:57Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","deletionTime":"2022-09-29T07:33:27Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z","deletionTime":"2022-09-29T07:33:27Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","deletionTime":"2022-09-29T07:37:12Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z","deletionTime":"2022-09-29T07:37:12Z"}]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T07:50:47Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' + headers: + cache-control: + - no-cache + content-length: + - '75340' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 07:50:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"resource": {"id": "cli000002", "restoreParameters": {"restoreSource": + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9dad7ecd-c4a4-418d-8b1a-2b65f14917b7", + "restoreTimestampInUtc": "2022-09-29T07:35:44.881255Z"}, "createMode": "Restore"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + Content-Length: + - '337' + Content-Type: + - application/json + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:50:48 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/operationResults/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:51:18 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:51:48 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:52:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:52:49 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:53:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:53:49 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:54:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:54:49 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:55:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:55:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:56:20 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:56:49 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ed2db49-583d-464d-8c6a-6f1164aeb0bc?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database restore + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"X44HAA==","_self":"dbs/X44HAA==/","_etag":"\"0000c301-0000-0700-0000-63354f000000\"","_colls":"colls/","_users":"users/","_ts":1664438016}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '478' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:50 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database show + Connection: + - keep-alive + ParameterSetName: + - -g -a -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"X44HAA==","_self":"dbs/X44HAA==/","_etag":"\"0000c301-0000-0700-0000-63354f000000\"","_colls":"colls/","_users":"users/","_ts":1664438016}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '478' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:51 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container list + Connection: + - keep-alive + ParameterSetName: + - -g -a -d + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers?api-version=2022-08-15 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"X44HAKS-bUY=","_ts":1664438019,"_self":"dbs/X44HAA==/colls/X44HAKS-bUY=/","_etag":"\"0000c701-0000-0700-0000-63354f030000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/"}}}]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1122' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:52 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql container show + Connection: + - keep-alive + ParameterSetName: + - -g -a -d -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003?api-version=2022-08-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/containers/cli000003","type":"Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers","name":"cli000003","properties":{"resource":{"id":"cli000003","indexingPolicy":{"indexingMode":"consistent","automatic":true,"includedPaths":[{"path":"/*"}],"excludedPaths":[{"path":"/headquarters/employees/?"},{"path":"/\"_etag\"/?"}]},"partitionKey":{"paths":["/thePartitionKey"],"kind":"Hash"},"uniqueKeyPolicy":{"uniqueKeys":[{"paths":["/path/to/key1"]},{"paths":["/path/to/key2"]}]},"conflictResolutionPolicy":{"mode":"lastWriterWins","conflictResolutionPath":"/path","conflictResolutionProcedure":""},"backupPolicy":{"type":1},"geospatialConfig":{"type":"Geography"},"_rid":"X44HAKS-bUY=","_ts":1664438019,"_self":"dbs/X44HAA==/colls/X44HAKS-bUY=/","_etag":"\"0000c701-0000-0700-0000-63354f030000\"","_docs":"docs/","_sprocs":"sprocs/","_triggers":"triggers/","_udfs":"udfs/","_conflicts":"conflicts/","statistics":[{"id":"0","sizeInKB":128,"documentCount":0,"sampledDistinctPartitionKeyCount":0,"partitionKeys":[]}]}}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1225' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:52 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002?api-version=2022-08-15 + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/43a98c30-9cc1-4a7f-bb13-00abbed3448a?api-version=2022-08-15 + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:57:53 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases/cli000002/operationResults/43a98c30-9cc1-4a7f-bb13-00abbed3448a?api-version=2022-08-15 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database delete + Connection: + - keep-alive + ParameterSetName: + - -g -a -n --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/43a98c30-9cc1-4a7f-bb13-00abbed3448a?api-version=2022-08-15 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:23 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb sql database list + Connection: + - keep-alive + ParameterSetName: + - -g -a + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_sql_shared_database_restore000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/sqlDatabases?api-version=2022-08-15 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:58:24 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_account_restore_command.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_account_restore_command.yaml index 632fb404991..8f3ffd33ccf 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_account_restore_command.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_account_restore_command.yaml @@ -13,12 +13,13 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_table_account_restore_command000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001","name":"cli_test_cosmosdb_table_account_restore_command000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001","name":"cli_test_cosmosdb_table_account_restore_command000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T08:02:14Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -27,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:08 GMT + - Thu, 29 Sep 2022 08:02:18 GMT expires: - '-1' pragma: @@ -63,31 +64,31 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:12.8511798Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"cc49da31-13e1-4b9d-b177-bbceed113f0b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:02:21.451137Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"fe348596-7806-4215-9994-205ce4c61797","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:02:21.451137Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:02:21.451137Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:02:21.451137Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:02:21.451137Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1282c5d9-88e5-49cc-bb1b-c3e0948c0772?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/47577ea6-11b5-4932-b323-783e146996c6?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '1950' + - '2372' content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:13 GMT + - Thu, 29 Sep 2022 08:02:22 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/1282c5d9-88e5-49cc-bb1b-c3e0948c0772?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/47577ea6-11b5-4932-b323-783e146996c6?api-version=2022-08-15-preview pragma: - no-cache server: @@ -103,7 +104,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 200 message: Ok @@ -121,9 +122,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1282c5d9-88e5-49cc-bb1b-c3e0948c0772?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/47577ea6-11b5-4932-b323-783e146996c6?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -135,7 +136,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:44 GMT + - Thu, 29 Sep 2022 08:02:53 GMT pragma: - no-cache server: @@ -167,9 +168,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1282c5d9-88e5-49cc-bb1b-c3e0948c0772?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/47577ea6-11b5-4932-b323-783e146996c6?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -181,7 +182,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:14 GMT + - Thu, 29 Sep 2022 08:03:23 GMT pragma: - no-cache server: @@ -213,9 +214,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1282c5d9-88e5-49cc-bb1b-c3e0948c0772?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/47577ea6-11b5-4932-b323-783e146996c6?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -227,7 +228,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:45 GMT + - Thu, 29 Sep 2022 08:03:53 GMT pragma: - no-cache server: @@ -259,9 +260,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1282c5d9-88e5-49cc-bb1b-c3e0948c0772?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/47577ea6-11b5-4932-b323-783e146996c6?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -273,7 +274,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:14 GMT + - Thu, 29 Sep 2022 08:04:23 GMT pragma: - no-cache server: @@ -305,9 +306,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1282c5d9-88e5-49cc-bb1b-c3e0948c0772?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/47577ea6-11b5-4932-b323-783e146996c6?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -319,7 +320,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:44 GMT + - Thu, 29 Sep 2022 08:04:53 GMT pragma: - no-cache server: @@ -351,9 +352,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1282c5d9-88e5-49cc-bb1b-c3e0948c0772?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/47577ea6-11b5-4932-b323-783e146996c6?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -365,7 +366,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:15 GMT + - Thu, 29 Sep 2022 08:05:24 GMT pragma: - no-cache server: @@ -397,9 +398,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1282c5d9-88e5-49cc-bb1b-c3e0948c0772?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/47577ea6-11b5-4932-b323-783e146996c6?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -411,7 +412,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:45 GMT + - Thu, 29 Sep 2022 08:05:54 GMT pragma: - no-cache server: @@ -443,9 +444,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1282c5d9-88e5-49cc-bb1b-c3e0948c0772?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/47577ea6-11b5-4932-b323-783e146996c6?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -457,7 +458,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:15 GMT + - Thu, 29 Sep 2022 08:06:23 GMT pragma: - no-cache server: @@ -489,9 +490,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1282c5d9-88e5-49cc-bb1b-c3e0948c0772?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/47577ea6-11b5-4932-b323-783e146996c6?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -503,7 +504,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:45 GMT + - Thu, 29 Sep 2022 08:06:53 GMT pragma: - no-cache server: @@ -535,9 +536,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1282c5d9-88e5-49cc-bb1b-c3e0948c0772?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/47577ea6-11b5-4932-b323-783e146996c6?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -549,7 +550,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:15 GMT + - Thu, 29 Sep 2022 08:07:24 GMT pragma: - no-cache server: @@ -581,27 +582,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:42.8699227Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"cc49da31-13e1-4b9d-b177-bbceed113f0b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:06:25.3847269Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"fe348596-7806-4215-9994-205ce4c61797","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:06:25.3847269Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:06:25.3847269Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:06:25.3847269Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:06:25.3847269Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2316' + - '2743' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:15 GMT + - Thu, 29 Sep 2022 08:07:25 GMT pragma: - no-cache server: @@ -633,27 +634,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:42.8699227Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"cc49da31-13e1-4b9d-b177-bbceed113f0b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:06:25.3847269Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"fe348596-7806-4215-9994-205ce4c61797","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:06:25.3847269Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:06:25.3847269Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:06:25.3847269Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:06:25.3847269Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2316' + - '2743' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:16 GMT + - Thu, 29 Sep 2022 08:07:25 GMT pragma: - no-cache server: @@ -685,27 +686,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:42.8699227Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"cc49da31-13e1-4b9d-b177-bbceed113f0b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:06:25.3847269Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"fe348596-7806-4215-9994-205ce4c61797","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:06:25.3847269Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:06:25.3847269Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:06:25.3847269Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:06:25.3847269Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2316' + - '2743' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:17 GMT + - Thu, 29 Sep 2022 08:07:25 GMT pragma: - no-cache server: @@ -741,15 +742,15 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/4fa100ed-6914-4b19-8396-b2418f3ec885?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/9dc61a84-96c3-4eef-9068-d9a52f813f6a?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -757,9 +758,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:18 GMT + - Thu, 29 Sep 2022 08:07:27 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/operationResults/4fa100ed-6914-4b19-8396-b2418f3ec885?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/operationResults/9dc61a84-96c3-4eef-9068-d9a52f813f6a?api-version=2022-08-15 pragma: - no-cache server: @@ -771,7 +772,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 202 message: Accepted @@ -789,9 +790,9 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/4fa100ed-6914-4b19-8396-b2418f3ec885?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/9dc61a84-96c3-4eef-9068-d9a52f813f6a?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -803,7 +804,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:48 GMT + - Thu, 29 Sep 2022 08:07:57 GMT pragma: - no-cache server: @@ -835,12 +836,12 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"8mdBAP510gk=","_etag":"\"00000000-0000-0000-ccc3-459d700201d8\"","_ts":1663659206}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"orR2AO2d7o8=","_etag":"\"00000000-0000-0000-d3da-8884c80201d8\"","_ts":1664438855}}}' headers: cache-control: - no-store, no-cache @@ -849,7 +850,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:49 GMT + - Thu, 29 Sep 2022 08:07:58 GMT pragma: - no-cache server: @@ -881,15 +882,15 @@ interactions: ParameterSetName: - --location --instance-id User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cc49da31-13e1-4b9d-b177-bbceed113f0b?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fe348596-7806-4215-9994-205ce4c61797?api-version=2022-08-15-preview response: body: - string: '{"name":"cc49da31-13e1-4b9d-b177-bbceed113f0b","location":"East US - 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cc49da31-13e1-4b9d-b177-bbceed113f0b","properties":{"accountName":"cli000003","apiType":"Table, - Sql","creationTime":"2022-09-20T07:32:43Z","oldestRestorableTime":"2022-09-20T07:32:43Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"63d889ca-4256-4cf2-93a8-e630f6d27edc","creationTime":"2022-09-20T07:32:45Z"}]}}' + string: '{"name":"fe348596-7806-4215-9994-205ce4c61797","location":"East US + 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fe348596-7806-4215-9994-205ce4c61797","properties":{"accountName":"cli000003","apiType":"Table, + Sql","creationTime":"2022-09-29T08:06:26Z","oldestRestorableTime":"2022-09-29T08:06:26Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"63b4d322-5207-42d1-acee-307e4e082926","creationTime":"2022-09-29T08:06:27Z"}]}}' headers: cache-control: - no-store, no-cache @@ -898,7 +899,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:49 GMT + - Thu, 29 Sep 2022 08:07:59 GMT pragma: - no-cache server: @@ -930,143 +931,286 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview response: body: - string: '{"value":[{"name":"257c9845-9c76-4e02-b6aa-c45df6d74351","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/257c9845-9c76-4e02-b6aa-c45df6d74351","properties":{"accountName":"cliqwlgknilbfow","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:57:56Z","oldestRestorableTime":"2022-09-20T06:57:56Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"00e3cba5-bdef-4dd4-96d4-c184fb94784f","creationTime":"2022-09-20T06:57:58Z"}]}},{"name":"d26ff24f-5217-4b0c-b52b-a6326be32c87","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/d26ff24f-5217-4b0c-b52b-a6326be32c87","properties":{"accountName":"clirie7hraznup4","apiType":"Table, - Sql","creationTime":"2022-09-20T06:58:00Z","oldestRestorableTime":"2022-09-20T06:58:00Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"43a328e8-5ccc-497d-a356-4ee4d7e306e2","creationTime":"2022-09-20T06:58:01Z"}]}},{"name":"e039d441-9698-42ba-8471-f78728e3932f","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e039d441-9698-42ba-8471-f78728e3932f","properties":{"accountName":"clixsligrhnkthm","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:07:36Z","oldestRestorableTime":"2022-09-20T07:07:36Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"b3d364b8-b3a2-428f-988a-27bb4cf0c112","creationTime":"2022-09-20T07:07:37Z"}]}},{"name":"6cbb9e3c-1fa3-4d80-85e5-6131c42811fb","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/6cbb9e3c-1fa3-4d80-85e5-6131c42811fb","properties":{"accountName":"cli2jvorduabbs6","apiType":"Table, - Sql","creationTime":"2022-09-20T07:07:41Z","oldestRestorableTime":"2022-09-20T07:07:41Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"fc8a971e-ad61-47a9-a731-4e706e0ec024","creationTime":"2022-09-20T07:07:42Z"}]}},{"name":"de173432-0f17-4f34-bbcf-111200be4f1a","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/de173432-0f17-4f34-bbcf-111200be4f1a","properties":{"accountName":"climaslmt6clahf","apiType":"Table, - Sql","creationTime":"2022-09-20T07:26:46Z","oldestRestorableTime":"2022-09-20T07:26:46Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"a6203059-530c-4847-b8dd-be2b45aadf6c","creationTime":"2022-09-20T07:26:46Z"}]}},{"name":"dfb7ab5f-d103-4498-bab0-d77e2cbbe6da","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/dfb7ab5f-d103-4498-bab0-d77e2cbbe6da","properties":{"accountName":"clihhselzsgnxci","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:26:51Z","oldestRestorableTime":"2022-09-20T07:26:51Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"6696a646-0dd5-4419-ae9e-45d0921194f7","creationTime":"2022-09-20T07:26:51Z"}]}},{"name":"e175b9a1-eeae-4331-b509-8516a500995b","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e175b9a1-eeae-4331-b509-8516a500995b","properties":{"accountName":"clia4wonnytzxku","apiType":"Table, - Sql","creationTime":"2022-09-20T07:31:06Z","oldestRestorableTime":"2022-09-20T07:31:06Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"d64e8aa5-4fae-4784-a1e8-798868eee115","creationTime":"2022-09-20T07:31:07Z"}]}},{"name":"2b567c10-cb59-41b3-b522-341b45e961fd","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/2b567c10-cb59-41b3-b522-341b45e961fd","properties":{"accountName":"cli2bdyu5ikmib7","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:31:04Z","oldestRestorableTime":"2022-09-20T07:31:04Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"63270364-1197-4702-90bd-505cd5a9c39f","creationTime":"2022-09-20T07:31:05Z"}]}},{"name":"5d4c9410-0368-4540-a6d6-2acf346d055e","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/5d4c9410-0368-4540-a6d6-2acf346d055e","properties":{"accountName":"cli4xpfpmginjkx","apiType":"MongoDB","creationTime":"2022-09-20T06:58:53Z","oldestRestorableTime":"2022-09-20T06:58:53Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"364d03ae-5e1d-4028-9d7a-899e95e3390e","creationTime":"2022-09-20T06:58:54Z"}]}},{"name":"71e6d92e-64f7-4026-9239-68fb622c1cbd","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/71e6d92e-64f7-4026-9239-68fb622c1cbd","properties":{"accountName":"cliwuke4f7ez2bm","apiType":"Table, - Sql","creationTime":"2022-09-20T06:58:51Z","oldestRestorableTime":"2022-09-20T06:58:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"869e7338-783e-4277-8d0e-0a7257853ddc","creationTime":"2022-09-20T06:58:52Z"}]}},{"name":"508132ae-8315-4f07-8c38-8806a39dfe3b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/508132ae-8315-4f07-8c38-8806a39dfe3b","properties":{"accountName":"cliatg4hovhsjun","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:58:48Z","oldestRestorableTime":"2022-09-20T06:58:48Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"03886ad8-258b-4c22-ba99-956418af8c52","creationTime":"2022-09-20T06:58:50Z"}]}},{"name":"b9b05fe1-ff67-415a-9a47-9f7c814506c0","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9b05fe1-ff67-415a-9a47-9f7c814506c0","properties":{"accountName":"cligz5iirsuhy54","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:58:34Z","oldestRestorableTime":"2022-09-20T06:58:34Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"d98d0aed-ba88-4df6-960c-48323e132a1d","creationTime":"2022-09-20T06:58:35Z"}]}},{"name":"a57e21c5-4307-47aa-a67b-708e2cf5e045","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a57e21c5-4307-47aa-a67b-708e2cf5e045","properties":{"accountName":"clijexpfpgj4xel","apiType":"Table, - Sql","creationTime":"2022-09-20T06:59:25Z","oldestRestorableTime":"2022-09-20T06:59:25Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"806c35f4-94df-432a-aa5f-9eca0ab47262","creationTime":"2022-09-20T06:59:26Z"}]}},{"name":"7ecee14c-acd0-4d2d-9227-1a9cca60f606","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7ecee14c-acd0-4d2d-9227-1a9cca60f606","properties":{"accountName":"cliqwbd7wrqol4u","apiType":"Table, - Sql","creationTime":"2022-09-20T06:59:23Z","oldestRestorableTime":"2022-09-20T06:59:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"87b06295-42cb-4aa9-a639-8f52d4412111","creationTime":"2022-09-20T06:59:24Z"}]}},{"name":"5ed10bbe-201a-4cfa-b188-08964e31a970","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/5ed10bbe-201a-4cfa-b188-08964e31a970","properties":{"accountName":"clite3mysf2h7oc","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:59:24Z","oldestRestorableTime":"2022-09-20T06:59:24Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"096e5485-f140-4786-96b9-263670bf610d","creationTime":"2022-09-20T06:59:25Z"}]}},{"name":"faddd26c-1aea-4e26-bc85-ef2851e5b1ad","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/faddd26c-1aea-4e26-bc85-ef2851e5b1ad","properties":{"accountName":"cliiwxv2f7jtutq","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:32Z","oldestRestorableTime":"2022-09-20T07:09:32Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"e93ba2dd-f14e-4eeb-8607-59a65c670a8d","creationTime":"2022-09-20T07:09:34Z"}]}},{"name":"4bf354b5-2cc6-4362-b72d-06b810e007b8","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bf354b5-2cc6-4362-b72d-06b810e007b8","properties":{"accountName":"clidszljdbpajb2","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:09:31Z","oldestRestorableTime":"2022-09-20T07:09:31Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"50942b9d-b33b-4497-86af-aebdfa536490","creationTime":"2022-09-20T07:09:33Z"}]}},{"name":"c1a89bca-1680-44c9-8368-57fab7d3ce9f","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c1a89bca-1680-44c9-8368-57fab7d3ce9f","properties":{"accountName":"cli-periodic-cljpeqrfavoc","apiType":"Sql","creationTime":"2022-09-20T07:25:27Z","oldestRestorableTime":"2022-09-20T07:25:27Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"4c07c0cc-973d-4b4a-9d66-ae2d2fa9dd94","creationTime":"2022-09-20T07:25:27Z"}]}},{"name":"bd23a72e-8c62-47c7-bd05-1ccd468ee3ad","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/bd23a72e-8c62-47c7-bd05-1ccd468ee3ad","properties":{"accountName":"clih4tsxxvdyqam","apiType":"Table, - Sql","creationTime":"2022-09-20T07:29:02Z","oldestRestorableTime":"2022-09-20T07:29:02Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"6b63f457-fcca-425f-982d-30af45f213d3","creationTime":"2022-09-20T07:29:02Z"}]}},{"name":"a6a2dbf4-3fd8-473b-9102-c2ead58486d1","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a6a2dbf4-3fd8-473b-9102-c2ead58486d1","properties":{"accountName":"clinlw2brcr45fg","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:30:02Z","oldestRestorableTime":"2022-09-20T07:30:02Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"26aa104a-a6bc-4705-856e-8029bb9567f8","creationTime":"2022-09-20T07:30:02Z"}]}},{"name":"cc49da31-13e1-4b9d-b177-bbceed113f0b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cc49da31-13e1-4b9d-b177-bbceed113f0b","properties":{"accountName":"cli000003","apiType":"Table, - Sql","creationTime":"2022-09-20T07:32:43Z","oldestRestorableTime":"2022-09-20T07:32:43Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"63d889ca-4256-4cf2-93a8-e630f6d27edc","creationTime":"2022-09-20T07:32:45Z"}]}},{"name":"72889734-c93c-4f7f-bd22-b0b46266d705","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/72889734-c93c-4f7f-bd22-b0b46266d705","properties":{"accountName":"clipylc4ofzmakx","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:32:40Z","oldestRestorableTime":"2022-09-20T07:32:40Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"4f0ede2e-9047-46c7-ac56-3e63045fa9fb","creationTime":"2022-09-20T07:32:41Z"}]}},{"name":"9cba50f9-b777-4e28-a639-d1f2cc46a2cb","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9cba50f9-b777-4e28-a639-d1f2cc46a2cb","properties":{"accountName":"cli-continuous30-bcltzefu","apiType":"Sql","creationTime":"2022-09-20T06:56:35Z","deletionTime":"2022-09-20T06:58:55Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"b1086a3e-d45d-472c-903a-099339e66ff4","creationTime":"2022-09-20T06:56:36Z","deletionTime":"2022-09-20T06:58:55Z"}]}},{"name":"71ad3372-2c99-46e7-999b-d029cafcde99","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/71ad3372-2c99-46e7-999b-d029cafcde99","properties":{"accountName":"cliqg2buoohhxib","apiType":"Sql","creationTime":"2022-09-20T06:56:47Z","deletionTime":"2022-09-20T07:01:37Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c2acb6ce-146b-4d7e-97b5-309e0d0ba031","creationTime":"2022-09-20T06:56:48Z","deletionTime":"2022-09-20T07:01:37Z"}]}},{"name":"0d5a1375-7285-42a7-a4c8-e30c0fc346ab","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d5a1375-7285-42a7-a4c8-e30c0fc346ab","properties":{"accountName":"cli-continuous7-65osau3nh","apiType":"Sql","creationTime":"2022-09-20T07:06:15Z","deletionTime":"2022-09-20T07:08:17Z","oldestRestorableTime":"2022-09-13T07:08:17Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"871c9ba5-22c7-4c12-9861-b39d3ec2c2e0","creationTime":"2022-09-20T07:06:16Z","deletionTime":"2022-09-20T07:08:17Z"}]}},{"name":"95d6104d-75c6-46dd-8ec6-f694477bc0d6","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/95d6104d-75c6-46dd-8ec6-f694477bc0d6","properties":{"accountName":"cli-continuous30-w3te74xk","apiType":"Sql","creationTime":"2022-09-20T07:06:17Z","deletionTime":"2022-09-20T07:08:26Z","oldestRestorableTime":"2022-09-13T07:08:26Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"7338fe3b-59c9-4171-a1b1-b7422e8d8afe","creationTime":"2022-09-20T07:06:18Z","deletionTime":"2022-09-20T07:08:26Z"}]}},{"name":"508d74a3-1d19-4142-9dd6-571d66a87c41","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/508d74a3-1d19-4142-9dd6-571d66a87c41","properties":{"accountName":"cli-continuous7-7v6xqmb63","apiType":"Sql","creationTime":"2022-09-20T07:06:22Z","deletionTime":"2022-09-20T07:09:32Z","oldestRestorableTime":"2022-09-13T07:07:19Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"457b2138-f06d-4638-82b6-1073189f628b","creationTime":"2022-09-20T07:06:23Z","deletionTime":"2022-09-20T07:09:32Z"}]}},{"name":"cfe3d7a7-45bc-4877-8472-736864c9b5f9","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cfe3d7a7-45bc-4877-8472-736864c9b5f9","properties":{"accountName":"clixilzxjjied4f","apiType":"Sql","creationTime":"2022-09-20T07:06:47Z","deletionTime":"2022-09-20T07:10:46Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"ba2dc9f5-269e-4ab0-a11c-4b9e688e2303","creationTime":"2022-09-20T07:06:48Z","deletionTime":"2022-09-20T07:10:46Z"}]}},{"name":"2690cc86-3796-4d1c-899a-ea2de74efa34","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2690cc86-3796-4d1c-899a-ea2de74efa34","properties":{"accountName":"cligfkup2qadxbs","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:08:17Z","deletionTime":"2022-09-20T07:12:28Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"f937c85d-0ebb-4356-b183-81995a031870","creationTime":"2022-09-20T07:08:18Z","deletionTime":"2022-09-20T07:12:28Z"}]}},{"name":"d907fff6-bfe7-439b-b0fe-0cda508ce935","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d907fff6-bfe7-439b-b0fe-0cda508ce935","properties":{"accountName":"cli46ku46eatxsg","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:08:23Z","deletionTime":"2022-09-20T07:12:49Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c7591c48-2839-4179-b387-11a03dc21faa","creationTime":"2022-09-20T07:08:24Z","deletionTime":"2022-09-20T07:12:49Z"}]}},{"name":"00f9d479-167f-46a7-9617-da1cd54ffa64","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/00f9d479-167f-46a7-9617-da1cd54ffa64","properties":{"accountName":"clinrcj6fzstkit","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:28Z","deletionTime":"2022-09-20T07:13:47Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"3e3add00-cae4-46f3-8806-2955fae16d7b","creationTime":"2022-09-20T07:09:29Z","deletionTime":"2022-09-20T07:13:47Z"}]}},{"name":"faf3657c-1a01-4ac5-9525-e70acbef0e71","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/faf3657c-1a01-4ac5-9525-e70acbef0e71","properties":{"accountName":"clibbwbehryuf3y","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:32Z","deletionTime":"2022-09-20T07:14:19Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"cf5da2c0-4bf1-4e8b-8133-bbc845bc811d","creationTime":"2022-09-20T07:09:33Z","deletionTime":"2022-09-20T07:14:19Z"}]}},{"name":"64521b27-67b5-45fa-85d1-d2be34e4130a","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/64521b27-67b5-45fa-85d1-d2be34e4130a","properties":{"accountName":"clizng4ucknrzlj","apiType":"MongoDB","creationTime":"2022-09-20T07:09:26Z","deletionTime":"2022-09-20T07:14:48Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"92e08db9-45a8-44bd-8170-de3b8fc8210e","creationTime":"2022-09-20T07:09:27Z","deletionTime":"2022-09-20T07:14:48Z"}]}},{"name":"604b862e-8311-4252-84ec-94dc06e4adcc","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/604b862e-8311-4252-84ec-94dc06e4adcc","properties":{"accountName":"cli-continuous30-pq5j3zii","apiType":"Sql","creationTime":"2022-09-20T07:29:51Z","deletionTime":"2022-09-20T07:31:46Z","oldestRestorableTime":"2022-09-13T07:31:46Z","restorableLocations":[]}},{"name":"d9b2cd74-5d52-4332-b8cf-63763160af03","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d9b2cd74-5d52-4332-b8cf-63763160af03","properties":{"accountName":"cli-continuous7-3kpcqslhp","apiType":"Sql","creationTime":"2022-09-20T07:29:50Z","deletionTime":"2022-09-20T07:31:46Z","oldestRestorableTime":"2022-09-13T07:31:46Z","restorableLocations":[]}},{"name":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ffdc6000-b5a4-4280-8914-7358f7c59e9b","properties":{"accountName":"cli-continuous7-p6aq45s3u","apiType":"Sql","creationTime":"2022-09-20T07:30:25Z","deletionTime":"2022-09-20T07:33:16Z","oldestRestorableTime":"2022-09-13T07:31:26Z","restorableLocations":[]}},{"name":"08925518-7cca-41f1-881c-6b404c728f04","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/08925518-7cca-41f1-881c-6b404c728f04","properties":{"accountName":"cliimny6cecr4ww","apiType":"Sql","creationTime":"2022-09-20T07:30:18Z","deletionTime":"2022-09-20T07:35:19Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[]}},{"name":"2ecfd574-0338-4282-88ff-de2010f3c8b2","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2ecfd574-0338-4282-88ff-de2010f3c8b2","properties":{"accountName":"clifcwdniaybty3","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:31:51Z","deletionTime":"2022-09-20T07:36:18Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[]}},{"name":"2460855a-64f3-47f5-9476-09649a4fd15e","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2460855a-64f3-47f5-9476-09649a4fd15e","properties":{"accountName":"cli2lj5fugnlbl3","apiType":"Table, - Sql","creationTime":"2022-09-20T07:32:42Z","deletionTime":"2022-09-20T07:37:15Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[]}},{"name":"48538dd2-2769-40d9-9526-264e0a0e1dfc","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/48538dd2-2769-40d9-9526-264e0a0e1dfc","properties":{"accountName":"cliaeedca2ldu4t","apiType":"Table, - Sql","creationTime":"2022-09-20T07:32:46Z","deletionTime":"2022-09-20T07:37:19Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[]}},{"name":"63c04b24-248b-4f84-8f63-c89f8bf790e7","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/63c04b24-248b-4f84-8f63-c89f8bf790e7","properties":{"accountName":"clisao7xt2hqbu4","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:32:37Z","deletionTime":"2022-09-20T07:37:22Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[]}},{"name":"cb60e313-4fce-4827-8b88-7b229922ba3f","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/cb60e313-4fce-4827-8b88-7b229922ba3f","properties":{"accountName":"clibfdc7nvbjcss","apiType":"MongoDB","creationTime":"2022-09-16T07:05:49Z","deletionTime":"2022-09-16T08:02:20Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"fab58a28-536e-490e-8057-e4fcbb2ce2fe","creationTime":"2022-09-16T07:05:50Z","deletionTime":"2022-09-16T08:02:20Z"}]}},{"name":"313977bf-0600-490f-bd43-cf3dbcc8acd6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/313977bf-0600-490f-bd43-cf3dbcc8acd6","properties":{"accountName":"clidu42bussweh4","apiType":"Sql","creationTime":"2022-09-16T07:03:41Z","deletionTime":"2022-09-16T22:33:00Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"bf443477-3631-4fc8-b2cf-39443b29b7fd","creationTime":"2022-09-16T07:03:43Z","deletionTime":"2022-09-16T22:33:00Z"}]}},{"name":"410ae43b-5529-4a01-ab04-ababa3b66da6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/410ae43b-5529-4a01-ab04-ababa3b66da6","properties":{"accountName":"clik5k4my5jiscc","apiType":"MongoDB","creationTime":"2022-09-16T07:05:48Z","deletionTime":"2022-09-16T22:33:01Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"3aecbccf-b953-4e18-b621-5354abb3023b","creationTime":"2022-09-16T07:05:50Z","deletionTime":"2022-09-16T22:33:01Z"}]}},{"name":"dbd5f878-e6fb-43b8-95e6-71e23c56ff2d","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dbd5f878-e6fb-43b8-95e6-71e23c56ff2d","properties":{"accountName":"dbaccount-7193","apiType":"Sql","creationTime":"2022-09-16T22:45:23Z","deletionTime":"2022-09-16T22:50:21Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"1e39a514-1472-475d-a9c8-c95f8fbc6083","creationTime":"2022-09-16T22:45:24Z","deletionTime":"2022-09-16T22:50:21Z"}]}},{"name":"8f992221-1433-4ae8-af34-c4c0e8b8be2a","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8f992221-1433-4ae8-af34-c4c0e8b8be2a","properties":{"accountName":"r-database-account-2123","apiType":"Sql","creationTime":"2022-09-16T22:54:15Z","deletionTime":"2022-09-16T22:55:13Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"13c00146-4006-4fd9-96bc-9db4a62ef07c","creationTime":"2022-09-16T22:54:16Z","deletionTime":"2022-09-16T22:55:13Z"}]}},{"name":"00e030b5-e4e6-4d1b-9fc1-92c4275ed52d","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/00e030b5-e4e6-4d1b-9fc1-92c4275ed52d","properties":{"accountName":"r-database-account-5280","apiType":"Sql","creationTime":"2022-09-16T23:05:11Z","deletionTime":"2022-09-16T23:06:10Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"063bae49-12e5-47f6-af4e-776ec0a5c368","creationTime":"2022-09-16T23:05:12Z","deletionTime":"2022-09-16T23:06:10Z"}]}},{"name":"b6ca1cd6-dad7-477d-93cb-90da1b86ff92","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ca1cd6-dad7-477d-93cb-90da1b86ff92","properties":{"accountName":"dbaccount-3711","apiType":"Sql","creationTime":"2022-09-16T23:16:39Z","deletionTime":"2022-09-16T23:21:31Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"74ac4413-8d2e-4e8a-baf3-9c2a5dfe7841","creationTime":"2022-09-16T23:16:40Z","deletionTime":"2022-09-16T23:21:31Z"}]}},{"name":"40638959-6393-4738-b2ef-7134c4f1b876","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/40638959-6393-4738-b2ef-7134c4f1b876","properties":{"accountName":"cliswrqd5krl5dz","apiType":"MongoDB","creationTime":"2022-09-19T07:07:09Z","deletionTime":"2022-09-19T08:13:36Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"cf381911-15ec-4bb9-befd-fcb968b79eb4","creationTime":"2022-09-19T07:07:10Z","deletionTime":"2022-09-19T08:13:36Z"}]}},{"name":"f31abfdd-f69b-4567-9b35-2cd0e82c54e6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f31abfdd-f69b-4567-9b35-2cd0e82c54e6","properties":{"accountName":"cli5avgifijfvao","apiType":"Sql","creationTime":"2022-09-19T07:05:33Z","deletionTime":"2022-09-19T08:13:38Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"571e5d29-d8d7-424a-8831-f03772fb3ba8","creationTime":"2022-09-19T07:05:34Z","deletionTime":"2022-09-19T08:13:38Z"}]}},{"name":"baa0e3fb-6014-44c3-b538-e233f9f21123","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/baa0e3fb-6014-44c3-b538-e233f9f21123","properties":{"accountName":"clifuwxyu6vqzpa","apiType":"MongoDB","creationTime":"2022-09-19T07:07:00Z","deletionTime":"2022-09-19T08:13:39Z","oldestRestorableTime":"2022-08-21T07:37:51Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"f219b5af-9d61-4c53-a33e-c6e9a06107eb","creationTime":"2022-09-19T07:07:01Z","deletionTime":"2022-09-19T08:13:39Z"}]}}]}' + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"ecfda59b-6fbf-43b3-88f7-16be1dce21bc","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/ecfda59b-6fbf-43b3-88f7-16be1dce21bc","properties":{"accountName":"clizd2lyues2lg2","apiType":"Table, + Sql","creationTime":"2022-09-29T08:08:59Z","oldestRestorableTime":"2022-09-29T08:08:59Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d8f9d11d-9b3a-4871-8327-1540bd77d2b7","creationTime":"2022-09-29T08:08:59Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","properties":{"accountName":"cliradomcstrzqt","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:40:51Z","deletionTime":"2022-09-29T08:02:39Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[]}},{"name":"271af5eb-8274-4c30-b6c8-6674e1de772c","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/271af5eb-8274-4c30-b6c8-6674e1de772c","properties":{"accountName":"clios2vz3c67xbm","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T08:01:54Z","deletionTime":"2022-09-29T08:02:41Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[]}},{"name":"fe348596-7806-4215-9994-205ce4c61797","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fe348596-7806-4215-9994-205ce4c61797","properties":{"accountName":"cli000003","apiType":"Table, + Sql","creationTime":"2022-09-29T08:06:26Z","oldestRestorableTime":"2022-09-29T08:06:26Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"63b4d322-5207-42d1-acee-307e4e082926","creationTime":"2022-09-29T08:06:27Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","deletionTime":"2022-09-29T07:29:11Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"f895d646-7338-4417-a964-c374f9a113bb","creationTime":"2022-09-29T07:25:12Z","deletionTime":"2022-09-29T07:29:11Z"}]}},{"name":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2b7ef41c-de96-4d76-8959-58fb40b3f4fc","properties":{"accountName":"cli2nmd2acsdvq2","apiType":"MongoDB","creationTime":"2022-09-29T07:32:57Z","deletionTime":"2022-09-29T07:37:10Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cbc92c38-f75d-463c-a639-8a8ac4ed01c6","creationTime":"2022-09-29T07:32:58Z","deletionTime":"2022-09-29T07:37:10Z"}]}},{"name":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","properties":{"accountName":"cli5d7r5woval7l","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:41:00Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"10c6aaeb-9fdd-4de8-b7c0-d9c93ba73c47","creationTime":"2022-09-29T07:41:00Z","deletionTime":"2022-09-29T07:41:54Z"}]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8680b861-bef3-493d-9344-27f17b06b5e3","creationTime":"2022-09-29T07:19:51Z","deletionTime":"2022-09-29T07:41:54Z"}]}},{"name":"9ea6fb52-a251-464b-aace-42338f28d639","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9ea6fb52-a251-464b-aace-42338f28d639","properties":{"accountName":"clijhukzjokpayf","apiType":"Sql","creationTime":"2022-09-29T07:39:00Z","deletionTime":"2022-09-29T07:43:07Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"84631b94-7800-414a-be43-353118e84b4b","creationTime":"2022-09-29T07:39:01Z","deletionTime":"2022-09-29T07:43:07Z"}]}},{"name":"844b164e-64e2-4fad-8594-095b10b18bbc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/844b164e-64e2-4fad-8594-095b10b18bbc","properties":{"accountName":"cli-continuous7-rypbpuzam","apiType":"Sql","creationTime":"2022-09-29T07:45:04Z","deletionTime":"2022-09-29T07:46:55Z","oldestRestorableTime":"2022-09-22T07:46:55Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"71c587ae-6da8-453d-8865-a48d24fe21a9","creationTime":"2022-09-29T07:45:06Z","deletionTime":"2022-09-29T07:46:55Z"}]}},{"name":"572c38e5-5506-42c7-986f-2faf4e6b22e1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1","properties":{"accountName":"clintrakgcxza7v","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:45:52Z","deletionTime":"2022-09-29T07:51:21Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"4208e04d-fda7-42f0-b1b2-3b7e3769cde7","creationTime":"2022-09-29T07:45:53Z","deletionTime":"2022-09-29T07:51:21Z"}]}},{"name":"0f76ace0-a6ac-41cd-afab-254a9e03f04c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0f76ace0-a6ac-41cd-afab-254a9e03f04c","properties":{"accountName":"cli65wqr6zeh554","apiType":"Table, + Sql","creationTime":"2022-09-29T07:50:21Z","deletionTime":"2022-09-29T07:55:12Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7a1e5609-4c43-420b-ac67-0c8a5af933cb","creationTime":"2022-09-29T07:50:23Z","deletionTime":"2022-09-29T07:55:12Z"}]}},{"name":"443a5cfb-d99b-4128-b2e4-6f34c7aa9e93","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/443a5cfb-d99b-4128-b2e4-6f34c7aa9e93","properties":{"accountName":"cli2xh3uatq2hqo","apiType":"Table, + Sql","creationTime":"2022-09-29T07:53:53Z","deletionTime":"2022-09-29T07:57:15Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c7653c0c-acf7-455a-93a7-303966fc571e","creationTime":"2022-09-29T07:53:54Z","deletionTime":"2022-09-29T07:57:15Z"}]}},{"name":"06fb5229-145a-492c-aff7-e33709cc2157","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/06fb5229-145a-492c-aff7-e33709cc2157","properties":{"accountName":"cli-continuous30-bnfya55h","apiType":"Sql","creationTime":"2022-09-29T08:00:30Z","deletionTime":"2022-09-29T08:03:05Z","oldestRestorableTime":"2022-09-22T08:03:05Z","restorableLocations":[]}},{"name":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c6db33d1-5809-4dd0-b4bb-3821107c16e9","properties":{"accountName":"cli-periodic-pslgebnyz6df","apiType":"Sql","creationTime":"2022-09-29T08:04:14Z","deletionTime":"2022-09-29T08:07:05Z","oldestRestorableTime":"2022-09-29T08:04:14Z","restorableLocations":[]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","deletionTime":"2022-09-29T07:31:57Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z","deletionTime":"2022-09-29T07:31:57Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","deletionTime":"2022-09-29T07:33:27Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z","deletionTime":"2022-09-29T07:33:27Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","deletionTime":"2022-09-29T07:37:12Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z","deletionTime":"2022-09-29T07:37:12Z"}]}},{"name":"9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","properties":{"accountName":"cliabmdaxkqpzo7","apiType":"Sql","creationTime":"2022-09-29T07:33:49Z","deletionTime":"2022-09-29T07:58:50Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87589c6d-f091-4778-9118-8b70c299f205","creationTime":"2022-09-29T07:33:50Z","deletionTime":"2022-09-29T07:58:50Z"}]}},{"name":"647fa227-e369-4b93-8c3d-e261644d2fcf","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/647fa227-e369-4b93-8c3d-e261644d2fcf","properties":{"accountName":"clisb32fuxaefpe","apiType":"Sql","creationTime":"2022-09-29T07:35:16Z","deletionTime":"2022-09-29T08:07:45Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T08:12:00Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' headers: cache-control: - no-cache content-length: - - '32842' + - '79635' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:37:51 GMT + - Thu, 29 Sep 2022 08:12:00 GMT expires: - '-1' pragma: @@ -1116,7 +1260,6 @@ interactions: - '' - '' - '' - - '' status: code: 200 message: OK @@ -1134,21 +1277,21 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/East%20US%202/restorableDatabaseAccounts/cc49da31-13e1-4b9d-b177-bbceed113f0b/restorableTableResources?api-version=2022-02-15-preview&restoreLocation=eastus2&restoreTimestampInUtc=2022-09-20%2007%3A36%3A43%2B00%3A00 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/East%20US%202/restorableDatabaseAccounts/fe348596-7806-4215-9994-205ce4c61797/restorableTableResources?api-version=2022-08-15-preview&restoreLocation=eastus2&restoreTimestampInUtc=2022-09-29%2008%3A10%3A26%2B00%3A00 response: body: - string: '{"value":["cli000002"]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/East%20US%202/restorableDatabaseAccounts/fe348596-7806-4215-9994-205ce4c61797/restorableTableResources/cli000002","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTableResources","name":"cli000002"}]}' headers: cache-control: - no-store, no-cache content-length: - - '23' + - '337' content-type: - application/json date: - - Tue, 20 Sep 2022 07:37:52 GMT + - Thu, 29 Sep 2022 08:12:02 GMT pragma: - no-cache server: @@ -1170,8 +1313,8 @@ interactions: body: '{"location": "East US 2", "kind": "GlobalDocumentDB", "properties": {"locations": [{"locationName": "eastus2", "failoverPriority": 0}], "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Restore", "restoreParameters": - {"restoreMode": "PointInTime", "restoreSource": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cc49da31-13e1-4b9d-b177-bbceed113f0b", - "restoreTimestampInUtc": "2022-09-20T07:36:43.000Z"}}}' + {"restoreSource": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fe348596-7806-4215-9994-205ce4c61797", + "restoreTimestampInUtc": "2022-09-29T08:10:26.000Z", "restoreMode": "PointInTime"}}}' headers: Accept: - application/json @@ -1188,31 +1331,31 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:37:55.2288362Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"6a4f0c49-a796-421b-9ecd-49b1aa61560a","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:12:03.8343715Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"621b3a83-57e0-4a2b-b036-97d9f710f5c6","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cc49da31-13e1-4b9d-b177-bbceed113f0b","restoreTimestampInUtc":"2022-09-20T07:36:43Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fe348596-7806-4215-9994-205ce4c61797","restoreTimestampInUtc":"2022-09-29T08:10:26Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:12:03.8343715Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:12:03.8343715Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:12:03.8343715Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:12:03.8343715Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '2481' + - '2888' content-type: - application/json date: - - Tue, 20 Sep 2022 07:37:57 GMT + - Thu, 29 Sep 2022 08:12:05 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview pragma: - no-cache server: @@ -1246,9 +1389,55 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:12:35 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb restore + Connection: + - keep-alive + ParameterSetName: + - -n -g -a --restore-timestamp --location + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1260,7 +1449,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:38:27 GMT + - Thu, 29 Sep 2022 08:13:05 GMT pragma: - no-cache server: @@ -1292,9 +1481,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1306,7 +1495,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:38:57 GMT + - Thu, 29 Sep 2022 08:13:35 GMT pragma: - no-cache server: @@ -1338,9 +1527,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1352,7 +1541,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:39:27 GMT + - Thu, 29 Sep 2022 08:14:05 GMT pragma: - no-cache server: @@ -1384,9 +1573,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1398,7 +1587,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:39:58 GMT + - Thu, 29 Sep 2022 08:14:36 GMT pragma: - no-cache server: @@ -1430,9 +1619,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1444,7 +1633,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:40:27 GMT + - Thu, 29 Sep 2022 08:15:06 GMT pragma: - no-cache server: @@ -1476,9 +1665,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1490,7 +1679,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:40:57 GMT + - Thu, 29 Sep 2022 08:15:36 GMT pragma: - no-cache server: @@ -1522,9 +1711,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1536,7 +1725,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:41:27 GMT + - Thu, 29 Sep 2022 08:16:06 GMT pragma: - no-cache server: @@ -1568,9 +1757,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1582,7 +1771,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:41:57 GMT + - Thu, 29 Sep 2022 08:16:37 GMT pragma: - no-cache server: @@ -1614,9 +1803,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1628,7 +1817,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:42:28 GMT + - Thu, 29 Sep 2022 08:17:07 GMT pragma: - no-cache server: @@ -1660,9 +1849,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1674,7 +1863,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:42:58 GMT + - Thu, 29 Sep 2022 08:17:37 GMT pragma: - no-cache server: @@ -1706,9 +1895,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1720,7 +1909,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:43:28 GMT + - Thu, 29 Sep 2022 08:18:07 GMT pragma: - no-cache server: @@ -1752,9 +1941,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1766,7 +1955,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:43:58 GMT + - Thu, 29 Sep 2022 08:18:38 GMT pragma: - no-cache server: @@ -1798,9 +1987,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1812,7 +2001,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:44:29 GMT + - Thu, 29 Sep 2022 08:19:08 GMT pragma: - no-cache server: @@ -1844,9 +2033,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1858,7 +2047,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:44:59 GMT + - Thu, 29 Sep 2022 08:19:38 GMT pragma: - no-cache server: @@ -1890,9 +2079,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1904,7 +2093,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:45:29 GMT + - Thu, 29 Sep 2022 08:20:08 GMT pragma: - no-cache server: @@ -1936,9 +2125,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1950,7 +2139,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:45:59 GMT + - Thu, 29 Sep 2022 08:20:38 GMT pragma: - no-cache server: @@ -1982,9 +2171,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1996,7 +2185,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:46:30 GMT + - Thu, 29 Sep 2022 08:21:09 GMT pragma: - no-cache server: @@ -2028,9 +2217,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2042,7 +2231,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:46:59 GMT + - Thu, 29 Sep 2022 08:21:39 GMT pragma: - no-cache server: @@ -2074,9 +2263,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2088,7 +2277,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:29 GMT + - Thu, 29 Sep 2022 08:22:09 GMT pragma: - no-cache server: @@ -2120,9 +2309,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2134,7 +2323,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:59 GMT + - Thu, 29 Sep 2022 08:22:39 GMT pragma: - no-cache server: @@ -2166,9 +2355,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2180,7 +2369,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:48:29 GMT + - Thu, 29 Sep 2022 08:23:08 GMT pragma: - no-cache server: @@ -2212,9 +2401,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2226,7 +2415,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:49:00 GMT + - Thu, 29 Sep 2022 08:23:39 GMT pragma: - no-cache server: @@ -2258,9 +2447,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2272,7 +2461,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:49:30 GMT + - Thu, 29 Sep 2022 08:24:09 GMT pragma: - no-cache server: @@ -2304,9 +2493,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2318,7 +2507,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:50:00 GMT + - Thu, 29 Sep 2022 08:24:39 GMT pragma: - no-cache server: @@ -2350,9 +2539,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2364,7 +2553,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:50:31 GMT + - Thu, 29 Sep 2022 08:25:09 GMT pragma: - no-cache server: @@ -2396,9 +2585,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2410,7 +2599,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:51:01 GMT + - Thu, 29 Sep 2022 08:25:39 GMT pragma: - no-cache server: @@ -2442,9 +2631,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2456,7 +2645,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:51:30 GMT + - Thu, 29 Sep 2022 08:26:10 GMT pragma: - no-cache server: @@ -2488,9 +2677,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2502,7 +2691,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:52:00 GMT + - Thu, 29 Sep 2022 08:26:40 GMT pragma: - no-cache server: @@ -2534,9 +2723,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2548,7 +2737,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:52:31 GMT + - Thu, 29 Sep 2022 08:27:10 GMT pragma: - no-cache server: @@ -2580,9 +2769,9 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b91a149c-ab7a-491f-b6a6-a02be64de173?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/a9c1c11b-8b1a-4305-b876-f45ef6c0748c?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -2594,7 +2783,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:53:01 GMT + - Thu, 29 Sep 2022 08:27:40 GMT pragma: - no-cache server: @@ -2626,27 +2815,27 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:52:40.5194932Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","tableEndpoint":"https://cli000004.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"6a4f0c49-a796-421b-9ecd-49b1aa61560a","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:27:04.804279Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","tableEndpoint":"https://cli000004.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"621b3a83-57e0-4a2b-b036-97d9f710f5c6","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cc49da31-13e1-4b9d-b177-bbceed113f0b","restoreTimestampInUtc":"2022-09-20T07:36:43Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fe348596-7806-4215-9994-205ce4c61797","restoreTimestampInUtc":"2022-09-29T08:10:26Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:27:04.804279Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:27:04.804279Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:27:04.804279Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:27:04.804279Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2613' + - '3015' content-type: - application/json date: - - Tue, 20 Sep 2022 07:53:01 GMT + - Thu, 29 Sep 2022 08:27:40 GMT pragma: - no-cache server: @@ -2678,27 +2867,27 @@ interactions: ParameterSetName: - -n -g -a --restore-timestamp --location User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:52:40.5194932Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","tableEndpoint":"https://cli000004.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"6a4f0c49-a796-421b-9ecd-49b1aa61560a","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:27:04.804279Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","tableEndpoint":"https://cli000004.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"621b3a83-57e0-4a2b-b036-97d9f710f5c6","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cc49da31-13e1-4b9d-b177-bbceed113f0b","restoreTimestampInUtc":"2022-09-20T07:36:43Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fe348596-7806-4215-9994-205ce4c61797","restoreTimestampInUtc":"2022-09-29T08:10:26Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:27:04.804279Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:27:04.804279Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:27:04.804279Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:27:04.804279Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2613' + - '3015' content-type: - application/json date: - - Tue, 20 Sep 2022 07:53:01 GMT + - Thu, 29 Sep 2022 08:27:41 GMT pragma: - no-cache server: @@ -2730,27 +2919,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_command000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:52:40.5194932Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","tableEndpoint":"https://cli000004.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"6a4f0c49-a796-421b-9ecd-49b1aa61560a","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:27:04.804279Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","tableEndpoint":"https://cli000004.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"621b3a83-57e0-4a2b-b036-97d9f710f5c6","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000004-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cc49da31-13e1-4b9d-b177-bbceed113f0b","restoreTimestampInUtc":"2022-09-20T07:36:43Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fe348596-7806-4215-9994-205ce4c61797","restoreTimestampInUtc":"2022-09-29T08:10:26Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:27:04.804279Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:27:04.804279Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:27:04.804279Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:27:04.804279Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2613' + - '3015' content-type: - application/json date: - - Tue, 20 Sep 2022 07:53:02 GMT + - Thu, 29 Sep 2022 08:27:42 GMT pragma: - no-cache server: diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_account_restore_using_create.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_account_restore_using_create.yaml index 3a7c2f494ae..184e2fb62f4 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_account_restore_using_create.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_account_restore_using_create.yaml @@ -13,12 +13,13 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_table_account_restore_using_create000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001","name":"cli_test_cosmosdb_table_account_restore_using_create000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001","name":"cli_test_cosmosdb_table_account_restore_using_create000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T08:05:41Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -27,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:08 GMT + - Thu, 29 Sep 2022 08:05:43 GMT expires: - '-1' pragma: @@ -63,31 +64,31 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:11.0483307Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"e175b9a1-eeae-4331-b509-8516a500995b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:05:47.1131781Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ecfda59b-6fbf-43b3-88f7-16be1dce21bc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus2","locationName":"West US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus2","locationName":"West US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:05:47.1131781Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:05:47.1131781Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:05:47.1131781Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:05:47.1131781Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/79245f0d-b2a7-494e-a473-21e7df6ecc39?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/3fe92d03-4ff8-4c97-b6f7-028c44bb70db?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '1955' + - '2382' content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:13 GMT + - Thu, 29 Sep 2022 08:05:48 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/79245f0d-b2a7-494e-a473-21e7df6ecc39?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/3fe92d03-4ff8-4c97-b6f7-028c44bb70db?api-version=2022-08-15-preview pragma: - no-cache server: @@ -121,9 +122,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/79245f0d-b2a7-494e-a473-21e7df6ecc39?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/3fe92d03-4ff8-4c97-b6f7-028c44bb70db?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -135,7 +136,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:43 GMT + - Thu, 29 Sep 2022 08:06:19 GMT pragma: - no-cache server: @@ -167,9 +168,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/79245f0d-b2a7-494e-a473-21e7df6ecc39?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/3fe92d03-4ff8-4c97-b6f7-028c44bb70db?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -181,7 +182,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:13 GMT + - Thu, 29 Sep 2022 08:06:49 GMT pragma: - no-cache server: @@ -213,9 +214,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/79245f0d-b2a7-494e-a473-21e7df6ecc39?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/3fe92d03-4ff8-4c97-b6f7-028c44bb70db?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -227,7 +228,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:43 GMT + - Thu, 29 Sep 2022 08:07:18 GMT pragma: - no-cache server: @@ -259,9 +260,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/79245f0d-b2a7-494e-a473-21e7df6ecc39?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/3fe92d03-4ff8-4c97-b6f7-028c44bb70db?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -273,7 +274,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:14 GMT + - Thu, 29 Sep 2022 08:07:49 GMT pragma: - no-cache server: @@ -305,9 +306,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/79245f0d-b2a7-494e-a473-21e7df6ecc39?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/3fe92d03-4ff8-4c97-b6f7-028c44bb70db?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -319,7 +320,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:44 GMT + - Thu, 29 Sep 2022 08:08:19 GMT pragma: - no-cache server: @@ -351,9 +352,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/79245f0d-b2a7-494e-a473-21e7df6ecc39?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/3fe92d03-4ff8-4c97-b6f7-028c44bb70db?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -365,7 +366,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:14 GMT + - Thu, 29 Sep 2022 08:08:49 GMT pragma: - no-cache server: @@ -397,9 +398,55 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/79245f0d-b2a7-494e-a473-21e7df6ecc39?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/3fe92d03-4ff8-4c97-b6f7-028c44bb70db?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:09:19 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --backup-policy-type --locations --capabilities + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/3fe92d03-4ff8-4c97-b6f7-028c44bb70db?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -411,7 +458,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:44 GMT + - Thu, 29 Sep 2022 08:09:49 GMT pragma: - no-cache server: @@ -443,27 +490,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:31:05.421444Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"e175b9a1-eeae-4331-b509-8516a500995b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:08:58.0275115Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ecfda59b-6fbf-43b3-88f7-16be1dce21bc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:08:58.0275115Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:08:58.0275115Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:08:58.0275115Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:08:58.0275115Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2320' + - '2748' content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:44 GMT + - Thu, 29 Sep 2022 08:09:50 GMT pragma: - no-cache server: @@ -495,27 +542,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:31:05.421444Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"e175b9a1-eeae-4331-b509-8516a500995b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:08:58.0275115Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ecfda59b-6fbf-43b3-88f7-16be1dce21bc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:08:58.0275115Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:08:58.0275115Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:08:58.0275115Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:08:58.0275115Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2320' + - '2748' content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:44 GMT + - Thu, 29 Sep 2022 08:09:50 GMT pragma: - no-cache server: @@ -547,27 +594,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:31:05.421444Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"e175b9a1-eeae-4331-b509-8516a500995b","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:08:58.0275115Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"ecfda59b-6fbf-43b3-88f7-16be1dce21bc","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:08:58.0275115Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:08:58.0275115Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:08:58.0275115Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:08:58.0275115Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2320' + - '2748' content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:45 GMT + - Thu, 29 Sep 2022 08:09:50 GMT pragma: - no-cache server: @@ -603,15 +650,15 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/77a4e9d5-1788-4673-8149-fdcf1430a749?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/10e7c69c-cb41-42ae-bf92-fcfe5b71de28?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -619,9 +666,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:45 GMT + - Thu, 29 Sep 2022 08:09:51 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/operationResults/77a4e9d5-1788-4673-8149-fdcf1430a749?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/operationResults/10e7c69c-cb41-42ae-bf92-fcfe5b71de28?api-version=2022-08-15 pragma: - no-cache server: @@ -651,9 +698,9 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/77a4e9d5-1788-4673-8149-fdcf1430a749?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/10e7c69c-cb41-42ae-bf92-fcfe5b71de28?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -665,7 +712,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:16 GMT + - Thu, 29 Sep 2022 08:10:21 GMT pragma: - no-cache server: @@ -697,12 +744,12 @@ interactions: ParameterSetName: - -g -a -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"duk6APXeYEk=","_etag":"\"00000000-0000-0000-ccc3-0f51dc0801d8\"","_ts":1663659115}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"3uxWAIq0Va8=","_etag":"\"00000000-0000-0000-d3da-e159380801d8\"","_ts":1664439004}}}' headers: cache-control: - no-store, no-cache @@ -711,7 +758,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:17 GMT + - Thu, 29 Sep 2022 08:10:22 GMT pragma: - no-cache server: @@ -741,134 +788,288 @@ interactions: Connection: - keep-alive User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview response: body: - string: '{"value":[{"name":"257c9845-9c76-4e02-b6aa-c45df6d74351","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/257c9845-9c76-4e02-b6aa-c45df6d74351","properties":{"accountName":"cliqwlgknilbfow","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:57:56Z","oldestRestorableTime":"2022-09-20T06:57:56Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"00e3cba5-bdef-4dd4-96d4-c184fb94784f","creationTime":"2022-09-20T06:57:58Z"}]}},{"name":"d26ff24f-5217-4b0c-b52b-a6326be32c87","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/d26ff24f-5217-4b0c-b52b-a6326be32c87","properties":{"accountName":"clirie7hraznup4","apiType":"Table, - Sql","creationTime":"2022-09-20T06:58:00Z","oldestRestorableTime":"2022-09-20T06:58:00Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"43a328e8-5ccc-497d-a356-4ee4d7e306e2","creationTime":"2022-09-20T06:58:01Z"}]}},{"name":"e039d441-9698-42ba-8471-f78728e3932f","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e039d441-9698-42ba-8471-f78728e3932f","properties":{"accountName":"clixsligrhnkthm","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:07:36Z","oldestRestorableTime":"2022-09-20T07:07:36Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"b3d364b8-b3a2-428f-988a-27bb4cf0c112","creationTime":"2022-09-20T07:07:37Z"}]}},{"name":"6cbb9e3c-1fa3-4d80-85e5-6131c42811fb","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/6cbb9e3c-1fa3-4d80-85e5-6131c42811fb","properties":{"accountName":"cli2jvorduabbs6","apiType":"Table, - Sql","creationTime":"2022-09-20T07:07:41Z","oldestRestorableTime":"2022-09-20T07:07:41Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"fc8a971e-ad61-47a9-a731-4e706e0ec024","creationTime":"2022-09-20T07:07:42Z"}]}},{"name":"de173432-0f17-4f34-bbcf-111200be4f1a","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/de173432-0f17-4f34-bbcf-111200be4f1a","properties":{"accountName":"climaslmt6clahf","apiType":"Table, - Sql","creationTime":"2022-09-20T07:26:46Z","oldestRestorableTime":"2022-09-20T07:26:46Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"a6203059-530c-4847-b8dd-be2b45aadf6c","creationTime":"2022-09-20T07:26:46Z"}]}},{"name":"dfb7ab5f-d103-4498-bab0-d77e2cbbe6da","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/dfb7ab5f-d103-4498-bab0-d77e2cbbe6da","properties":{"accountName":"clihhselzsgnxci","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:26:51Z","oldestRestorableTime":"2022-09-20T07:26:51Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"6696a646-0dd5-4419-ae9e-45d0921194f7","creationTime":"2022-09-20T07:26:51Z"}]}},{"name":"e175b9a1-eeae-4331-b509-8516a500995b","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e175b9a1-eeae-4331-b509-8516a500995b","properties":{"accountName":"cli000003","apiType":"Table, - Sql","creationTime":"2022-09-20T07:31:06Z","oldestRestorableTime":"2022-09-20T07:31:06Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"d64e8aa5-4fae-4784-a1e8-798868eee115","creationTime":"2022-09-20T07:31:07Z"}]}},{"name":"2b567c10-cb59-41b3-b522-341b45e961fd","location":"West - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/2b567c10-cb59-41b3-b522-341b45e961fd","properties":{"accountName":"cli2bdyu5ikmib7","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:31:04Z","oldestRestorableTime":"2022-09-20T07:31:04Z","restorableLocations":[{"locationName":"West - US 2","regionalDatabaseAccountInstanceId":"63270364-1197-4702-90bd-505cd5a9c39f","creationTime":"2022-09-20T07:31:05Z"}]}},{"name":"5d4c9410-0368-4540-a6d6-2acf346d055e","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/5d4c9410-0368-4540-a6d6-2acf346d055e","properties":{"accountName":"cli4xpfpmginjkx","apiType":"MongoDB","creationTime":"2022-09-20T06:58:53Z","oldestRestorableTime":"2022-09-20T06:58:53Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"364d03ae-5e1d-4028-9d7a-899e95e3390e","creationTime":"2022-09-20T06:58:54Z"}]}},{"name":"71e6d92e-64f7-4026-9239-68fb622c1cbd","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/71e6d92e-64f7-4026-9239-68fb622c1cbd","properties":{"accountName":"cliwuke4f7ez2bm","apiType":"Table, - Sql","creationTime":"2022-09-20T06:58:51Z","oldestRestorableTime":"2022-09-20T06:58:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"869e7338-783e-4277-8d0e-0a7257853ddc","creationTime":"2022-09-20T06:58:52Z"}]}},{"name":"508132ae-8315-4f07-8c38-8806a39dfe3b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/508132ae-8315-4f07-8c38-8806a39dfe3b","properties":{"accountName":"cliatg4hovhsjun","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:58:48Z","oldestRestorableTime":"2022-09-20T06:58:48Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"03886ad8-258b-4c22-ba99-956418af8c52","creationTime":"2022-09-20T06:58:50Z"}]}},{"name":"b9b05fe1-ff67-415a-9a47-9f7c814506c0","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9b05fe1-ff67-415a-9a47-9f7c814506c0","properties":{"accountName":"cligz5iirsuhy54","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:58:34Z","oldestRestorableTime":"2022-09-20T06:58:34Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"d98d0aed-ba88-4df6-960c-48323e132a1d","creationTime":"2022-09-20T06:58:35Z"}]}},{"name":"a57e21c5-4307-47aa-a67b-708e2cf5e045","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a57e21c5-4307-47aa-a67b-708e2cf5e045","properties":{"accountName":"clijexpfpgj4xel","apiType":"Table, - Sql","creationTime":"2022-09-20T06:59:25Z","oldestRestorableTime":"2022-09-20T06:59:25Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"806c35f4-94df-432a-aa5f-9eca0ab47262","creationTime":"2022-09-20T06:59:26Z"}]}},{"name":"7ecee14c-acd0-4d2d-9227-1a9cca60f606","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7ecee14c-acd0-4d2d-9227-1a9cca60f606","properties":{"accountName":"cliqwbd7wrqol4u","apiType":"Table, - Sql","creationTime":"2022-09-20T06:59:23Z","oldestRestorableTime":"2022-09-20T06:59:23Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"87b06295-42cb-4aa9-a639-8f52d4412111","creationTime":"2022-09-20T06:59:24Z"}]}},{"name":"5ed10bbe-201a-4cfa-b188-08964e31a970","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/5ed10bbe-201a-4cfa-b188-08964e31a970","properties":{"accountName":"clite3mysf2h7oc","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T06:59:24Z","oldestRestorableTime":"2022-09-20T06:59:24Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"096e5485-f140-4786-96b9-263670bf610d","creationTime":"2022-09-20T06:59:25Z"}]}},{"name":"faddd26c-1aea-4e26-bc85-ef2851e5b1ad","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/faddd26c-1aea-4e26-bc85-ef2851e5b1ad","properties":{"accountName":"cliiwxv2f7jtutq","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:32Z","oldestRestorableTime":"2022-09-20T07:09:32Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"e93ba2dd-f14e-4eeb-8607-59a65c670a8d","creationTime":"2022-09-20T07:09:34Z"}]}},{"name":"4bf354b5-2cc6-4362-b72d-06b810e007b8","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bf354b5-2cc6-4362-b72d-06b810e007b8","properties":{"accountName":"clidszljdbpajb2","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:09:31Z","oldestRestorableTime":"2022-09-20T07:09:31Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"50942b9d-b33b-4497-86af-aebdfa536490","creationTime":"2022-09-20T07:09:33Z"}]}},{"name":"c1a89bca-1680-44c9-8368-57fab7d3ce9f","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c1a89bca-1680-44c9-8368-57fab7d3ce9f","properties":{"accountName":"cli-periodic-cljpeqrfavoc","apiType":"Sql","creationTime":"2022-09-20T07:25:27Z","oldestRestorableTime":"2022-09-20T07:25:27Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"4c07c0cc-973d-4b4a-9d66-ae2d2fa9dd94","creationTime":"2022-09-20T07:25:27Z"}]}},{"name":"bd23a72e-8c62-47c7-bd05-1ccd468ee3ad","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/bd23a72e-8c62-47c7-bd05-1ccd468ee3ad","properties":{"accountName":"clih4tsxxvdyqam","apiType":"Table, - Sql","creationTime":"2022-09-20T07:29:02Z","oldestRestorableTime":"2022-09-20T07:29:02Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"6b63f457-fcca-425f-982d-30af45f213d3","creationTime":"2022-09-20T07:29:02Z"}]}},{"name":"a6a2dbf4-3fd8-473b-9102-c2ead58486d1","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a6a2dbf4-3fd8-473b-9102-c2ead58486d1","properties":{"accountName":"clinlw2brcr45fg","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:30:02Z","oldestRestorableTime":"2022-09-20T07:30:02Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"26aa104a-a6bc-4705-856e-8029bb9567f8","creationTime":"2022-09-20T07:30:02Z"}]}},{"name":"ffdc6000-b5a4-4280-8914-7358f7c59e9b","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ffdc6000-b5a4-4280-8914-7358f7c59e9b","properties":{"accountName":"cli-continuous7-p6aq45s3u","apiType":"Sql","creationTime":"2022-09-20T07:30:25Z","oldestRestorableTime":"2022-09-20T07:30:25Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c5b358c6-b898-46d9-a764-153b137004ce","creationTime":"2022-09-20T07:30:26Z"}]}},{"name":"2ecfd574-0338-4282-88ff-de2010f3c8b2","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2ecfd574-0338-4282-88ff-de2010f3c8b2","properties":{"accountName":"clifcwdniaybty3","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:31:51Z","oldestRestorableTime":"2022-09-20T07:31:51Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"1feb0106-d878-470e-99e7-244b72479a6d","creationTime":"2022-09-20T07:31:52Z"}]}},{"name":"08925518-7cca-41f1-881c-6b404c728f04","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/08925518-7cca-41f1-881c-6b404c728f04","properties":{"accountName":"cliimny6cecr4ww","apiType":"Sql","creationTime":"2022-09-20T07:30:18Z","oldestRestorableTime":"2022-09-20T07:30:18Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"e0b60541-9ee3-44c5-b9c0-e951c6f150c0","creationTime":"2022-09-20T07:30:19Z"}]}},{"name":"9cba50f9-b777-4e28-a639-d1f2cc46a2cb","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9cba50f9-b777-4e28-a639-d1f2cc46a2cb","properties":{"accountName":"cli-continuous30-bcltzefu","apiType":"Sql","creationTime":"2022-09-20T06:56:35Z","deletionTime":"2022-09-20T06:58:55Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"b1086a3e-d45d-472c-903a-099339e66ff4","creationTime":"2022-09-20T06:56:36Z","deletionTime":"2022-09-20T06:58:55Z"}]}},{"name":"71ad3372-2c99-46e7-999b-d029cafcde99","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/71ad3372-2c99-46e7-999b-d029cafcde99","properties":{"accountName":"cliqg2buoohhxib","apiType":"Sql","creationTime":"2022-09-20T06:56:47Z","deletionTime":"2022-09-20T07:01:37Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c2acb6ce-146b-4d7e-97b5-309e0d0ba031","creationTime":"2022-09-20T06:56:48Z","deletionTime":"2022-09-20T07:01:37Z"}]}},{"name":"0d5a1375-7285-42a7-a4c8-e30c0fc346ab","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d5a1375-7285-42a7-a4c8-e30c0fc346ab","properties":{"accountName":"cli-continuous7-65osau3nh","apiType":"Sql","creationTime":"2022-09-20T07:06:15Z","deletionTime":"2022-09-20T07:08:17Z","oldestRestorableTime":"2022-09-13T07:08:17Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"871c9ba5-22c7-4c12-9861-b39d3ec2c2e0","creationTime":"2022-09-20T07:06:16Z","deletionTime":"2022-09-20T07:08:17Z"}]}},{"name":"95d6104d-75c6-46dd-8ec6-f694477bc0d6","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/95d6104d-75c6-46dd-8ec6-f694477bc0d6","properties":{"accountName":"cli-continuous30-w3te74xk","apiType":"Sql","creationTime":"2022-09-20T07:06:17Z","deletionTime":"2022-09-20T07:08:26Z","oldestRestorableTime":"2022-09-13T07:08:26Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"7338fe3b-59c9-4171-a1b1-b7422e8d8afe","creationTime":"2022-09-20T07:06:18Z","deletionTime":"2022-09-20T07:08:26Z"}]}},{"name":"508d74a3-1d19-4142-9dd6-571d66a87c41","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/508d74a3-1d19-4142-9dd6-571d66a87c41","properties":{"accountName":"cli-continuous7-7v6xqmb63","apiType":"Sql","creationTime":"2022-09-20T07:06:22Z","deletionTime":"2022-09-20T07:09:32Z","oldestRestorableTime":"2022-09-13T07:07:19Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"457b2138-f06d-4638-82b6-1073189f628b","creationTime":"2022-09-20T07:06:23Z","deletionTime":"2022-09-20T07:09:32Z"}]}},{"name":"cfe3d7a7-45bc-4877-8472-736864c9b5f9","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cfe3d7a7-45bc-4877-8472-736864c9b5f9","properties":{"accountName":"clixilzxjjied4f","apiType":"Sql","creationTime":"2022-09-20T07:06:47Z","deletionTime":"2022-09-20T07:10:46Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"ba2dc9f5-269e-4ab0-a11c-4b9e688e2303","creationTime":"2022-09-20T07:06:48Z","deletionTime":"2022-09-20T07:10:46Z"}]}},{"name":"2690cc86-3796-4d1c-899a-ea2de74efa34","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2690cc86-3796-4d1c-899a-ea2de74efa34","properties":{"accountName":"cligfkup2qadxbs","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:08:17Z","deletionTime":"2022-09-20T07:12:28Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"f937c85d-0ebb-4356-b183-81995a031870","creationTime":"2022-09-20T07:08:18Z","deletionTime":"2022-09-20T07:12:28Z"}]}},{"name":"d907fff6-bfe7-439b-b0fe-0cda508ce935","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d907fff6-bfe7-439b-b0fe-0cda508ce935","properties":{"accountName":"cli46ku46eatxsg","apiType":"Gremlin, - Sql","creationTime":"2022-09-20T07:08:23Z","deletionTime":"2022-09-20T07:12:49Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"c7591c48-2839-4179-b387-11a03dc21faa","creationTime":"2022-09-20T07:08:24Z","deletionTime":"2022-09-20T07:12:49Z"}]}},{"name":"00f9d479-167f-46a7-9617-da1cd54ffa64","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/00f9d479-167f-46a7-9617-da1cd54ffa64","properties":{"accountName":"clinrcj6fzstkit","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:28Z","deletionTime":"2022-09-20T07:13:47Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"3e3add00-cae4-46f3-8806-2955fae16d7b","creationTime":"2022-09-20T07:09:29Z","deletionTime":"2022-09-20T07:13:47Z"}]}},{"name":"faf3657c-1a01-4ac5-9525-e70acbef0e71","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/faf3657c-1a01-4ac5-9525-e70acbef0e71","properties":{"accountName":"clibbwbehryuf3y","apiType":"Table, - Sql","creationTime":"2022-09-20T07:09:32Z","deletionTime":"2022-09-20T07:14:19Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"cf5da2c0-4bf1-4e8b-8133-bbc845bc811d","creationTime":"2022-09-20T07:09:33Z","deletionTime":"2022-09-20T07:14:19Z"}]}},{"name":"64521b27-67b5-45fa-85d1-d2be34e4130a","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/64521b27-67b5-45fa-85d1-d2be34e4130a","properties":{"accountName":"clizng4ucknrzlj","apiType":"MongoDB","creationTime":"2022-09-20T07:09:26Z","deletionTime":"2022-09-20T07:14:48Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"92e08db9-45a8-44bd-8170-de3b8fc8210e","creationTime":"2022-09-20T07:09:27Z","deletionTime":"2022-09-20T07:14:48Z"}]}},{"name":"604b862e-8311-4252-84ec-94dc06e4adcc","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/604b862e-8311-4252-84ec-94dc06e4adcc","properties":{"accountName":"cli-continuous30-pq5j3zii","apiType":"Sql","creationTime":"2022-09-20T07:29:51Z","deletionTime":"2022-09-20T07:31:46Z","oldestRestorableTime":"2022-09-13T07:31:46Z","restorableLocations":[]}},{"name":"d9b2cd74-5d52-4332-b8cf-63763160af03","location":"East - US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d9b2cd74-5d52-4332-b8cf-63763160af03","properties":{"accountName":"cli-continuous7-3kpcqslhp","apiType":"Sql","creationTime":"2022-09-20T07:29:50Z","deletionTime":"2022-09-20T07:31:46Z","oldestRestorableTime":"2022-09-13T07:31:46Z","restorableLocations":[]}},{"name":"cb60e313-4fce-4827-8b88-7b229922ba3f","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/cb60e313-4fce-4827-8b88-7b229922ba3f","properties":{"accountName":"clibfdc7nvbjcss","apiType":"MongoDB","creationTime":"2022-09-16T07:05:49Z","deletionTime":"2022-09-16T08:02:20Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"fab58a28-536e-490e-8057-e4fcbb2ce2fe","creationTime":"2022-09-16T07:05:50Z","deletionTime":"2022-09-16T08:02:20Z"}]}},{"name":"313977bf-0600-490f-bd43-cf3dbcc8acd6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/313977bf-0600-490f-bd43-cf3dbcc8acd6","properties":{"accountName":"clidu42bussweh4","apiType":"Sql","creationTime":"2022-09-16T07:03:41Z","deletionTime":"2022-09-16T22:33:00Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"bf443477-3631-4fc8-b2cf-39443b29b7fd","creationTime":"2022-09-16T07:03:43Z","deletionTime":"2022-09-16T22:33:00Z"}]}},{"name":"410ae43b-5529-4a01-ab04-ababa3b66da6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/410ae43b-5529-4a01-ab04-ababa3b66da6","properties":{"accountName":"clik5k4my5jiscc","apiType":"MongoDB","creationTime":"2022-09-16T07:05:48Z","deletionTime":"2022-09-16T22:33:01Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"3aecbccf-b953-4e18-b621-5354abb3023b","creationTime":"2022-09-16T07:05:50Z","deletionTime":"2022-09-16T22:33:01Z"}]}},{"name":"dbd5f878-e6fb-43b8-95e6-71e23c56ff2d","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dbd5f878-e6fb-43b8-95e6-71e23c56ff2d","properties":{"accountName":"dbaccount-7193","apiType":"Sql","creationTime":"2022-09-16T22:45:23Z","deletionTime":"2022-09-16T22:50:21Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"1e39a514-1472-475d-a9c8-c95f8fbc6083","creationTime":"2022-09-16T22:45:24Z","deletionTime":"2022-09-16T22:50:21Z"}]}},{"name":"8f992221-1433-4ae8-af34-c4c0e8b8be2a","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8f992221-1433-4ae8-af34-c4c0e8b8be2a","properties":{"accountName":"r-database-account-2123","apiType":"Sql","creationTime":"2022-09-16T22:54:15Z","deletionTime":"2022-09-16T22:55:13Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"13c00146-4006-4fd9-96bc-9db4a62ef07c","creationTime":"2022-09-16T22:54:16Z","deletionTime":"2022-09-16T22:55:13Z"}]}},{"name":"00e030b5-e4e6-4d1b-9fc1-92c4275ed52d","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/00e030b5-e4e6-4d1b-9fc1-92c4275ed52d","properties":{"accountName":"r-database-account-5280","apiType":"Sql","creationTime":"2022-09-16T23:05:11Z","deletionTime":"2022-09-16T23:06:10Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"063bae49-12e5-47f6-af4e-776ec0a5c368","creationTime":"2022-09-16T23:05:12Z","deletionTime":"2022-09-16T23:06:10Z"}]}},{"name":"b6ca1cd6-dad7-477d-93cb-90da1b86ff92","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ca1cd6-dad7-477d-93cb-90da1b86ff92","properties":{"accountName":"dbaccount-3711","apiType":"Sql","creationTime":"2022-09-16T23:16:39Z","deletionTime":"2022-09-16T23:21:31Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"74ac4413-8d2e-4e8a-baf3-9c2a5dfe7841","creationTime":"2022-09-16T23:16:40Z","deletionTime":"2022-09-16T23:21:31Z"}]}},{"name":"40638959-6393-4738-b2ef-7134c4f1b876","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/40638959-6393-4738-b2ef-7134c4f1b876","properties":{"accountName":"cliswrqd5krl5dz","apiType":"MongoDB","creationTime":"2022-09-19T07:07:09Z","deletionTime":"2022-09-19T08:13:36Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"cf381911-15ec-4bb9-befd-fcb968b79eb4","creationTime":"2022-09-19T07:07:10Z","deletionTime":"2022-09-19T08:13:36Z"}]}},{"name":"f31abfdd-f69b-4567-9b35-2cd0e82c54e6","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f31abfdd-f69b-4567-9b35-2cd0e82c54e6","properties":{"accountName":"cli5avgifijfvao","apiType":"Sql","creationTime":"2022-09-19T07:05:33Z","deletionTime":"2022-09-19T08:13:38Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"571e5d29-d8d7-424a-8831-f03772fb3ba8","creationTime":"2022-09-19T07:05:34Z","deletionTime":"2022-09-19T08:13:38Z"}]}},{"name":"baa0e3fb-6014-44c3-b538-e233f9f21123","location":"West - US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/baa0e3fb-6014-44c3-b538-e233f9f21123","properties":{"accountName":"clifuwxyu6vqzpa","apiType":"MongoDB","creationTime":"2022-09-19T07:07:00Z","deletionTime":"2022-09-19T08:13:39Z","oldestRestorableTime":"2022-08-21T07:32:18Z","restorableLocations":[{"locationName":"West - US","regionalDatabaseAccountInstanceId":"f219b5af-9d61-4c53-a33e-c6e9a06107eb","creationTime":"2022-09-19T07:07:01Z","deletionTime":"2022-09-19T08:13:39Z"}]}}]}' + string: '{"value":[{"name":"011f2f51-c08d-4800-9f90-c7be67f890f9","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/011f2f51-c08d-4800-9f90-c7be67f890f9","properties":{"accountName":"databaseaccount6379","apiType":"Sql","creationTime":"2022-09-21T23:25:26Z","oldestRestorableTime":"2022-09-21T23:25:26Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"1cda5644-36a7-4eb3-9b44-bf7496cd1c3b","creationTime":"2022-09-21T23:25:27Z"}]}},{"name":"294aa245-71ae-45e5-bdd1-15d3d389afdd","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/294aa245-71ae-45e5-bdd1-15d3d389afdd","properties":{"accountName":"databaseaccount3761","apiType":"Sql","creationTime":"2022-09-22T16:32:24Z","deletionTime":"2022-09-22T16:35:56Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d14b5a2a-317d-4346-84bd-09f4725faf41","creationTime":"2022-09-22T16:32:25Z","deletionTime":"2022-09-22T16:35:56Z"}]}},{"name":"45afeea5-4e7d-4031-82ac-d648ff5f3daf","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/45afeea5-4e7d-4031-82ac-d648ff5f3daf","properties":{"accountName":"databaseaccount9845","apiType":"Table, + Sql","creationTime":"2022-09-22T16:49:40Z","deletionTime":"2022-09-22T16:52:38Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5218aa02-4ac2-4755-aafd-768c6547ccb9","creationTime":"2022-09-22T16:49:41Z","deletionTime":"2022-09-22T16:52:38Z"}]}},{"name":"e596fb1c-cb0e-4627-879a-b935d1cfff61","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e596fb1c-cb0e-4627-879a-b935d1cfff61","properties":{"accountName":"databaseaccount4632","apiType":"Table, + Sql","creationTime":"2022-09-22T17:00:13Z","deletionTime":"2022-09-22T17:03:08Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"adac6e2a-dd42-417d-81cf-32dd85bce3fa","creationTime":"2022-09-22T17:00:14Z","deletionTime":"2022-09-22T17:03:08Z"}]}},{"name":"20e98736-ae1e-4e28-aef7-17647a7c0be5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20e98736-ae1e-4e28-aef7-17647a7c0be5","properties":{"accountName":"databaseaccount3910","apiType":"Sql","creationTime":"2022-09-22T17:05:21Z","deletionTime":"2022-09-22T17:08:49Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a8b02c1b-8bb7-46e5-981b-38e7679a245f","creationTime":"2022-09-22T17:05:22Z","deletionTime":"2022-09-22T17:08:49Z"}]}},{"name":"97f69fd0-6bca-4435-8273-5d4c57bfa958","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97f69fd0-6bca-4435-8273-5d4c57bfa958","properties":{"accountName":"databaseaccount8566","apiType":"MongoDB","creationTime":"2022-09-22T17:12:39Z","deletionTime":"2022-09-22T17:17:09Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"001590e3-57b3-4680-b00c-5645d2b3db00","creationTime":"2022-09-22T17:12:40Z","deletionTime":"2022-09-22T17:17:09Z"}]}},{"name":"20f6816f-2b6e-4eb8-a169-ece6efdb1965","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/20f6816f-2b6e-4eb8-a169-ece6efdb1965","properties":{"accountName":"databaseaccount6543","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T17:20:26Z","deletionTime":"2022-09-22T17:23:54Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c224fbce-668c-4fb8-8ea6-cd35f824779a","creationTime":"2022-09-22T17:20:27Z","deletionTime":"2022-09-22T17:23:54Z"}]}},{"name":"60c50b83-5b67-4d2a-93de-a2983d309fa1","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/60c50b83-5b67-4d2a-93de-a2983d309fa1","properties":{"accountName":"restoredaccount649","apiType":"Table, + Sql","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"aa96937d-b496-4b56-8ef9-cd62188f7706","creationTime":"2022-09-22T17:56:14Z","deletionTime":"2022-09-22T17:56:55Z"}]}},{"name":"0f563afb-bc89-4539-bead-26b688acfabe","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0f563afb-bc89-4539-bead-26b688acfabe","properties":{"accountName":"databaseaccount2584","apiType":"Table, + Sql","creationTime":"2022-09-22T17:40:15Z","deletionTime":"2022-09-22T17:56:56Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"88035837-1038-495d-8446-2bf4be442b07","creationTime":"2022-09-22T17:40:16Z","deletionTime":"2022-09-22T17:56:56Z"}]}},{"name":"707d969e-005b-47ce-aad7-9826e2cd3708","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/707d969e-005b-47ce-aad7-9826e2cd3708","properties":{"accountName":"databaseaccount6756","apiType":"MongoDB","creationTime":"2022-09-22T18:01:16Z","deletionTime":"2022-09-22T18:16:44Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9f3575c-7def-4ea7-9739-5d318e5249a6","creationTime":"2022-09-22T18:01:17Z","deletionTime":"2022-09-22T18:16:44Z"}]}},{"name":"e78f8864-b74e-4485-9ec0-4baa7952f4a3","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/e78f8864-b74e-4485-9ec0-4baa7952f4a3","properties":{"accountName":"databaseaccount1320","apiType":"Sql","creationTime":"2022-09-22T18:17:46Z","deletionTime":"2022-09-22T18:33:47Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"74384654-ccb4-4f7b-9960-c6d4e7bc0bf5","creationTime":"2022-09-22T18:17:47Z","deletionTime":"2022-09-22T18:33:47Z"}]}},{"name":"75351d8b-7845-43bc-8755-ec51202adb0c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/75351d8b-7845-43bc-8755-ec51202adb0c","properties":{"accountName":"restoredaccount8379","apiType":"Sql","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"5d4a7213-6793-4693-97b9-4dd7b456a4b6","creationTime":"2022-09-22T18:31:56Z","deletionTime":"2022-09-22T18:33:57Z"}]}},{"name":"c4c00662-79c3-4366-a834-b29c83b10b9e","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/c4c00662-79c3-4366-a834-b29c83b10b9e","properties":{"accountName":"tablerestoredaccount7815","apiType":"Table, + Sql","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"bb8f4368-780d-45d8-ac62-dc5945b84d1d","creationTime":"2022-09-22T18:53:06Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"dcbc9692-09cc-4314-8560-13b32356fa8f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/dcbc9692-09cc-4314-8560-13b32356fa8f","properties":{"accountName":"databaseaccount8287","apiType":"Table, + Sql","creationTime":"2022-09-22T18:37:08Z","deletionTime":"2022-09-22T18:54:37Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ce895ad4-512f-4d22-902f-3f0e1336aff7","creationTime":"2022-09-22T18:37:09Z","deletionTime":"2022-09-22T18:54:37Z"}]}},{"name":"97a45110-a9ae-4afe-b88a-6294de0e8e45","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/97a45110-a9ae-4afe-b88a-6294de0e8e45","properties":{"accountName":"databaseaccount5779","apiType":"Sql","creationTime":"2022-09-22T18:55:35Z","deletionTime":"2022-09-22T19:11:37Z","oldestRestorableTime":"2022-09-15T19:11:37Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"941db548-346b-47c8-9af0-5f6afac8ae8a","creationTime":"2022-09-22T18:55:36Z","deletionTime":"2022-09-22T19:11:37Z"}]}},{"name":"58b8503b-4e74-4bac-a7d6-be07c6244a96","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/58b8503b-4e74-4bac-a7d6-be07c6244a96","properties":{"accountName":"restoredaccount2786","apiType":"Sql","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z","oldestRestorableTime":"2022-09-15T19:11:47Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"b0172b16-c923-4e07-9639-f87c30bd75b9","creationTime":"2022-09-22T19:09:46Z","deletionTime":"2022-09-22T19:11:47Z"}]}},{"name":"1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/1c70adb8-236b-4ad2-8a95-a03ac1e43c7f","properties":{"accountName":"databaseaccount5530","apiType":"MongoDB","creationTime":"2022-09-22T19:15:50Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"6adfef4d-f8c5-475b-82a2-df27132c5ac5","creationTime":"2022-09-22T19:15:51Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"72838f31-8037-4996-b059-2e66728c1f8d","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/72838f31-8037-4996-b059-2e66728c1f8d","properties":{"accountName":"mongodbrestoredaccount7404","apiType":"MongoDB","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"920b3cdf-5b23-4e7f-9a18-7d499a70a9eb","creationTime":"2022-09-22T19:31:33Z","deletionTime":"2022-09-22T19:32:31Z"}]}},{"name":"3edf4a67-7de1-47b5-a8da-7d04cae9a645","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/3edf4a67-7de1-47b5-a8da-7d04cae9a645","properties":{"accountName":"databaseaccount3100","apiType":"MongoDB","creationTime":"2022-09-22T19:43:13Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"53551825-1e39-4929-ab5a-cdf60aa0919b","creationTime":"2022-09-22T19:43:14Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"0e345918-c2ab-4897-84bb-f28f04b3d988","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/0e345918-c2ab-4897-84bb-f28f04b3d988","properties":{"accountName":"databaseaccount5777","apiType":"MongoDB","creationTime":"2022-09-22T19:37:34Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"92695307-661e-43b2-913f-d6cb0854bbc3","creationTime":"2022-09-22T19:37:35Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"6feed5da-4d33-4f34-8b4d-49a8ac3df602","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/6feed5da-4d33-4f34-8b4d-49a8ac3df602","properties":{"accountName":"databaseaccount8843","apiType":"Sql","creationTime":"2022-09-22T19:34:29Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"06f9099a-d648-4e1b-87fa-55fdc685ec4e","creationTime":"2022-09-22T19:34:30Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ecb8d11e-b3ca-4cb6-aaa9-342c604e2fb2","properties":{"accountName":"databaseaccount2732","apiType":"Table, + Sql","creationTime":"2022-09-22T19:54:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e3f7cb26-0e96-4b7e-b920-5b0d9f424cc1","creationTime":"2022-09-22T19:54:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"ef7a1529-a524-4889-aca2-04a2f6ab1ae5","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/ef7a1529-a524-4889-aca2-04a2f6ab1ae5","properties":{"accountName":"databaseaccount2336","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T19:48:52Z","deletionTime":"2022-09-22T19:56:12Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9c069b4-8444-4828-bb11-ca1bf50d3717","creationTime":"2022-09-22T19:48:53Z","deletionTime":"2022-09-22T19:56:12Z"}]}},{"name":"7d4408d1-fcc4-4d79-82c2-527195496d21","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/7d4408d1-fcc4-4d79-82c2-527195496d21","properties":{"accountName":"databaseaccount4398","apiType":"Sql","creationTime":"2022-09-22T19:58:13Z","deletionTime":"2022-09-22T20:00:58Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c0e19aac-2c2a-4dfb-8d06-5072f0be9e9e","creationTime":"2022-09-22T19:58:14Z","deletionTime":"2022-09-22T20:00:58Z"}]}},{"name":"18a27cc9-b661-4e5f-b307-1dea899da744","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/18a27cc9-b661-4e5f-b307-1dea899da744","properties":{"accountName":"databaseaccount7298","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:04:54Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"a5bbe9dd-2590-43d2-9385-a654f454810a","creationTime":"2022-09-22T20:04:55Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"87d98832-e009-4af2-8f74-5c20856d5927","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/87d98832-e009-4af2-8f74-5c20856d5927","properties":{"accountName":"restoredaccount2801","apiType":"Gremlin, + Sql","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"7858f963-d1c9-4ebe-8dea-9d930ae34333","creationTime":"2022-09-22T20:21:27Z","deletionTime":"2022-09-22T20:22:01Z"}]}},{"name":"a3d164aa-b957-4c24-aae0-36a9d2e1f745","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/a3d164aa-b957-4c24-aae0-36a9d2e1f745","properties":{"accountName":"cosmosdb-1215","apiType":"MongoDB","creationTime":"2022-09-23T05:55:31Z","deletionTime":"2022-09-23T05:59:22Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"65769666-05f0-48b0-9f23-e209156d00f3","creationTime":"2022-09-23T05:55:32Z","deletionTime":"2022-09-23T05:59:22Z"}]}},{"name":"54e0a2d2-9f85-4e2e-99f4-0d616971b342","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/54e0a2d2-9f85-4e2e-99f4-0d616971b342","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z","oldestRestorableTime":"2022-09-23T19:02:38Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"e42e05d1-02bc-4718-8f0a-d0f24a9ec69f","creationTime":"2022-09-23T19:02:38Z","deletionTime":"2022-09-23T19:06:08Z"}]}},{"name":"17ca6fca-283d-45ae-967e-255b06504aca","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/17ca6fca-283d-45ae-967e-255b06504aca","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T19:06:55Z","deletionTime":"2022-09-23T19:09:57Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"3bda43e9-f2f7-4a85-bf3d-a9d44ced6599","creationTime":"2022-09-23T19:06:56Z","deletionTime":"2022-09-23T19:09:57Z"}]}},{"name":"299f1d88-9f5e-436f-906e-1bfd818e4f7c","location":"Central + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus/restorableDatabaseAccounts/299f1d88-9f5e-436f-906e-1bfd818e4f7c","properties":{"accountName":"cosmosdb-1220","apiType":"Sql","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z","oldestRestorableTime":"2022-09-23T21:15:17Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"82f7d8b8-02da-4237-80f2-644e09ecd750","creationTime":"2022-09-23T21:15:17Z","deletionTime":"2022-09-23T21:16:46Z"}]}},{"name":"ecfda59b-6fbf-43b3-88f7-16be1dce21bc","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/ecfda59b-6fbf-43b3-88f7-16be1dce21bc","properties":{"accountName":"cli000003","apiType":"Table, + Sql","creationTime":"2022-09-29T08:08:59Z","oldestRestorableTime":"2022-09-29T08:08:59Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d8f9d11d-9b3a-4871-8327-1540bd77d2b7","creationTime":"2022-09-29T08:08:59Z"}]}},{"name":"f696c9df-9ec8-4944-8f79-65a850711016","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/f696c9df-9ec8-4944-8f79-65a850711016","properties":{"accountName":"clignlittcgpzzy","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z","oldestRestorableTime":"2022-08-30T08:10:24Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"92fa1f2d-3712-4564-8937-2b91f484d1a0","creationTime":"2022-09-27T01:47:06Z","deletionTime":"2022-09-27T01:47:55Z"}]}},{"name":"da149590-7b48-4992-b349-dbba784e040b","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/da149590-7b48-4992-b349-dbba784e040b","properties":{"accountName":"clijtrpgqdpnn3b","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:26:46Z","deletionTime":"2022-09-27T01:47:56Z","oldestRestorableTime":"2022-08-30T08:10:24Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"d99c84fc-0864-4acd-875b-a99b0f0a3a1b","creationTime":"2022-09-27T01:26:47Z","deletionTime":"2022-09-27T01:47:56Z"}]}},{"name":"74e0b23f-b018-4c2c-bb54-47b0a68a1d84","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/74e0b23f-b018-4c2c-bb54-47b0a68a1d84","properties":{"accountName":"clicgxoecgull32","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z","oldestRestorableTime":"2022-08-30T08:10:24Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"48545b4a-bbc3-4969-92b2-040a5c904224","creationTime":"2022-09-27T02:04:28Z","deletionTime":"2022-09-27T02:06:05Z"}]}},{"name":"171202be-873b-4c7f-8697-6ae7461427c5","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/171202be-873b-4c7f-8697-6ae7461427c5","properties":{"accountName":"cliqser5dhk2vc7","apiType":"Table, + Sql","creationTime":"2022-09-27T01:42:51Z","deletionTime":"2022-09-27T02:06:06Z","oldestRestorableTime":"2022-08-30T08:10:24Z","restorableLocations":[{"locationName":"West + US 2","regionalDatabaseAccountInstanceId":"95b43cf3-dbc9-4c62-a6e6-df8d0ec1bdcb","creationTime":"2022-09-27T01:42:53Z","deletionTime":"2022-09-27T02:06:06Z"}]}},{"name":"9b642d3b-5f86-455a-a77f-5e55dd6df62a","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/9b642d3b-5f86-455a-a77f-5e55dd6df62a","properties":{"accountName":"cliradomcstrzqt","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:40:51Z","deletionTime":"2022-09-29T08:02:39Z","oldestRestorableTime":"2022-08-30T08:10:24Z","restorableLocations":[]}},{"name":"271af5eb-8274-4c30-b6c8-6674e1de772c","location":"West + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/271af5eb-8274-4c30-b6c8-6674e1de772c","properties":{"accountName":"clios2vz3c67xbm","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T08:01:54Z","deletionTime":"2022-09-29T08:02:41Z","oldestRestorableTime":"2022-08-30T08:10:24Z","restorableLocations":[]}},{"name":"fe348596-7806-4215-9994-205ce4c61797","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fe348596-7806-4215-9994-205ce4c61797","properties":{"accountName":"clim673nnvqqp2a","apiType":"Table, + Sql","creationTime":"2022-09-29T08:06:26Z","oldestRestorableTime":"2022-09-29T08:06:26Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"63b4d322-5207-42d1-acee-307e4e082926","creationTime":"2022-09-29T08:06:27Z"}]}},{"name":"a29fac7e-1dfd-43de-af2d-16dc9963483a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a29fac7e-1dfd-43de-af2d-16dc9963483a","properties":{"accountName":"cli-continuous7-rpuif47un","apiType":"Sql","creationTime":"2022-09-29T08:09:19Z","oldestRestorableTime":"2022-09-29T08:09:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8555ef85-3b56-495c-87e0-8edf88816fec","creationTime":"2022-09-29T08:09:21Z"}]}},{"name":"ef1ab499-376b-440b-9714-274c137894d1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ef1ab499-376b-440b-9714-274c137894d1","properties":{"accountName":"cli-continuous30-kxdvzmq7","apiType":"Sql","creationTime":"2022-09-27T01:31:39Z","deletionTime":"2022-09-27T01:34:19Z","oldestRestorableTime":"2022-09-20T01:34:19Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"ab631bdf-f391-4f4e-9926-66d4ad890c89","creationTime":"2022-09-27T01:31:40Z","deletionTime":"2022-09-27T01:34:19Z"}]}},{"name":"e7be7676-52bf-4583-ac76-34f8be3bca33","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/e7be7676-52bf-4583-ac76-34f8be3bca33","properties":{"accountName":"cli2tlvt45lsc57","apiType":"MongoDB","creationTime":"2022-09-27T01:33:32Z","deletionTime":"2022-09-27T01:38:28Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"95e43b27-9efa-40d7-8182-0209583f78f2","creationTime":"2022-09-27T01:33:33Z","deletionTime":"2022-09-27T01:38:28Z"}]}},{"name":"a074b24f-4638-463e-9d31-88970b22ca60","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/a074b24f-4638-463e-9d31-88970b22ca60","properties":{"accountName":"cli-continuous7-cvqz7r44s","apiType":"Sql","creationTime":"2022-09-27T01:37:45Z","deletionTime":"2022-09-27T01:39:32Z","oldestRestorableTime":"2022-09-20T01:39:32Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bfc35f66-4ba7-44ca-936b-e69fad111dec","creationTime":"2022-09-27T01:37:46Z","deletionTime":"2022-09-27T01:39:32Z"}]}},{"name":"4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/4bdc9ac4-97dd-4259-93cb-a3a0bf94fa6c","properties":{"accountName":"cli-continuous7-g7hrwdarh","apiType":"Sql","creationTime":"2022-09-27T01:38:57Z","deletionTime":"2022-09-27T01:40:46Z","oldestRestorableTime":"2022-09-20T01:39:56Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c6eaf88e-53c4-4145-859d-78d799a89a17","creationTime":"2022-09-27T01:38:58Z","deletionTime":"2022-09-27T01:40:46Z"}]}},{"name":"0d611fa5-5ed5-4d2d-87a6-df1528688b9e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0d611fa5-5ed5-4d2d-87a6-df1528688b9e","properties":{"accountName":"cliirstu7gvuk2c","apiType":"Table, + Sql","creationTime":"2022-09-27T01:44:31Z","deletionTime":"2022-09-27T01:48:36Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"daf7bad9-7c8f-448d-944f-c10a2aa27bb0","creationTime":"2022-09-27T01:44:33Z","deletionTime":"2022-09-27T01:48:36Z"}]}},{"name":"be4132aa-25e3-4190-bf33-f62c1bd7ec64","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/be4132aa-25e3-4190-bf33-f62c1bd7ec64","properties":{"accountName":"cliizxq4dum5ro4","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:27:11Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3f120bf2-a439-4b88-b3d8-1b487ac9f930","creationTime":"2022-09-27T01:27:12Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"8fe52466-47c5-40f3-9f36-6d638c0a00f9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/8fe52466-47c5-40f3-9f36-6d638c0a00f9","properties":{"accountName":"cli7fraszcexz4a","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"0788e199-be04-4bb0-aa91-1b623007968a","creationTime":"2022-09-27T01:48:34Z","deletionTime":"2022-09-27T01:49:25Z"}]}},{"name":"d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d6c6b85b-d3a8-4dbd-933b-08c4b2bcbce2","properties":{"accountName":"clibfcsaiwj6xsw","apiType":"Sql","creationTime":"2022-09-27T01:46:58Z","deletionTime":"2022-09-27T01:52:05Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"bb0f6644-a57e-4eaa-949a-ed9f691bc837","creationTime":"2022-09-27T01:46:59Z","deletionTime":"2022-09-27T01:52:05Z"}]}},{"name":"fa3e3b38-588f-435a-834b-995e7a2a8313","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fa3e3b38-588f-435a-834b-995e7a2a8313","properties":{"accountName":"clijf6qip7ivsdj","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:54Z","deletionTime":"2022-09-27T01:56:52Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cc8f867c-020e-43f5-89fe-97f965cdff7a","creationTime":"2022-09-27T01:52:55Z","deletionTime":"2022-09-27T01:56:52Z"}]}},{"name":"82d828c0-126f-4308-b3af-b469664de0be","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/82d828c0-126f-4308-b3af-b469664de0be","properties":{"accountName":"clivzttqgtrnzjo","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3e348add-4a98-4e80-9653-acc39f4d915a","creationTime":"2022-09-27T01:52:02Z","deletionTime":"2022-09-27T01:57:13Z"}]}},{"name":"ba0000ba-79c2-46b6-ae82-149488e957e5","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/ba0000ba-79c2-46b6-ae82-149488e957e5","properties":{"accountName":"cli-continuous7-2nnyqqmlj","apiType":"Sql","creationTime":"2022-09-27T01:57:34Z","deletionTime":"2022-09-27T01:59:22Z","oldestRestorableTime":"2022-09-20T01:59:22Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"9dbb7c87-c163-4640-b60d-7fd37de75094","creationTime":"2022-09-27T01:57:35Z","deletionTime":"2022-09-27T01:59:22Z"}]}},{"name":"aad7d522-8586-4f6c-b31f-1c8d815a3cef","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/aad7d522-8586-4f6c-b31f-1c8d815a3cef","properties":{"accountName":"cli-periodic-rcvge62ox77f","apiType":"Sql","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z","oldestRestorableTime":"2022-09-27T01:59:35Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"dba68b83-9a66-4e49-85cc-b124e47ac411","creationTime":"2022-09-27T01:59:35Z","deletionTime":"2022-09-27T02:01:21Z"}]}},{"name":"df658e6e-2b10-4420-9396-27be0be78ad9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/df658e6e-2b10-4420-9396-27be0be78ad9","properties":{"accountName":"climnsy4a3skf4e","apiType":"Table, + Sql","creationTime":"2022-09-27T02:08:37Z","deletionTime":"2022-09-27T02:13:18Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"989ee369-609f-4556-af59-87f8e301e5df","creationTime":"2022-09-27T02:08:38Z","deletionTime":"2022-09-27T02:13:18Z"}]}},{"name":"430fd5b2-9a43-4198-b039-695c8ac0b97a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/430fd5b2-9a43-4198-b039-695c8ac0b97a","properties":{"accountName":"cliuuxnws2kc4h4","apiType":"Table, + Sql","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"35955780-c87a-43ab-9ce7-6e5ae30ca8a4","creationTime":"2022-09-27T02:26:19Z","deletionTime":"2022-09-27T02:28:18Z"}]}},{"name":"d7c21e24-bfe4-4e61-8655-147c0ce60df8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/d7c21e24-bfe4-4e61-8655-147c0ce60df8","properties":{"accountName":"clio6vtjrqutulp","apiType":"Table, + Sql","creationTime":"2022-09-27T02:04:47Z","deletionTime":"2022-09-27T02:28:19Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a0f62915-596e-4648-a260-7b4676e31795","creationTime":"2022-09-27T02:04:48Z","deletionTime":"2022-09-27T02:28:19Z"}]}},{"name":"6077c6fd-fec1-4d36-9392-cf74a21ee94d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/6077c6fd-fec1-4d36-9392-cf74a21ee94d","properties":{"accountName":"cli57uq3h2kkwtz","apiType":"Table, + Sql","creationTime":"2022-09-27T02:51:27Z","deletionTime":"2022-09-27T02:56:04Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"270a7c2b-3a1e-485e-ae4b-d616ba0ffdc5","creationTime":"2022-09-27T02:51:28Z","deletionTime":"2022-09-27T02:56:04Z"}]}},{"name":"cff3e3f2-789a-4b36-8c92-fc510566f0c1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/cff3e3f2-789a-4b36-8c92-fc510566f0c1","properties":{"accountName":"clisqrjwresrmns","apiType":"Table, + Sql","creationTime":"2022-09-27T03:02:10Z","deletionTime":"2022-09-27T03:07:06Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"6e132cc1-198c-4062-a8c4-89b23b0edd22","creationTime":"2022-09-27T03:02:11Z","deletionTime":"2022-09-27T03:07:06Z"}]}},{"name":"18cbad77-e71c-4b25-b2b6-56dfb818ab04","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/18cbad77-e71c-4b25-b2b6-56dfb818ab04","properties":{"accountName":"cliwqqkb4lx5o24","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T20:50:02Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cf1ec1ad-d0f2-4112-ad2d-84c2f893c61b","creationTime":"2022-09-27T20:50:03Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9e075ccb-9cfd-4ee4-877d-6c3ff68391b0","properties":{"accountName":"cliqmw6pogmli45","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"b2c2d9c8-0ff6-41da-afb7-bc325f2a1530","creationTime":"2022-09-27T21:11:40Z","deletionTime":"2022-09-27T21:14:12Z"}]}},{"name":"c63599a9-c1b1-489e-8f3f-d0e384ad324a","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c63599a9-c1b1-489e-8f3f-d0e384ad324a","properties":{"accountName":"cli4bsrvxcv36tl","apiType":"Gremlin, + Sql","creationTime":"2022-09-27T22:05:37Z","deletionTime":"2022-09-27T22:10:29Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7657991d-64e8-4e87-8d5c-ed30b9696ed4","creationTime":"2022-09-27T22:05:39Z","deletionTime":"2022-09-27T22:10:29Z"}]}},{"name":"b86e019e-d0a2-44e0-87ac-4389d486c54d","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b86e019e-d0a2-44e0-87ac-4389d486c54d","properties":{"accountName":"clizshznvykqnzv","apiType":"MongoDB","creationTime":"2022-09-27T23:17:24Z","deletionTime":"2022-09-27T23:22:30Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c4006bad-035d-41d1-9fd2-40b6641eda0c","creationTime":"2022-09-27T23:17:25Z","deletionTime":"2022-09-27T23:22:30Z"}]}},{"name":"7defba14-ba7a-4f02-8361-2e192b3bea48","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/7defba14-ba7a-4f02-8361-2e192b3bea48","properties":{"accountName":"clistua677xy3zd","apiType":"Table, + Sql","creationTime":"2022-09-28T02:30:27Z","deletionTime":"2022-09-28T02:34:13Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"3ad8d86f-8001-4dad-9e1b-f6a0170ee68f","creationTime":"2022-09-28T02:30:28Z","deletionTime":"2022-09-28T02:34:13Z"}]}},{"name":"b9ea5317-740f-4e15-8cd3-07214a13843e","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/b9ea5317-740f-4e15-8cd3-07214a13843e","properties":{"accountName":"clifohay6exr54f","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:21:23Z","deletionTime":"2022-09-29T02:25:40Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"db2aabe2-d723-42ee-abd3-591c7d392c89","creationTime":"2022-09-29T02:21:24Z","deletionTime":"2022-09-29T02:25:40Z"}]}},{"name":"33bd86c4-800b-4fca-a11a-c11e96fc1a9f","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/33bd86c4-800b-4fca-a11a-c11e96fc1a9f","properties":{"accountName":"clissxkyc5utyq2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"a05b4080-b30e-46ee-a3af-fa99221d79f5","creationTime":"2022-09-29T02:37:46Z","deletionTime":"2022-09-29T02:38:31Z"}]}},{"name":"f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f11f3f7f-6aa1-4f00-b0d5-c259f9975ac1","properties":{"accountName":"clioezk6mq4brh2","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T02:16:59Z","deletionTime":"2022-09-29T02:38:32Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"06e35303-d246-4839-a412-3dd6b50442f2","creationTime":"2022-09-29T02:17:00Z","deletionTime":"2022-09-29T02:38:32Z"}]}},{"name":"24ce365d-3772-410c-b5a4-c040e2e2c737","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/24ce365d-3772-410c-b5a4-c040e2e2c737","properties":{"accountName":"cli7velxbwelpnd","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:25:11Z","deletionTime":"2022-09-29T07:29:11Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"f895d646-7338-4417-a964-c374f9a113bb","creationTime":"2022-09-29T07:25:12Z","deletionTime":"2022-09-29T07:29:11Z"}]}},{"name":"2b7ef41c-de96-4d76-8959-58fb40b3f4fc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2b7ef41c-de96-4d76-8959-58fb40b3f4fc","properties":{"accountName":"cli2nmd2acsdvq2","apiType":"MongoDB","creationTime":"2022-09-29T07:32:57Z","deletionTime":"2022-09-29T07:37:10Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"cbc92c38-f75d-463c-a639-8a8ac4ed01c6","creationTime":"2022-09-29T07:32:58Z","deletionTime":"2022-09-29T07:37:10Z"}]}},{"name":"f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/f5b1a6ce-d525-4d60-a05c-dd4d1afeddc8","properties":{"accountName":"cli5d7r5woval7l","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:41:00Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"10c6aaeb-9fdd-4de8-b7c0-d9c93ba73c47","creationTime":"2022-09-29T07:41:00Z","deletionTime":"2022-09-29T07:41:54Z"}]}},{"name":"fd599524-1dff-4ab5-a5ec-ca81a1222ea7","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/fd599524-1dff-4ab5-a5ec-ca81a1222ea7","properties":{"accountName":"cli5yf7nmnwddpv","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:19:50Z","deletionTime":"2022-09-29T07:41:54Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"8680b861-bef3-493d-9344-27f17b06b5e3","creationTime":"2022-09-29T07:19:51Z","deletionTime":"2022-09-29T07:41:54Z"}]}},{"name":"9ea6fb52-a251-464b-aace-42338f28d639","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/9ea6fb52-a251-464b-aace-42338f28d639","properties":{"accountName":"clijhukzjokpayf","apiType":"Sql","creationTime":"2022-09-29T07:39:00Z","deletionTime":"2022-09-29T07:43:07Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"84631b94-7800-414a-be43-353118e84b4b","creationTime":"2022-09-29T07:39:01Z","deletionTime":"2022-09-29T07:43:07Z"}]}},{"name":"844b164e-64e2-4fad-8594-095b10b18bbc","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/844b164e-64e2-4fad-8594-095b10b18bbc","properties":{"accountName":"cli-continuous7-rypbpuzam","apiType":"Sql","creationTime":"2022-09-29T07:45:04Z","deletionTime":"2022-09-29T07:46:55Z","oldestRestorableTime":"2022-09-22T07:46:55Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"71c587ae-6da8-453d-8865-a48d24fe21a9","creationTime":"2022-09-29T07:45:06Z","deletionTime":"2022-09-29T07:46:55Z"}]}},{"name":"572c38e5-5506-42c7-986f-2faf4e6b22e1","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/572c38e5-5506-42c7-986f-2faf4e6b22e1","properties":{"accountName":"clintrakgcxza7v","apiType":"Gremlin, + Sql","creationTime":"2022-09-29T07:45:52Z","deletionTime":"2022-09-29T07:51:21Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"4208e04d-fda7-42f0-b1b2-3b7e3769cde7","creationTime":"2022-09-29T07:45:53Z","deletionTime":"2022-09-29T07:51:21Z"}]}},{"name":"0f76ace0-a6ac-41cd-afab-254a9e03f04c","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0f76ace0-a6ac-41cd-afab-254a9e03f04c","properties":{"accountName":"cli65wqr6zeh554","apiType":"Table, + Sql","creationTime":"2022-09-29T07:50:21Z","deletionTime":"2022-09-29T07:55:12Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7a1e5609-4c43-420b-ac67-0c8a5af933cb","creationTime":"2022-09-29T07:50:23Z","deletionTime":"2022-09-29T07:55:12Z"}]}},{"name":"443a5cfb-d99b-4128-b2e4-6f34c7aa9e93","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/443a5cfb-d99b-4128-b2e4-6f34c7aa9e93","properties":{"accountName":"cli2xh3uatq2hqo","apiType":"Table, + Sql","creationTime":"2022-09-29T07:53:53Z","deletionTime":"2022-09-29T07:57:15Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"c7653c0c-acf7-455a-93a7-303966fc571e","creationTime":"2022-09-29T07:53:54Z","deletionTime":"2022-09-29T07:57:15Z"}]}},{"name":"06fb5229-145a-492c-aff7-e33709cc2157","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/06fb5229-145a-492c-aff7-e33709cc2157","properties":{"accountName":"cli-continuous30-bnfya55h","apiType":"Sql","creationTime":"2022-09-29T08:00:30Z","deletionTime":"2022-09-29T08:03:05Z","oldestRestorableTime":"2022-09-22T08:03:05Z","restorableLocations":[]}},{"name":"c6db33d1-5809-4dd0-b4bb-3821107c16e9","location":"East + US 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/c6db33d1-5809-4dd0-b4bb-3821107c16e9","properties":{"accountName":"cli-periodic-pslgebnyz6df","apiType":"Sql","creationTime":"2022-09-29T08:04:14Z","deletionTime":"2022-09-29T08:07:05Z","oldestRestorableTime":"2022-09-29T08:04:14Z","restorableLocations":[]}},{"name":"c075d03d-65ba-4c2b-b5b9-70d616464e64","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/c075d03d-65ba-4c2b-b5b9-70d616464e64","properties":{"accountName":"databaseaccount4652","apiType":"MongoDB","creationTime":"2022-09-21T01:06:10Z","deletionTime":"2022-09-21T01:10:15Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f846826a-cbfb-4e6c-b65e-ba5e45a42935","creationTime":"2022-09-21T01:06:11Z","deletionTime":"2022-09-21T01:10:15Z"}]}},{"name":"dd3492d3-2241-4aa0-8090-5d4837791a18","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dd3492d3-2241-4aa0-8090-5d4837791a18","properties":{"accountName":"r-database-account-4793","apiType":"Sql","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f807b42c-e2e3-4405-a22b-34f755faa2dd","creationTime":"2022-09-22T09:59:25Z","deletionTime":"2022-09-22T10:00:02Z"}]}},{"name":"6ffa00ad-76be-4902-8c0c-a24a9664198d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6ffa00ad-76be-4902-8c0c-a24a9664198d","properties":{"accountName":"r-database-account-6413","apiType":"Sql","creationTime":"2022-09-22T10:11:21Z","deletionTime":"2022-09-22T10:12:05Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8b716a12-19e5-4e9c-9762-2c0aeecde0e2","creationTime":"2022-09-22T10:11:22Z","deletionTime":"2022-09-22T10:12:05Z"}]}},{"name":"a2ef998e-59cd-4758-8128-22b779ce80d7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a2ef998e-59cd-4758-8128-22b779ce80d7","properties":{"accountName":"dbaccount-7414","apiType":"Sql","creationTime":"2022-09-22T10:24:02Z","deletionTime":"2022-09-22T10:28:31Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"46d9e60f-7559-4c08-b701-d5d71f49c627","creationTime":"2022-09-22T10:24:03Z","deletionTime":"2022-09-22T10:28:31Z"}]}},{"name":"8065f801-622f-4790-a193-eca70ff70980","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/8065f801-622f-4790-a193-eca70ff70980","properties":{"accountName":"dbaccount-7392","apiType":"Sql","creationTime":"2022-09-22T10:30:36Z","deletionTime":"2022-09-22T10:35:24Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8419663f-63d2-4212-918a-10593792436a","creationTime":"2022-09-22T10:30:37Z","deletionTime":"2022-09-22T10:35:24Z"}]}},{"name":"1b77a4f0-008d-4fd6-8e8b-207dee8081ce","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1b77a4f0-008d-4fd6-8e8b-207dee8081ce","properties":{"accountName":"cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:00:06Z","deletionTime":"2022-09-23T06:15:45Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"b9276b60-e3aa-4d83-9890-414dda374e44","creationTime":"2022-09-23T06:00:07Z","deletionTime":"2022-09-23T06:15:45Z"}]}},{"name":"0b2dbf4f-9c0e-4d82-8622-9c799c794283","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0b2dbf4f-9c0e-4d82-8622-9c799c794283","properties":{"accountName":"restored-cosmosdb-1214","apiType":"Sql","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f12242b8-cc7d-41fa-8856-a5098f0ef5fb","creationTime":"2022-09-23T06:14:58Z","deletionTime":"2022-09-23T06:15:46Z"}]}},{"name":"3e970559-dc20-4dc1-bb7c-63b39c53437d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3e970559-dc20-4dc1-bb7c-63b39c53437d","properties":{"accountName":"cli7tvtffqmzg2x","apiType":"MongoDB","creationTime":"2022-09-27T01:23:44Z","deletionTime":"2022-09-27T01:25:49Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f6ef2357-4de5-4e05-adcb-7df2620c7265","creationTime":"2022-09-27T01:23:45Z","deletionTime":"2022-09-27T01:25:49Z"}]}},{"name":"dfb0c539-2ac5-4da2-87b7-5583fd592e50","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/dfb0c539-2ac5-4da2-87b7-5583fd592e50","properties":{"accountName":"clifbopbwgd6xro","apiType":"MongoDB","creationTime":"2022-09-27T01:23:51Z","deletionTime":"2022-09-27T01:27:52Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c6598e7f-9fb4-4982-b19c-c0ac0522b774","creationTime":"2022-09-27T01:23:52Z","deletionTime":"2022-09-27T01:27:52Z"}]}},{"name":"d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d02a9746-b1b3-4b60-bfcf-37d7009ab6c2","properties":{"accountName":"cliwt36p2ocpasl","apiType":"Sql","creationTime":"2022-09-27T01:27:09Z","deletionTime":"2022-09-27T01:29:33Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"541070ef-8704-4a68-ae22-7139d0497bac","creationTime":"2022-09-27T01:27:10Z","deletionTime":"2022-09-27T01:29:33Z"}]}},{"name":"e3209f1f-6665-44b6-9e98-a65267c8eace","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e3209f1f-6665-44b6-9e98-a65267c8eace","properties":{"accountName":"climhpourc54ilc","apiType":"Sql","creationTime":"2022-09-27T01:28:43Z","deletionTime":"2022-09-27T01:30:04Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"c9cb47e7-1bd8-4dd9-904a-1ad1fb3b9f8d","creationTime":"2022-09-27T01:28:44Z","deletionTime":"2022-09-27T01:30:04Z"}]}},{"name":"f0489db4-e469-497a-acf7-5f5e804314ec","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f0489db4-e469-497a-acf7-5f5e804314ec","properties":{"accountName":"clim7hp7e4onkoq","apiType":"Sql","creationTime":"2022-09-27T01:24:29Z","deletionTime":"2022-09-27T01:33:06Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"f55ed508-7711-4765-b84a-1ef312f8e2d9","creationTime":"2022-09-27T01:24:30Z","deletionTime":"2022-09-27T01:33:06Z"}]}},{"name":"6e62a2ab-361e-41ef-808a-365c7efe4000","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6e62a2ab-361e-41ef-808a-365c7efe4000","properties":{"accountName":"clipep3b3pnqskg","apiType":"Sql","creationTime":"2022-09-27T01:27:39Z","deletionTime":"2022-09-27T01:46:11Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"d58d0ae7-4825-49b1-9788-dd911a266d3d","creationTime":"2022-09-27T01:27:40Z","deletionTime":"2022-09-27T01:46:11Z"}]}},{"name":"f6a5da94-f848-48aa-919a-49677f7512d9","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f6a5da94-f848-48aa-919a-49677f7512d9","properties":{"accountName":"clicv4vtix3stxc","apiType":"Sql","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"Central + US","regionalDatabaseAccountInstanceId":"ebbc89a0-d98c-40c4-b663-0247b95683a0","creationTime":"2022-09-27T01:42:34Z","deletionTime":"2022-09-27T01:51:05Z"}]}},{"name":"b6ef3b94-853f-4e16-b28a-22315a17b637","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b6ef3b94-853f-4e16-b28a-22315a17b637","properties":{"accountName":"clilfjre2nyljce","apiType":"Sql","creationTime":"2022-09-27T21:21:09Z","deletionTime":"2022-09-27T21:25:44Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"311d9a8a-4732-415c-b5a2-251fc3c96502","creationTime":"2022-09-27T21:21:10Z","deletionTime":"2022-09-27T21:25:44Z"}]}},{"name":"a6561cab-05e1-41ad-96c0-17097d0a8b79","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/a6561cab-05e1-41ad-96c0-17097d0a8b79","properties":{"accountName":"cliqdq57ftueh6u","apiType":"Sql","creationTime":"2022-09-27T21:32:28Z","deletionTime":"2022-09-27T21:36:38Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"6c20b989-cfc9-4b0f-b817-16ca05afa11f","creationTime":"2022-09-27T21:32:29Z","deletionTime":"2022-09-27T21:36:38Z"}]}},{"name":"67c72b24-16e3-4581-a088-1592941669c4","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/67c72b24-16e3-4581-a088-1592941669c4","properties":{"accountName":"clixv6bx7zh5j24","apiType":"Sql","creationTime":"2022-09-27T22:24:27Z","deletionTime":"2022-09-27T22:49:54Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"62d9ba7d-2990-4019-99ab-17b688f89825","creationTime":"2022-09-27T22:24:28Z","deletionTime":"2022-09-27T22:49:54Z"}]}},{"name":"563d8fb3-9cfd-46e5-897f-ce579ebeabfd","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/563d8fb3-9cfd-46e5-897f-ce579ebeabfd","properties":{"accountName":"cliqrr452pq6lgf","apiType":"Sql","creationTime":"2022-09-28T00:15:58Z","deletionTime":"2022-09-28T00:17:02Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"244e7f57-118e-45c6-9813-c5d0d0bda7b0","creationTime":"2022-09-28T00:15:59Z","deletionTime":"2022-09-28T00:17:02Z"}]}},{"name":"ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/ae7f590f-a4ba-4b87-a5cb-4b885e90cd11","properties":{"accountName":"clif7svi3ljvdts","apiType":"Sql","creationTime":"2022-09-28T00:21:55Z","deletionTime":"2022-09-28T00:31:40Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"a92426fc-4911-4365-9bd4-24b88976e04d","creationTime":"2022-09-28T00:21:56Z","deletionTime":"2022-09-28T00:31:40Z"}]}},{"name":"5159f548-b8be-4b98-8a98-61cfd767528d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/5159f548-b8be-4b98-8a98-61cfd767528d","properties":{"accountName":"clihscwhfnyafkx","apiType":"Sql","creationTime":"2022-09-28T01:15:19Z","deletionTime":"2022-09-28T01:17:21Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"03b1097f-94ab-45a4-9ce9-590941a96203","creationTime":"2022-09-28T01:15:20Z","deletionTime":"2022-09-28T01:17:21Z"}]}},{"name":"f22a056c-97d7-4431-91ab-bffab7cf4528","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/f22a056c-97d7-4431-91ab-bffab7cf4528","properties":{"accountName":"climlxnp4g67jvc","apiType":"Sql","creationTime":"2022-09-28T01:21:47Z","deletionTime":"2022-09-28T01:51:51Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2ab9d417-dba5-4af7-9fa5-b328856c0325","creationTime":"2022-09-28T01:21:48Z","deletionTime":"2022-09-28T01:51:51Z"}]}},{"name":"890755e4-291c-49fc-8d7b-1d8ceceedf2b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/890755e4-291c-49fc-8d7b-1d8ceceedf2b","properties":{"accountName":"clilswk3nzmegrl","apiType":"MongoDB","creationTime":"2022-09-29T02:02:53Z","deletionTime":"2022-09-29T02:05:38Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"f9343458-bf14-48e7-b4b7-493818091c53","creationTime":"2022-09-29T02:02:54Z","deletionTime":"2022-09-29T02:05:38Z"}]}},{"name":"6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/6f3b85c6-3ba1-4ede-b4de-ffd5c989a2a0","properties":{"accountName":"cliceqcyfpfau2w","apiType":"MongoDB","creationTime":"2022-09-29T02:03:11Z","deletionTime":"2022-09-29T02:05:43Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"d26c00fd-dd5e-4be9-aa89-3f2e44931c7b","creationTime":"2022-09-29T02:03:12Z","deletionTime":"2022-09-29T02:05:43Z"}]}},{"name":"90752161-0af9-4301-b39a-9f4dc54db927","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/90752161-0af9-4301-b39a-9f4dc54db927","properties":{"accountName":"cli4krkh6rwk5z7","apiType":"Sql","creationTime":"2022-09-29T02:01:56Z","deletionTime":"2022-09-29T02:05:50Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"89e272ae-13a6-45e6-a9af-838f431264aa","creationTime":"2022-09-29T02:01:57Z","deletionTime":"2022-09-29T02:05:50Z"}]}},{"name":"46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/46b6f358-ec57-4221-80ff-bc8d4bbbe1fb","properties":{"accountName":"cliobpept76w62d","apiType":"Sql","creationTime":"2022-09-29T02:02:12Z","deletionTime":"2022-09-29T02:05:52Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"80c0d325-aab3-4bcc-99fa-4fec50b4ead5","creationTime":"2022-09-29T02:02:13Z","deletionTime":"2022-09-29T02:05:52Z"}]}},{"name":"d6a33f34-ca28-41a5-998c-96eca17087eb","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d6a33f34-ca28-41a5-998c-96eca17087eb","properties":{"accountName":"clisiwzxvbsb7cp","apiType":"Sql","creationTime":"2022-09-29T02:08:56Z","deletionTime":"2022-09-29T02:13:28Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87e13c78-6082-48bd-8920-e893e38257ab","creationTime":"2022-09-29T02:08:57Z","deletionTime":"2022-09-29T02:13:28Z"}]}},{"name":"0e185b32-f58f-4a64-977e-4f51c1988979","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/0e185b32-f58f-4a64-977e-4f51c1988979","properties":{"accountName":"clihrrtkij2qcr3","apiType":"MongoDB","creationTime":"2022-09-29T02:03:15Z","deletionTime":"2022-09-29T02:29:05Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"29e2da72-c85a-4477-8a4e-bfe792f96c62","creationTime":"2022-09-29T02:03:16Z","deletionTime":"2022-09-29T02:29:05Z"}]}},{"name":"9245e4d6-5a50-47e0-bb77-64e18f2d2e04","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9245e4d6-5a50-47e0-bb77-64e18f2d2e04","properties":{"accountName":"clicw75msdcgeob","apiType":"MongoDB","creationTime":"2022-09-29T02:04:18Z","deletionTime":"2022-09-29T02:29:35Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"12413e28-fe6a-4b57-bbe0-b65d0f4ec70b","creationTime":"2022-09-29T02:04:20Z","deletionTime":"2022-09-29T02:29:35Z"}]}},{"name":"e341166b-a559-4c2b-baad-fd219a6b3079","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/e341166b-a559-4c2b-baad-fd219a6b3079","properties":{"accountName":"cliwkgnwb5f6uow","apiType":"Sql","creationTime":"2022-09-29T02:08:50Z","deletionTime":"2022-09-29T02:33:47Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"9eda1eae-251a-47d1-b141-d3e188862f16","creationTime":"2022-09-29T02:08:52Z","deletionTime":"2022-09-29T02:33:47Z"}]}},{"name":"672a69b0-34ed-4149-9797-af1388f4d04d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/672a69b0-34ed-4149-9797-af1388f4d04d","properties":{"accountName":"cliyhp6cgyizvy3","apiType":"Sql","creationTime":"2022-09-29T07:06:14Z","deletionTime":"2022-09-29T07:08:27Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"baa0854b-3927-4b9b-90c2-2cfd0ffa8719","creationTime":"2022-09-29T07:06:15Z","deletionTime":"2022-09-29T07:08:27Z"}]}},{"name":"3b16a147-c747-499d-8766-af387fccd08d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/3b16a147-c747-499d-8766-af387fccd08d","properties":{"accountName":"cliwah4kqwdfuce","apiType":"Sql","creationTime":"2022-09-29T07:05:53Z","deletionTime":"2022-09-29T07:08:29Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"53f43a18-cde0-4425-9a8e-ea0de5ed4c3b","creationTime":"2022-09-29T07:05:54Z","deletionTime":"2022-09-29T07:08:29Z"}]}},{"name":"276ac4e3-f1a9-4795-805b-58af9ca9581d","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/276ac4e3-f1a9-4795-805b-58af9ca9581d","properties":{"accountName":"cli74dickoyzgiz","apiType":"MongoDB","creationTime":"2022-09-29T07:07:48Z","deletionTime":"2022-09-29T07:10:00Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"2d4e87ca-a3fa-4e79-b6ca-1baa57d74180","creationTime":"2022-09-29T07:07:49Z","deletionTime":"2022-09-29T07:10:00Z"}]}},{"name":"b1c2a6ec-eb35-486a-b357-9f33a13c1839","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b1c2a6ec-eb35-486a-b357-9f33a13c1839","properties":{"accountName":"climyhwqfc6zfad","apiType":"MongoDB","creationTime":"2022-09-29T07:07:45Z","deletionTime":"2022-09-29T07:10:30Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e4474d2d-61c6-4244-bb0a-3fbd53198597","creationTime":"2022-09-29T07:07:46Z","deletionTime":"2022-09-29T07:10:30Z"}]}},{"name":"d14175bf-4a56-431d-8bca-f5930cc0bb0b","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d14175bf-4a56-431d-8bca-f5930cc0bb0b","properties":{"accountName":"clincjhu52apn5y","apiType":"Sql","creationTime":"2022-09-29T07:11:33Z","deletionTime":"2022-09-29T07:15:51Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"8ce95043-a322-4b95-a5ed-d24199840374","creationTime":"2022-09-29T07:11:34Z","deletionTime":"2022-09-29T07:15:51Z"}]}},{"name":"45fa1d23-fdce-4019-89b0-d30326434019","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/45fa1d23-fdce-4019-89b0-d30326434019","properties":{"accountName":"clirscar5mtlt4w","apiType":"MongoDB","creationTime":"2022-09-29T07:07:20Z","deletionTime":"2022-09-29T07:31:57Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"e182fe56-78e7-4c45-8783-dec463376e2f","creationTime":"2022-09-29T07:07:21Z","deletionTime":"2022-09-29T07:31:57Z"}]}},{"name":"b9f7d5fb-be12-4bab-8424-9d8c9120e180","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/b9f7d5fb-be12-4bab-8424-9d8c9120e180","properties":{"accountName":"cliovv2pinyhiu6","apiType":"MongoDB","creationTime":"2022-09-29T07:08:08Z","deletionTime":"2022-09-29T07:33:27Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"19e4d46c-9ef9-48cd-a320-702c6c9d7746","creationTime":"2022-09-29T07:08:09Z","deletionTime":"2022-09-29T07:33:27Z"}]}},{"name":"540ad32c-bcdf-4eff-8645-3f89ad7a89c7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/540ad32c-bcdf-4eff-8645-3f89ad7a89c7","properties":{"accountName":"cliuxtdltdzacvf","apiType":"Sql","creationTime":"2022-09-29T07:12:08Z","deletionTime":"2022-09-29T07:37:12Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"05861eb5-d0c6-4497-83e3-248d5ee576c0","creationTime":"2022-09-29T07:12:09Z","deletionTime":"2022-09-29T07:37:12Z"}]}},{"name":"9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/9dad7ecd-c4a4-418d-8b1a-2b65f14917b7","properties":{"accountName":"cliabmdaxkqpzo7","apiType":"Sql","creationTime":"2022-09-29T07:33:49Z","deletionTime":"2022-09-29T07:58:50Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"West + US","regionalDatabaseAccountInstanceId":"87589c6d-f091-4778-9118-8b70c299f205","creationTime":"2022-09-29T07:33:50Z","deletionTime":"2022-09-29T07:58:50Z"}]}},{"name":"647fa227-e369-4b93-8c3d-e261644d2fcf","location":"West + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/647fa227-e369-4b93-8c3d-e261644d2fcf","properties":{"accountName":"clisb32fuxaefpe","apiType":"Sql","creationTime":"2022-09-29T07:35:16Z","deletionTime":"2022-09-29T08:07:45Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[]}},{"name":"a6281031-0f67-434a-90a6-ddbfa373291c","location":"East + US","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus/restorableDatabaseAccounts/a6281031-0f67-434a-90a6-ddbfa373291c","properties":{"accountName":"mongo-continuous-1274","apiType":"MongoDB","creationTime":"2022-09-23T06:18:38Z","deletionTime":"2022-09-23T06:22:03Z","oldestRestorableTime":"2022-08-30T08:10:23Z","restorableLocations":[{"locationName":"East + US","regionalDatabaseAccountInstanceId":"40851bab-343f-4980-8c2d-28658c031250","creationTime":"2022-09-23T06:18:39Z","deletionTime":"2022-09-23T06:22:03Z"}]}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/restorableDatabaseAccounts?api-version=2022-08-15-preview&%24skiptoken=FY%2fRSsMwFED%2fJc%2bmSeOKtTCk0oEPzkmZH3CT3tYwm4Sb2yqO%2fbv1A845nKsI%2bMOvPlyyaK7i7dSfXw4f%2fen9IBrxyZxyo9QMASacMXABvwth4eKs8mKzI5%2fYx5BVaXR1b%2btROrCV3I2Vk4%2buBFk%2f6KrW5c6AHVSiuPoBKaujdxRzHLnoolv%2bzd2zIswcCewXdsBgIWPrXFwC5ydIXq4buLX2RhsjdS3LSibC1eO3uN0JoLmdJsIJGIdzvGDYBtr%2bKG5%2f"}' headers: cache-control: - no-cache content-length: - - '30306' + - '80268' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:32:18 GMT + - Thu, 29 Sep 2022 08:10:24 GMT expires: - '-1' pragma: @@ -918,7 +1119,6 @@ interactions: - '' - '' - '' - - '' status: code: 200 message: OK @@ -936,12 +1136,13 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_table_account_restore_using_create000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001","name":"cli_test_cosmosdb_table_account_restore_using_create000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001","name":"cli_test_cosmosdb_table_account_restore_using_create000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T08:05:41Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -950,7 +1151,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:36:19 GMT + - Thu, 29 Sep 2022 08:14:24 GMT expires: - '-1' pragma: @@ -968,8 +1169,8 @@ interactions: body: '{"location": "westus2", "kind": "GlobalDocumentDB", "properties": {"locations": [{"locationName": "westus2", "failoverPriority": 0, "isZoneRedundant": false}], "databaseAccountOfferType": "Standard", "apiProperties": {}, "createMode": "Restore", - "restoreParameters": {"restoreMode": "PointInTime", "restoreSource": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e175b9a1-eeae-4331-b509-8516a500995b", - "restoreTimestampInUtc": "2022-09-20T07:35:06.000Z"}}}' + "restoreParameters": {"restoreSource": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/ecfda59b-6fbf-43b3-88f7-16be1dce21bc", + "restoreTimestampInUtc": "2022-09-29T08:12:59.000Z", "restoreMode": "PointInTime"}}}' headers: Accept: - application/json @@ -986,31 +1187,31 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:36:21.8468225Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"f767eee7-5c33-4a6e-a68f-5560dbada726","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:14:26.6679526Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"1346e1f3-3069-4e05-b399-38b7d7cbf9dd","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000003-westus2.documents.azure.com:443/","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e175b9a1-eeae-4331-b509-8516a500995b","restoreTimestampInUtc":"2022-09-20T07:35:06Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/ecfda59b-6fbf-43b3-88f7-16be1dce21bc","restoreTimestampInUtc":"2022-09-29T08:12:59Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:14:26.6679526Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:14:26.6679526Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:14:26.6679526Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:14:26.6679526Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '2486' + - '2893' content-type: - application/json date: - - Tue, 20 Sep 2022 07:36:24 GMT + - Thu, 29 Sep 2022 08:14:29 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004/operationResults/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview pragma: - no-cache server: @@ -1026,7 +1227,99 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --is-restore-request --restore-source --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:14:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - cosmosdb create + Connection: + - keep-alive + ParameterSetName: + - -n -g --is-restore-request --restore-source --restore-timestamp + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:15:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 status: code: 200 message: Ok @@ -1044,9 +1337,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1058,7 +1351,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:36:54 GMT + - Thu, 29 Sep 2022 08:15:59 GMT pragma: - no-cache server: @@ -1090,9 +1383,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1104,7 +1397,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:37:24 GMT + - Thu, 29 Sep 2022 08:16:30 GMT pragma: - no-cache server: @@ -1136,9 +1429,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1150,7 +1443,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:37:54 GMT + - Thu, 29 Sep 2022 08:17:00 GMT pragma: - no-cache server: @@ -1182,9 +1475,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1196,7 +1489,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:38:24 GMT + - Thu, 29 Sep 2022 08:17:29 GMT pragma: - no-cache server: @@ -1228,9 +1521,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1242,7 +1535,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:38:54 GMT + - Thu, 29 Sep 2022 08:18:00 GMT pragma: - no-cache server: @@ -1274,9 +1567,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1288,7 +1581,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:39:24 GMT + - Thu, 29 Sep 2022 08:18:30 GMT pragma: - no-cache server: @@ -1320,9 +1613,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1334,7 +1627,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:39:55 GMT + - Thu, 29 Sep 2022 08:19:00 GMT pragma: - no-cache server: @@ -1366,9 +1659,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1380,7 +1673,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:40:25 GMT + - Thu, 29 Sep 2022 08:19:31 GMT pragma: - no-cache server: @@ -1412,9 +1705,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1426,7 +1719,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:40:55 GMT + - Thu, 29 Sep 2022 08:20:00 GMT pragma: - no-cache server: @@ -1458,9 +1751,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1472,7 +1765,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:41:25 GMT + - Thu, 29 Sep 2022 08:20:30 GMT pragma: - no-cache server: @@ -1504,9 +1797,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1518,7 +1811,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:41:55 GMT + - Thu, 29 Sep 2022 08:21:01 GMT pragma: - no-cache server: @@ -1550,9 +1843,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1564,7 +1857,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:42:25 GMT + - Thu, 29 Sep 2022 08:21:31 GMT pragma: - no-cache server: @@ -1596,9 +1889,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1610,7 +1903,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:42:55 GMT + - Thu, 29 Sep 2022 08:22:00 GMT pragma: - no-cache server: @@ -1642,9 +1935,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1656,7 +1949,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:43:25 GMT + - Thu, 29 Sep 2022 08:22:31 GMT pragma: - no-cache server: @@ -1688,9 +1981,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1702,7 +1995,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:43:56 GMT + - Thu, 29 Sep 2022 08:23:01 GMT pragma: - no-cache server: @@ -1734,9 +2027,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1748,7 +2041,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:44:26 GMT + - Thu, 29 Sep 2022 08:23:31 GMT pragma: - no-cache server: @@ -1780,9 +2073,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1794,7 +2087,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:44:56 GMT + - Thu, 29 Sep 2022 08:24:01 GMT pragma: - no-cache server: @@ -1826,9 +2119,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1840,7 +2133,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:45:25 GMT + - Thu, 29 Sep 2022 08:24:32 GMT pragma: - no-cache server: @@ -1872,9 +2165,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1886,7 +2179,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:45:55 GMT + - Thu, 29 Sep 2022 08:25:01 GMT pragma: - no-cache server: @@ -1918,9 +2211,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1932,7 +2225,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:46:26 GMT + - Thu, 29 Sep 2022 08:25:31 GMT pragma: - no-cache server: @@ -1964,9 +2257,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1978,7 +2271,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:46:56 GMT + - Thu, 29 Sep 2022 08:26:02 GMT pragma: - no-cache server: @@ -2010,9 +2303,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2024,7 +2317,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:26 GMT + - Thu, 29 Sep 2022 08:26:31 GMT pragma: - no-cache server: @@ -2056,9 +2349,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2070,7 +2363,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:56 GMT + - Thu, 29 Sep 2022 08:27:01 GMT pragma: - no-cache server: @@ -2102,9 +2395,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2116,7 +2409,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:48:27 GMT + - Thu, 29 Sep 2022 08:27:31 GMT pragma: - no-cache server: @@ -2148,9 +2441,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2162,7 +2455,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:48:57 GMT + - Thu, 29 Sep 2022 08:28:02 GMT pragma: - no-cache server: @@ -2194,9 +2487,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2208,7 +2501,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:49:27 GMT + - Thu, 29 Sep 2022 08:28:32 GMT pragma: - no-cache server: @@ -2240,9 +2533,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2254,7 +2547,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:49:56 GMT + - Thu, 29 Sep 2022 08:29:02 GMT pragma: - no-cache server: @@ -2286,9 +2579,9 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/4090d1fb-b2e6-4065-a9dc-880e4bdf3e4a?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/operationsStatus/1a13f059-4814-4ef9-ade5-adda3964af94?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -2300,7 +2593,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:50:26 GMT + - Thu, 29 Sep 2022 08:29:32 GMT pragma: - no-cache server: @@ -2332,27 +2625,27 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:49:56.3737229Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","tableEndpoint":"https://cli000004.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"f767eee7-5c33-4a6e-a68f-5560dbada726","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:28:55.0444198Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","tableEndpoint":"https://cli000004.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"1346e1f3-3069-4e05-b399-38b7d7cbf9dd","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e175b9a1-eeae-4331-b509-8516a500995b","restoreTimestampInUtc":"2022-09-20T07:35:06Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/ecfda59b-6fbf-43b3-88f7-16be1dce21bc","restoreTimestampInUtc":"2022-09-29T08:12:59Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:28:55.0444198Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:28:55.0444198Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:28:55.0444198Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:28:55.0444198Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2618' + - '3025' content-type: - application/json date: - - Tue, 20 Sep 2022 07:50:27 GMT + - Thu, 29 Sep 2022 08:29:33 GMT pragma: - no-cache server: @@ -2384,27 +2677,27 @@ interactions: ParameterSetName: - -n -g --is-restore-request --restore-source --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:49:56.3737229Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","tableEndpoint":"https://cli000004.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"f767eee7-5c33-4a6e-a68f-5560dbada726","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:28:55.0444198Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","tableEndpoint":"https://cli000004.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"1346e1f3-3069-4e05-b399-38b7d7cbf9dd","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e175b9a1-eeae-4331-b509-8516a500995b","restoreTimestampInUtc":"2022-09-20T07:35:06Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/ecfda59b-6fbf-43b3-88f7-16be1dce21bc","restoreTimestampInUtc":"2022-09-29T08:12:59Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:28:55.0444198Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:28:55.0444198Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:28:55.0444198Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:28:55.0444198Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2618' + - '3025' content-type: - application/json date: - - Tue, 20 Sep 2022 07:50:27 GMT + - Thu, 29 Sep 2022 08:29:33 GMT pragma: - no-cache server: @@ -2436,27 +2729,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_account_restore_using_create000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000004","name":"cli000004","location":"West - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:49:56.3737229Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","tableEndpoint":"https://cli000004.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"f767eee7-5c33-4a6e-a68f-5560dbada726","createMode":"Restore","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T08:28:55.0444198Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000004.documents.azure.com:443/","tableEndpoint":"https://cli000004.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{},"instanceId":"1346e1f3-3069-4e05-b399-38b7d7cbf9dd","createMode":"Restore","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000004-westus2","locationName":"West US 2","documentEndpoint":"https://cli000004-westus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000004-westus2","locationName":"West - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/e175b9a1-eeae-4331-b509-8516a500995b","restoreTimestampInUtc":"2022-09-20T07:35:06Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"restoreParameters":{"restoreMode":"PointInTime","restoreSource":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus2/restorableDatabaseAccounts/ecfda59b-6fbf-43b3-88f7-16be1dce21bc","restoreTimestampInUtc":"2022-09-29T08:12:59Z","tablesToRestore":[]},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"capacity":{"totalThroughputLimit":-1},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T08:28:55.0444198Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T08:28:55.0444198Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:28:55.0444198Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T08:28:55.0444198Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2618' + - '3025' content-type: - application/json date: - - Tue, 20 Sep 2022 07:50:27 GMT + - Thu, 29 Sep 2022 08:29:32 GMT pragma: - no-cache server: diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_backupinfo.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_backupinfo.yaml index 21a6b6037fa..c29edc8e8dd 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_backupinfo.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_backupinfo.yaml @@ -13,9 +13,9 @@ interactions: ParameterSetName: - -g -a -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15-preview response: body: string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/cli000003'' @@ -29,7 +29,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:08 GMT + - Thu, 29 Sep 2022 07:50:01 GMT expires: - '-1' pragma: @@ -57,12 +57,13 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_table_backupinfo000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001","name":"cli_test_cosmosdb_table_backupinfo000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001","name":"cli_test_cosmosdb_table_backupinfo000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:49:57Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -71,7 +72,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:08 GMT + - Thu, 29 Sep 2022 07:50:01 GMT expires: - '-1' pragma: @@ -107,31 +108,31 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:13.1707318Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"48538dd2-2769-40d9-9526-264e0a0e1dfc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:50:05.9330994Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"443a5cfb-d99b-4128-b2e4-6f34c7aa9e93","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:50:05.9330994Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:50:05.9330994Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:50:05.9330994Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:50:05.9330994Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b30879bb-15c3-4344-a262-e82d1616a6ff?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '1937' + - '2364' content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:14 GMT + - Thu, 29 Sep 2022 07:50:07 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/b30879bb-15c3-4344-a262-e82d1616a6ff?api-version=2022-08-15-preview pragma: - no-cache server: @@ -165,9 +166,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b30879bb-15c3-4344-a262-e82d1616a6ff?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -179,7 +180,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:44 GMT + - Thu, 29 Sep 2022 07:50:37 GMT pragma: - no-cache server: @@ -211,9 +212,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b30879bb-15c3-4344-a262-e82d1616a6ff?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -225,7 +226,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:14 GMT + - Thu, 29 Sep 2022 07:51:08 GMT pragma: - no-cache server: @@ -257,9 +258,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b30879bb-15c3-4344-a262-e82d1616a6ff?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -271,7 +272,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:44 GMT + - Thu, 29 Sep 2022 07:51:38 GMT pragma: - no-cache server: @@ -303,9 +304,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b30879bb-15c3-4344-a262-e82d1616a6ff?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -317,7 +318,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:15 GMT + - Thu, 29 Sep 2022 07:52:08 GMT pragma: - no-cache server: @@ -349,9 +350,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b30879bb-15c3-4344-a262-e82d1616a6ff?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -363,7 +364,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:45 GMT + - Thu, 29 Sep 2022 07:52:38 GMT pragma: - no-cache server: @@ -395,9 +396,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b30879bb-15c3-4344-a262-e82d1616a6ff?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -409,7 +410,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:15 GMT + - Thu, 29 Sep 2022 07:53:08 GMT pragma: - no-cache server: @@ -441,9 +442,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b30879bb-15c3-4344-a262-e82d1616a6ff?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -455,7 +456,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:45 GMT + - Thu, 29 Sep 2022 07:53:39 GMT pragma: - no-cache server: @@ -487,9 +488,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b30879bb-15c3-4344-a262-e82d1616a6ff?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -501,7 +502,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:15 GMT + - Thu, 29 Sep 2022 07:54:09 GMT pragma: - no-cache server: @@ -533,101 +534,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:32:45 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --locations --kind --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:33:15 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --locations --kind --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/6cdb34d5-b998-463a-add9-99973cb33409?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/b30879bb-15c3-4344-a262-e82d1616a6ff?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -639,7 +548,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:46 GMT + - Thu, 29 Sep 2022 07:54:39 GMT pragma: - no-cache server: @@ -671,27 +580,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:45.2449268Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"48538dd2-2769-40d9-9526-264e0a0e1dfc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:53:52.0765392Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"443a5cfb-d99b-4128-b2e4-6f34c7aa9e93","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:53:52.0765392Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:53:52.0765392Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:53:52.0765392Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:53:52.0765392Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2303' + - '2730' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:46 GMT + - Thu, 29 Sep 2022 07:54:39 GMT pragma: - no-cache server: @@ -723,27 +632,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --kind --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:45.2449268Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"48538dd2-2769-40d9-9526-264e0a0e1dfc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:53:52.0765392Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"443a5cfb-d99b-4128-b2e4-6f34c7aa9e93","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:53:52.0765392Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:53:52.0765392Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:53:52.0765392Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:53:52.0765392Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2303' + - '2730' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:47 GMT + - Thu, 29 Sep 2022 07:54:40 GMT pragma: - no-cache server: @@ -775,27 +684,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:45.2449268Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"48538dd2-2769-40d9-9526-264e0a0e1dfc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:53:52.0765392Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"443a5cfb-d99b-4128-b2e4-6f34c7aa9e93","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:53:52.0765392Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:53:52.0765392Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:53:52.0765392Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:53:52.0765392Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2303' + - '2730' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:47 GMT + - Thu, 29 Sep 2022 07:54:41 GMT pragma: - no-cache server: @@ -827,60 +736,60 @@ interactions: ParameterSetName: - -g -a -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15-preview response: body: string: '{"code":"NotFound","message":"Message: {\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Owner resource does not exist\\\"]}\\r\\nActivityId: - 90930d06-38b6-11ed-b674-8cdcd4532c5b, Request URI: /apps/dc128d2c-0ec6-4555-86e6-1ffdea64390e/services/a0ffad33-7bbe-4baa-9790-5961c8926d59/partitions/6064fb9d-30bd-44e9-b1d6-23e2f7899e7b/replicas/133078746048801421s, - RequestStats: \\r\\nRequestStartTime: 2022-09-20T07:33:48.7369750Z, RequestEndTime: - 2022-09-20T07:33:48.7369750Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-20T07:32:55.0474317Z\\\",\\\"cpu\\\":3.679,\\\"memory\\\":636085256.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0082,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":375},{\\\"dateUtc\\\":\\\"2022-09-20T07:33:05.0573560Z\\\",\\\"cpu\\\":7.250,\\\"memory\\\":639730496.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0229,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":375},{\\\"dateUtc\\\":\\\"2022-09-20T07:33:15.0672621Z\\\",\\\"cpu\\\":0.229,\\\"memory\\\":639763376.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0228,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":376},{\\\"dateUtc\\\":\\\"2022-09-20T07:33:25.0771531Z\\\",\\\"cpu\\\":0.273,\\\"memory\\\":639653948.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.016,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":377},{\\\"dateUtc\\\":\\\"2022-09-20T07:33:35.0871035Z\\\",\\\"cpu\\\":0.222,\\\"memory\\\":639651604.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0151,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":377},{\\\"dateUtc\\\":\\\"2022-09-20T07:33:45.0970207Z\\\",\\\"cpu\\\":0.256,\\\"memory\\\":639626196.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0429,\\\"availableThreads\\\":32763,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":377}]}\\r\\nRequestStart: - 2022-09-20T07:33:48.7369750Z; ResponseTime: 2022-09-20T07:33:48.7369750Z; - StoreResult: StorePhysicalAddress: rntbd://10.0.1.12:11000/apps/dc128d2c-0ec6-4555-86e6-1ffdea64390e/services/a0ffad33-7bbe-4baa-9790-5961c8926d59/partitions/6064fb9d-30bd-44e9-b1d6-23e2f7899e7b/replicas/133078746048801421s, + f84d2e91-3fcb-11ed-9d63-9c7bef4baa38, Request URI: /apps/2077900a-07be-4f93-a3ce-500d7cc62576/services/b76efebf-6406-492c-97ac-07f15dd53396/partitions/ba3b72bb-2dac-4690-8883-03cfd0c39d6f/replicas/133079631048083052s, + RequestStats: \\r\\nRequestStartTime: 2022-09-29T07:54:42.3745361Z, RequestEndTime: + 2022-09-29T07:54:42.3745361Z, Number of regions attempted:1\\r\\n{\\\"systemHistory\\\":[{\\\"dateUtc\\\":\\\"2022-09-29T07:53:38.6347635Z\\\",\\\"cpu\\\":1.113,\\\"memory\\\":662573764.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0204,\\\"availableThreads\\\":32762,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":236},{\\\"dateUtc\\\":\\\"2022-09-29T07:53:48.6547519Z\\\",\\\"cpu\\\":0.071,\\\"memory\\\":662576704.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0194,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":236},{\\\"dateUtc\\\":\\\"2022-09-29T07:53:58.6647161Z\\\",\\\"cpu\\\":0.063,\\\"memory\\\":662540172.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0235,\\\"availableThreads\\\":32765,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":236},{\\\"dateUtc\\\":\\\"2022-09-29T07:54:08.6846763Z\\\",\\\"cpu\\\":0.122,\\\"memory\\\":662468876.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0158,\\\"availableThreads\\\":32764,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":236},{\\\"dateUtc\\\":\\\"2022-09-29T07:54:18.6946325Z\\\",\\\"cpu\\\":0.144,\\\"memory\\\":662436540.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.0355,\\\"availableThreads\\\":32765,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":236},{\\\"dateUtc\\\":\\\"2022-09-29T07:54:38.7045207Z\\\",\\\"cpu\\\":0.122,\\\"memory\\\":662266224.000,\\\"threadInfo\\\":{\\\"isThreadStarving\\\":\\\"False\\\",\\\"threadWaitIntervalInMs\\\":0.017,\\\"availableThreads\\\":32761,\\\"minThreads\\\":64,\\\"maxThreads\\\":32767},\\\"numberOfOpenTcpConnection\\\":232}]}\\r\\nRequestStart: + 2022-09-29T07:54:42.3745361Z; ResponseTime: 2022-09-29T07:54:42.3745361Z; + StoreResult: StorePhysicalAddress: rntbd://10.0.1.10:11000/apps/2077900a-07be-4f93-a3ce-500d7cc62576/services/b76efebf-6406-492c-97ac-07f15dd53396/partitions/ba3b72bb-2dac-4690-8883-03cfd0c39d6f/replicas/133079631048083052s, LSN: 9, GlobalCommittedLsn: 9, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 1003, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#9, - UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.653, ActivityId: - 90930d06-38b6-11ed-b674-8cdcd4532c5b, RetryAfterInMs: , TransportRequestTimeline: + UsingLocalLSN: False, TransportException: null, BELatencyMs: 1.084, ActivityId: + f84d2e91-3fcb-11ed-9d63-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:48.7369750Z\\\", \\\"durationInMs\\\": 0.013},{\\\"event\\\": - \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:48.7369880Z\\\", - \\\"durationInMs\\\": 0.0022},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:48.7369902Z\\\", \\\"durationInMs\\\": 0.3088},{\\\"event\\\": - \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:48.7372990Z\\\", - \\\"durationInMs\\\": 0.7078},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:48.7380068Z\\\", \\\"durationInMs\\\": 0.0708},{\\\"event\\\": - \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:48.7380776Z\\\", - \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-20T07:33:48.6869757Z\\\",\\\"lastSend\\\":\\\"2022-09-20T07:33:48.6869757Z\\\",\\\"lastReceive\\\":\\\"2022-09-20T07:33:48.6969758Z\\\"},\\\"requestSizeInBytes\\\":485,\\\"responseMetadataSizeInBytes\\\":141,\\\"responseBodySizeInBytes\\\":44};\\r\\n - ResourceType: Collection, OperationType: Read\\r\\nRequestStart: 2022-09-20T07:33:48.7369750Z; - ResponseTime: 2022-09-20T07:33:48.7369750Z; StoreResult: StorePhysicalAddress: - rntbd://10.0.1.11:11000/apps/dc128d2c-0ec6-4555-86e6-1ffdea64390e/services/a0ffad33-7bbe-4baa-9790-5961c8926d59/partitions/6064fb9d-30bd-44e9-b1d6-23e2f7899e7b/replicas/133078746048801422s, + \\\"2022-09-29T07:54:42.3745361Z\\\", \\\"durationInMs\\\": 0.0142},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:54:42.3745503Z\\\", + \\\"durationInMs\\\": 0.0023},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:54:42.3745526Z\\\", \\\"durationInMs\\\": 0.097},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:54:42.3746496Z\\\", + \\\"durationInMs\\\": 1.4187},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:54:42.3760683Z\\\", \\\"durationInMs\\\": 0.0702},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:54:42.3761385Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:54:42.2745369Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:54:42.2745369Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:54:42.3145070Z\\\"},\\\"requestSizeInBytes\\\":485,\\\"responseMetadataSizeInBytes\\\":141,\\\"responseBodySizeInBytes\\\":44};\\r\\n + ResourceType: Collection, OperationType: Read\\r\\nRequestStart: 2022-09-29T07:54:42.3745361Z; + ResponseTime: 2022-09-29T07:54:42.3745361Z; StoreResult: StorePhysicalAddress: + rntbd://10.0.1.8:11300/apps/2077900a-07be-4f93-a3ce-500d7cc62576/services/b76efebf-6406-492c-97ac-07f15dd53396/partitions/ba3b72bb-2dac-4690-8883-03cfd0c39d6f/replicas/133079631024020477s, LSN: 9, GlobalCommittedLsn: 9, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 1003, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#9, - UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.885, ActivityId: - 90930d06-38b6-11ed-b674-8cdcd4532c5b, RetryAfterInMs: , TransportRequestTimeline: + UsingLocalLSN: False, TransportException: null, BELatencyMs: 1.187, ActivityId: + f84d2e91-3fcb-11ed-9d63-9c7bef4baa38, RetryAfterInMs: , TransportRequestTimeline: {\\\"requestTimeline\\\":[{\\\"event\\\": \\\"Created\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:48.7369750Z\\\", \\\"durationInMs\\\": 0.0034},{\\\"event\\\": - \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:48.7369784Z\\\", + \\\"2022-09-29T07:54:42.3745361Z\\\", \\\"durationInMs\\\": 0.0045},{\\\"event\\\": + \\\"ChannelAcquisitionStarted\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:54:42.3745406Z\\\", \\\"durationInMs\\\": 0.0011},{\\\"event\\\": \\\"Pipelined\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:48.7369795Z\\\", \\\"durationInMs\\\": 0.1523},{\\\"event\\\": - \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:48.7371318Z\\\", - \\\"durationInMs\\\": 1.1318},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": - \\\"2022-09-20T07:33:48.7382636Z\\\", \\\"durationInMs\\\": 0.0248},{\\\"event\\\": - \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-20T07:33:48.7382884Z\\\", - \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-20T07:33:48.6869757Z\\\",\\\"lastSend\\\":\\\"2022-09-20T07:33:48.6869757Z\\\",\\\"lastReceive\\\":\\\"2022-09-20T07:33:48.6969758Z\\\"},\\\"requestSizeInBytes\\\":485,\\\"responseMetadataSizeInBytes\\\":141,\\\"responseBodySizeInBytes\\\":44};\\r\\n + \\\"2022-09-29T07:54:42.3745417Z\\\", \\\"durationInMs\\\": 0.0572},{\\\"event\\\": + \\\"Transit Time\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:54:42.3745989Z\\\", + \\\"durationInMs\\\": 1.6585},{\\\"event\\\": \\\"Received\\\", \\\"startTimeUtc\\\": + \\\"2022-09-29T07:54:42.3762574Z\\\", \\\"durationInMs\\\": 0.0282},{\\\"event\\\": + \\\"Completed\\\", \\\"startTimeUtc\\\": \\\"2022-09-29T07:54:42.3762856Z\\\", + \\\"durationInMs\\\": 0}],\\\"serviceEndpointStats\\\":{\\\"inflightRequests\\\":1,\\\"openConnections\\\":1},\\\"connectionStats\\\":{\\\"waitforConnectionInit\\\":\\\"False\\\",\\\"callsPendingReceive\\\":0,\\\"lastSendAttempt\\\":\\\"2022-09-29T07:54:42.2745369Z\\\",\\\"lastSend\\\":\\\"2022-09-29T07:54:42.2745369Z\\\",\\\"lastReceive\\\":\\\"2022-09-29T07:54:42.3345042Z\\\"},\\\"requestSizeInBytes\\\":485,\\\"responseMetadataSizeInBytes\\\":141,\\\"responseBodySizeInBytes\\\":44};\\r\\n ResourceType: Collection, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, Request URI: /dbs/TablesDB/colls/cli000002, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0"}' headers: cache-control: - no-store, no-cache content-length: - - '6493' + - '6492' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:48 GMT + - Thu, 29 Sep 2022 07:54:42 GMT pragma: - no-cache server: @@ -913,15 +822,15 @@ interactions: ParameterSetName: - -g -a -n --throughput User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/768e98b0-ca4a-4750-9301-5622461491ad?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c7287b9b-a947-46db-8dc1-f0d67d78600d?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -929,9 +838,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:48 GMT + - Thu, 29 Sep 2022 07:54:44 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/operationResults/768e98b0-ca4a-4750-9301-5622461491ad?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/operationResults/c7287b9b-a947-46db-8dc1-f0d67d78600d?api-version=2022-08-15 pragma: - no-cache server: @@ -943,7 +852,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 202 message: Accepted @@ -961,9 +870,9 @@ interactions: ParameterSetName: - -g -a -n --throughput User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/768e98b0-ca4a-4750-9301-5622461491ad?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/c7287b9b-a947-46db-8dc1-f0d67d78600d?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -975,7 +884,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:18 GMT + - Thu, 29 Sep 2022 07:55:14 GMT pragma: - no-cache server: @@ -1007,12 +916,12 @@ interactions: ParameterSetName: - -g -a -n --throughput User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Tv0TAJaMkjk=","_etag":"\"00000000-0000-0000-ccc3-58c3580201d8\"","_ts":1663659238}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Vc0RAOjbycQ=","_etag":"\"00000000-0000-0000-d3d8-c2b3200201d8\"","_ts":1664438094}}}' headers: cache-control: - no-store, no-cache @@ -1021,7 +930,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:19 GMT + - Thu, 29 Sep 2022 07:55:14 GMT pragma: - no-cache server: @@ -1053,12 +962,12 @@ interactions: ParameterSetName: - -g -a -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Tv0TAJaMkjk=","_etag":"\"00000000-0000-0000-ccc3-58c3580201d8\"","_ts":1663659238}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Vc0RAOjbycQ=","_etag":"\"00000000-0000-0000-d3d8-c2b3200201d8\"","_ts":1664438094}}}' headers: cache-control: - no-store, no-cache @@ -1067,7 +976,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:20 GMT + - Thu, 29 Sep 2022 07:55:16 GMT pragma: - no-cache server: @@ -1103,9 +1012,9 @@ interactions: ParameterSetName: - -g -a -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation?api-version=2022-08-15-preview response: body: string: '{"status":"Enqueued"}' @@ -1117,9 +1026,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:21 GMT + - Thu, 29 Sep 2022 07:55:16 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation/operationResults/d86cd0f3-402d-4031-9fd2-47cfd60d515e?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation/operationResults/29c7e30e-1b32-429b-a00d-6ea7ce3cbec2?api-version=2022-08-15-preview pragma: - no-cache server: @@ -1149,13 +1058,13 @@ interactions: ParameterSetName: - -g -a -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation/operationResults/d86cd0f3-402d-4031-9fd2-47cfd60d515e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation/operationResults/29c7e30e-1b32-429b-a00d-6ea7ce3cbec2?api-version=2022-08-15-preview response: body: - string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/20/2022 - 7:34:27 AM"}}' + string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/29/2022 + 7:55:21 AM"}}' headers: cache-control: - no-store, no-cache @@ -1164,7 +1073,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:51 GMT + - Thu, 29 Sep 2022 07:55:46 GMT pragma: - no-cache server: @@ -1196,12 +1105,12 @@ interactions: ParameterSetName: - -g -a -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Tv0TAJaMkjk=","_etag":"\"00000000-0000-0000-ccc3-58c3580201d8\"","_ts":1663659238}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Vc0RAOjbycQ=","_etag":"\"00000000-0000-0000-d3d8-c2b3200201d8\"","_ts":1664438094}}}' headers: cache-control: - no-store, no-cache @@ -1210,7 +1119,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:52 GMT + - Thu, 29 Sep 2022 07:55:46 GMT pragma: - no-cache server: @@ -1246,9 +1155,9 @@ interactions: ParameterSetName: - -g -a -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation?api-version=2022-08-15-preview response: body: string: '{"status":"Enqueued"}' @@ -1260,9 +1169,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:52 GMT + - Thu, 29 Sep 2022 07:55:47 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation/operationResults/a1fd0c1f-f49d-4eab-8f1d-8f1d9204397b?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation/operationResults/98642cab-2e33-444c-9475-a616b60a5752?api-version=2022-08-15-preview pragma: - no-cache server: @@ -1292,13 +1201,13 @@ interactions: ParameterSetName: - -g -a -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation/operationResults/a1fd0c1f-f49d-4eab-8f1d-8f1d9204397b?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation/operationResults/98642cab-2e33-444c-9475-a616b60a5752?api-version=2022-08-15-preview response: body: - string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/20/2022 - 7:34:58 AM"}}' + string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/29/2022 + 7:55:53 AM"}}' headers: cache-control: - no-store, no-cache @@ -1307,7 +1216,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:22 GMT + - Thu, 29 Sep 2022 07:56:17 GMT pragma: - no-cache server: @@ -1339,12 +1248,12 @@ interactions: ParameterSetName: - -g -a -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Tv0TAJaMkjk=","_etag":"\"00000000-0000-0000-ccc3-58c3580201d8\"","_ts":1663659238}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"Vc0RAOjbycQ=","_etag":"\"00000000-0000-0000-d3d8-c2b3200201d8\"","_ts":1664438094}}}' headers: cache-control: - no-store, no-cache @@ -1353,7 +1262,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:24 GMT + - Thu, 29 Sep 2022 07:56:18 GMT pragma: - no-cache server: @@ -1389,9 +1298,9 @@ interactions: ParameterSetName: - -g -a -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation?api-version=2022-08-15-preview response: body: string: '{"status":"Enqueued"}' @@ -1403,9 +1312,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:25 GMT + - Thu, 29 Sep 2022 07:56:19 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation/operationResults/03f663ae-c8cc-4a25-808d-b56d8fb2a9fe?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation/operationResults/93bc582c-97c0-49af-87e6-3e5480d1667d?api-version=2022-08-15-preview pragma: - no-cache server: @@ -1435,13 +1344,13 @@ interactions: ParameterSetName: - -g -a -n -l User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation/operationResults/03f663ae-c8cc-4a25-808d-b56d8fb2a9fe?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_backupinfo000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/retrieveContinuousBackupInformation/operationResults/93bc582c-97c0-49af-87e6-3e5480d1667d?api-version=2022-08-15-preview response: body: - string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/20/2022 - 7:35:30 AM"}}' + string: '{"continuousBackupInformation":{"latestRestorableTimestamp":"9/29/2022 + 7:56:24 AM"}}' headers: cache-control: - no-store, no-cache @@ -1450,7 +1359,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:55 GMT + - Thu, 29 Sep 2022 07:56:49 GMT pragma: - no-cache server: diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_restorable_commands.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_restorable_commands.yaml index e109acec670..3fcb8e8a624 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_restorable_commands.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_cosmosdb_table_restorable_commands.yaml @@ -13,12 +13,13 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cosmosdb_table_restorable_commands000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001","name":"cli_test_cosmosdb_table_restorable_commands000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T07:28:06Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001","name":"cli_test_cosmosdb_table_restorable_commands000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T07:46:32Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -27,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:09 GMT + - Thu, 29 Sep 2022 07:46:36 GMT expires: - '-1' pragma: @@ -63,31 +64,31 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:28:12.8419607Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2460855a-64f3-47f5-9476-09649a4fd15e","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:46:39.8488124Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"0f76ace0-a6ac-41cd-afab-254a9e03f04c","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:46:39.8488124Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:46:39.8488124Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:46:39.8488124Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:46:39.8488124Z"}}},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7a341e63-09ef-4c1c-8aa2-0546da757ffe?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e65c1708-a8ff-4059-9c82-e0f839e9de62?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '1946' + - '2373' content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:14 GMT + - Thu, 29 Sep 2022 07:46:41 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/7a341e63-09ef-4c1c-8aa2-0546da757ffe?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/operationResults/e65c1708-a8ff-4059-9c82-e0f839e9de62?api-version=2022-08-15-preview pragma: - no-cache server: @@ -103,53 +104,7 @@ interactions: x-ms-gatewayversion: - version=2.14.0 x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - cosmosdb create - Connection: - - keep-alive - ParameterSetName: - - -n -g --backup-policy-type --locations --capabilities - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7a341e63-09ef-4c1c-8aa2-0546da757ffe?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:28:44 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 + - '1199' status: code: 200 message: Ok @@ -167,9 +122,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7a341e63-09ef-4c1c-8aa2-0546da757ffe?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e65c1708-a8ff-4059-9c82-e0f839e9de62?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -181,7 +136,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:14 GMT + - Thu, 29 Sep 2022 07:47:11 GMT pragma: - no-cache server: @@ -213,9 +168,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7a341e63-09ef-4c1c-8aa2-0546da757ffe?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e65c1708-a8ff-4059-9c82-e0f839e9de62?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -227,7 +182,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:45 GMT + - Thu, 29 Sep 2022 07:47:42 GMT pragma: - no-cache server: @@ -259,9 +214,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7a341e63-09ef-4c1c-8aa2-0546da757ffe?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e65c1708-a8ff-4059-9c82-e0f839e9de62?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -273,7 +228,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:15 GMT + - Thu, 29 Sep 2022 07:48:12 GMT pragma: - no-cache server: @@ -305,9 +260,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7a341e63-09ef-4c1c-8aa2-0546da757ffe?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e65c1708-a8ff-4059-9c82-e0f839e9de62?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -319,7 +274,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:45 GMT + - Thu, 29 Sep 2022 07:48:42 GMT pragma: - no-cache server: @@ -351,9 +306,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7a341e63-09ef-4c1c-8aa2-0546da757ffe?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e65c1708-a8ff-4059-9c82-e0f839e9de62?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -365,7 +320,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:15 GMT + - Thu, 29 Sep 2022 07:49:13 GMT pragma: - no-cache server: @@ -397,9 +352,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7a341e63-09ef-4c1c-8aa2-0546da757ffe?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e65c1708-a8ff-4059-9c82-e0f839e9de62?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -411,7 +366,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:45 GMT + - Thu, 29 Sep 2022 07:49:43 GMT pragma: - no-cache server: @@ -443,9 +398,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7a341e63-09ef-4c1c-8aa2-0546da757ffe?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e65c1708-a8ff-4059-9c82-e0f839e9de62?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -457,7 +412,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:16 GMT + - Thu, 29 Sep 2022 07:50:13 GMT pragma: - no-cache server: @@ -489,9 +444,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7a341e63-09ef-4c1c-8aa2-0546da757ffe?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e65c1708-a8ff-4059-9c82-e0f839e9de62?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -503,7 +458,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:46 GMT + - Thu, 29 Sep 2022 07:50:42 GMT pragma: - no-cache server: @@ -535,9 +490,9 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7a341e63-09ef-4c1c-8aa2-0546da757ffe?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/e65c1708-a8ff-4059-9c82-e0f839e9de62?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -549,7 +504,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:15 GMT + - Thu, 29 Sep 2022 07:51:13 GMT pragma: - no-cache server: @@ -581,27 +536,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:41.6355338Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2460855a-64f3-47f5-9476-09649a4fd15e","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:50:20.9769998Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"0f76ace0-a6ac-41cd-afab-254a9e03f04c","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:50:20.9769998Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:50:20.9769998Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:50:20.9769998Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:50:20.9769998Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2312' + - '2739' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:16 GMT + - Thu, 29 Sep 2022 07:51:14 GMT pragma: - no-cache server: @@ -633,27 +588,27 @@ interactions: ParameterSetName: - -n -g --backup-policy-type --locations --capabilities User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:41.6355338Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2460855a-64f3-47f5-9476-09649a4fd15e","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:50:20.9769998Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"0f76ace0-a6ac-41cd-afab-254a9e03f04c","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:50:20.9769998Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:50:20.9769998Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:50:20.9769998Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:50:20.9769998Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2312' + - '2739' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:16 GMT + - Thu, 29 Sep 2022 07:51:14 GMT pragma: - no-cache server: @@ -685,27 +640,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003","name":"cli000003","location":"East - US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-20T07:32:41.6355338Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, - Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"2460855a-64f3-47f5-9476-09649a4fd15e","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East + US 2","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2022-09-29T07:50:20.9769998Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://cli000003.documents.azure.com:443/","tableEndpoint":"https://cli000003.table.cosmos.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Table, + Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"analyticalStorageConfiguration":{"schemaType":"WellDefined"},"instanceId":"0f76ace0-a6ac-41cd-afab-254a9e03f04c","createMode":"Default","databaseAccountOfferType":"Standard","enableCassandraConnector":false,"connectorOffer":"","enableMaterializedViews":false,"defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","disableLocalAuth":false,"enablePartitionMerge":false,"consistencyPolicy":{"defaultConsistencyLevel":"BoundedStaleness","maxIntervalInSeconds":86400,"maxStalenessPrefix":1000000},"configurationOverrides":{},"writeLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"cli000003-eastus2","locationName":"East US 2","documentEndpoint":"https://cli000003-eastus2.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"cli000003-eastus2","locationName":"East - US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"}},"identity":{"type":"None"}}' + US 2","failoverPriority":0}],"cors":[],"capabilities":[{"name":"EnableTable"}],"ipRules":[],"backupPolicy":{"type":"Continuous","continuousModeProperties":{"tier":"Continuous30Days"}},"networkAclBypassResourceIds":[],"diagnosticLogSettings":{"enableFullTextQuery":"None"},"keysMetadata":{"primaryMasterKey":{"generationTime":"2022-09-29T07:50:20.9769998Z"},"secondaryMasterKey":{"generationTime":"2022-09-29T07:50:20.9769998Z"},"primaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:50:20.9769998Z"},"secondaryReadonlyMasterKey":{"generationTime":"2022-09-29T07:50:20.9769998Z"}}},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2312' + - '2739' content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:16 GMT + - Thu, 29 Sep 2022 07:51:14 GMT pragma: - no-cache server: @@ -742,15 +697,15 @@ interactions: ParameterSetName: - -g -a -n --throughput User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/4490d666-ad81-48fe-8a44-228ce1767d13?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3542ad3a-cc50-41bc-a66a-b9d1d9a6a3a9?api-version=2022-08-15 cache-control: - no-store, no-cache content-length: @@ -758,9 +713,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:18 GMT + - Thu, 29 Sep 2022 07:51:16 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/operationResults/4490d666-ad81-48fe-8a44-228ce1767d13?api-version=2022-05-15 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002/operationResults/3542ad3a-cc50-41bc-a66a-b9d1d9a6a3a9?api-version=2022-08-15 pragma: - no-cache server: @@ -790,9 +745,9 @@ interactions: ParameterSetName: - -g -a -n --throughput User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/4490d666-ad81-48fe-8a44-228ce1767d13?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3542ad3a-cc50-41bc-a66a-b9d1d9a6a3a9?api-version=2022-08-15 response: body: string: '{"status":"Succeeded"}' @@ -804,7 +759,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:49 GMT + - Thu, 29 Sep 2022 07:51:46 GMT pragma: - no-cache server: @@ -836,12 +791,12 @@ interactions: ParameterSetName: - -g -a -n --throughput User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/8.0.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002?api-version=2022-08-15 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"ZAFGANm50rA=","_etag":"\"00000000-0000-0000-ccc3-47dc3c0201d8\"","_ts":1663659210}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_table_restorable_commands000001/providers/Microsoft.DocumentDB/databaseAccounts/cli000003/tables/cli000002","type":"Microsoft.DocumentDB/databaseAccounts/tables","name":"cli000002","properties":{"resource":{"id":"cli000002","_rid":"UcBeAN8Gy5U=","_etag":"\"00000000-0000-0000-d3d8-469ca80201d8\"","_ts":1664437885}}}' headers: cache-control: - no-store, no-cache @@ -850,7 +805,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:49 GMT + - Thu, 29 Sep 2022 07:51:46 GMT pragma: - no-cache server: @@ -882,15 +837,15 @@ interactions: ParameterSetName: - --location --instance-id User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2460855a-64f3-47f5-9476-09649a4fd15e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0f76ace0-a6ac-41cd-afab-254a9e03f04c?api-version=2022-08-15-preview response: body: - string: '{"name":"2460855a-64f3-47f5-9476-09649a4fd15e","location":"East US - 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2460855a-64f3-47f5-9476-09649a4fd15e","properties":{"accountName":"cli000003","apiType":"Table, - Sql","creationTime":"2022-09-20T07:32:42Z","oldestRestorableTime":"2022-09-20T07:32:42Z","restorableLocations":[{"locationName":"East - US 2","regionalDatabaseAccountInstanceId":"a462c3ad-77db-49ad-803f-3e54ca38b6f6","creationTime":"2022-09-20T07:32:43Z"}]}}' + string: '{"name":"0f76ace0-a6ac-41cd-afab-254a9e03f04c","location":"East US + 2","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0f76ace0-a6ac-41cd-afab-254a9e03f04c","properties":{"accountName":"cli000003","apiType":"Table, + Sql","creationTime":"2022-09-29T07:50:21Z","oldestRestorableTime":"2022-09-29T07:50:21Z","restorableLocations":[{"locationName":"East + US 2","regionalDatabaseAccountInstanceId":"7a1e5609-4c43-420b-ac67-0c8a5af933cb","creationTime":"2022-09-29T07:50:23Z"}]}}' headers: cache-control: - no-store, no-cache @@ -899,7 +854,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:50 GMT + - Thu, 29 Sep 2022 07:51:47 GMT pragma: - no-cache server: @@ -931,12 +886,12 @@ interactions: ParameterSetName: - --location --instance-id User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2460855a-64f3-47f5-9476-09649a4fd15e/restorableTables?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0f76ace0-a6ac-41cd-afab-254a9e03f04c/restorableTables?api-version=2022-08-15-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2460855a-64f3-47f5-9476-09649a4fd15e/restorableTables/56ff9d08-54fd-4603-b72d-c1e0c795fd1c","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTables","name":"56ff9d08-54fd-4603-b72d-c1e0c795fd1c","properties":{"resource":{"_rid":"RLqx0AAAAA==","eventTimestamp":"2022-09-20T07:33:30Z","ownerId":"cli000002","ownerResourceId":"ZAFGANm50rA=","operationType":"Create"}}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0f76ace0-a6ac-41cd-afab-254a9e03f04c/restorableTables/9c8cc78d-7d13-43ea-83fa-81fdd3238cd0","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTables","name":"9c8cc78d-7d13-43ea-83fa-81fdd3238cd0","properties":{"resource":{"_rid":"ND5CPQAAAA==","eventTimestamp":"2022-09-29T07:51:25Z","ownerId":"cli000002","ownerResourceId":"UcBeAN8Gy5U=","operationType":"Create"}}}]}' headers: cache-control: - no-store, no-cache @@ -945,7 +900,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:51 GMT + - Thu, 29 Sep 2022 07:51:48 GMT pragma: - no-cache server: @@ -977,21 +932,21 @@ interactions: ParameterSetName: - --restore-location -l --instance-id --restore-timestamp User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/2460855a-64f3-47f5-9476-09649a4fd15e/restorableTableResources?api-version=2022-02-15-preview&restoreLocation=eastus2&restoreTimestampInUtc=2022-09-20T07%3A34%3A42%2B00%3A00 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0f76ace0-a6ac-41cd-afab-254a9e03f04c/restorableTableResources?api-version=2022-08-15-preview&restoreLocation=eastus2&restoreTimestampInUtc=2022-09-29T07%3A52%3A21%2B00%3A00 response: body: - string: '{"value":["cli000002"]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/restorableDatabaseAccounts/0f76ace0-a6ac-41cd-afab-254a9e03f04c/restorableTableResources/cli000002","type":"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTableResources","name":"cli000002"}]}' headers: cache-control: - no-store, no-cache content-length: - - '23' + - '331' content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:51 GMT + - Thu, 29 Sep 2022 07:53:48 GMT pragma: - no-cache server: diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_managed_cassandra_cluster_without_datacenters.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_managed_cassandra_cluster_without_datacenters.yaml index 9dcb9b37f66..cd30db43454 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_managed_cassandra_cluster_without_datacenters.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_managed_cassandra_cluster_without_datacenters.yaml @@ -20,21 +20,21 @@ interactions: ParameterSetName: - -g -l -n --subnet-name User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003?api-version=2022-01-01 response: body: string: "{\r\n \"name\": \"cli000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003\",\r\n - \ \"etag\": \"W/\\\"4c3d5a9d-b096-4b36-a399-188ef37296e0\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"7c5986b2-ae3f-4345-bd2e-e3c867eaa8d1\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"0706e4f8-11a5-4ade-819c-a2d85e8714f4\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"0967be4e-e5f6-4d19-85b5-f31983970bb6\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [\r\n {\r\n \"name\": \"cli000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003/subnets/cli000004\",\r\n - \ \"etag\": \"W/\\\"4c3d5a9d-b096-4b36-a399-188ef37296e0\\\"\",\r\n + \ \"etag\": \"W/\\\"7c5986b2-ae3f-4345-bd2e-e3c867eaa8d1\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": @@ -45,7 +45,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/198d5f4e-07bb-4460-9f01-e8668c9434a3?api-version=2022-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/2a8e937c-765b-4d7d-b5e0-f7ba1bbba073?api-version=2022-01-01 cache-control: - no-cache content-length: @@ -53,7 +53,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:09 GMT + - Thu, 29 Sep 2022 18:38:59 GMT expires: - '-1' pragma: @@ -66,7 +66,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 310bcb9b-5d5e-47aa-a915-6778b2d8a06a + - ca117064-7950-4f18-b887-94d1f4c15d84 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -86,9 +86,9 @@ interactions: ParameterSetName: - -g -l -n --subnet-name User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/198d5f4e-07bb-4460-9f01-e8668c9434a3?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/2a8e937c-765b-4d7d-b5e0-f7ba1bbba073?api-version=2022-01-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -100,7 +100,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:12 GMT + - Thu, 29 Sep 2022 18:39:02 GMT expires: - '-1' pragma: @@ -117,7 +117,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f6c42037-2c3e-4833-8631-4a154fb953b9 + - 1b9fb202-7c29-402f-9469-2cad6e0f40e1 status: code: 200 message: '' @@ -135,21 +135,21 @@ interactions: ParameterSetName: - -g -l -n --subnet-name User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003?api-version=2022-01-01 response: body: string: "{\r\n \"name\": \"cli000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003\",\r\n - \ \"etag\": \"W/\\\"832d23ff-bbce-49c7-ab87-566856d9e517\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"1942a82e-502e-45e0-9e2e-17bb77ff728c\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"0706e4f8-11a5-4ade-819c-a2d85e8714f4\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"0967be4e-e5f6-4d19-85b5-f31983970bb6\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [\r\n {\r\n \"name\": \"cli000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003/subnets/cli000004\",\r\n - \ \"etag\": \"W/\\\"832d23ff-bbce-49c7-ab87-566856d9e517\\\"\",\r\n + \ \"etag\": \"W/\\\"1942a82e-502e-45e0-9e2e-17bb77ff728c\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": @@ -164,9 +164,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:12 GMT + - Thu, 29 Sep 2022 18:39:02 GMT etag: - - W/"832d23ff-bbce-49c7-ab87-566856d9e517" + - W/"1942a82e-502e-45e0-9e2e-17bb77ff728c" expires: - '-1' pragma: @@ -183,7 +183,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 72609ad2-9d4c-4a81-b1c4-6fb98bda196f + - 2449b218-191c-4a42-94be-c1e3f2a9b3e5 status: code: 200 message: '' @@ -201,21 +201,21 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003?api-version=2022-01-01 response: body: string: "{\r\n \"name\": \"cli000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003\",\r\n - \ \"etag\": \"W/\\\"832d23ff-bbce-49c7-ab87-566856d9e517\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"1942a82e-502e-45e0-9e2e-17bb77ff728c\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"0706e4f8-11a5-4ade-819c-a2d85e8714f4\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"0967be4e-e5f6-4d19-85b5-f31983970bb6\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [\r\n {\r\n \"name\": \"cli000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003/subnets/cli000004\",\r\n - \ \"etag\": \"W/\\\"832d23ff-bbce-49c7-ab87-566856d9e517\\\"\",\r\n + \ \"etag\": \"W/\\\"1942a82e-502e-45e0-9e2e-17bb77ff728c\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": @@ -230,9 +230,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:13 GMT + - Thu, 29 Sep 2022 18:39:03 GMT etag: - - W/"832d23ff-bbce-49c7-ab87-566856d9e517" + - W/"1942a82e-502e-45e0-9e2e-17bb77ff728c" expires: - '-1' pragma: @@ -249,7 +249,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 33e0db07-1a47-457b-a216-c2571386e1a3 + - cca55aa7-4ba3-42a1-9f2f-bd0a6cda163c status: code: 200 message: '' @@ -267,7 +267,7 @@ interactions: ParameterSetName: - --assignee --role --scope User-Agent: - - python/3.10.2 (Windows-10-10.0.19044-SP0) AZURECLI/2.40.0 + - python/3.10.1 (Windows-10-10.0.19044-SP0) AZURECLI/2.40.0 method: GET uri: https://graph.microsoft.com/v1.0/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%27e5007d2c-4b13-4a74-9b6a-605d99f03501%27%29 response: @@ -281,11 +281,11 @@ interactions: content-type: - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:13 GMT + - Thu, 29 Sep 2022 18:39:05 GMT odata-version: - '4.0' request-id: - - 0634a8bb-a30b-4d88-8fa9-d6162dcf078a + - 28f058e4-5301-4a38-81f2-916fa970b9fa strict-transport-security: - max-age=31536000 transfer-encoding: @@ -293,7 +293,7 @@ interactions: vary: - Accept-Encoding x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"West US 2","Slice":"E","Ring":"1","ScaleUnit":"002","RoleInstance":"MWH0EPF00032D51"}}' + - '{"ServerInfo":{"DataCenter":"West Central US","Slice":"E","Ring":"1","ScaleUnit":"001","RoleInstance":"CY4PEPF0000B7DE"}}' x-ms-resource-unit: - '1' status: @@ -318,7 +318,7 @@ interactions: ParameterSetName: - --assignee --role --scope User-Agent: - - python/3.10.2 (Windows-10-10.0.19044-SP0) AZURECLI/2.40.0 + - python/3.10.1 (Windows-10-10.0.19044-SP0) AZURECLI/2.40.0 method: POST uri: https://graph.microsoft.com/v1.0/directoryObjects/getByIds response: @@ -338,13 +338,13 @@ interactions: content-type: - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:13 GMT + - Thu, 29 Sep 2022 18:39:05 GMT location: - https://graph.microsoft.com odata-version: - '4.0' request-id: - - 99c3f3a1-ae55-4cae-bf78-273b323714e1 + - 85f82785-86b9-4192-a331-608103906e2c strict-transport-security: - max-age=31536000 transfer-encoding: @@ -352,7 +352,7 @@ interactions: vary: - Accept-Encoding x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"West US 2","Slice":"E","Ring":"1","ScaleUnit":"002","RoleInstance":"MWH0EPF00050946"}}' + - '{"ServerInfo":{"DataCenter":"West US 2","Slice":"E","Ring":"1","ScaleUnit":"000","RoleInstance":"CO1PEPF00000101"}}' x-ms-resource-unit: - '3' status: @@ -377,7 +377,7 @@ interactions: ParameterSetName: - --assignee --role --scope User-Agent: - - python/3.10.2 (Windows-10-10.0.19044-SP0) msrest/0.7.1 msrest_azure/0.6.4 + - python/3.10.1 (Windows-10-10.0.19044-SP0) msrest/0.7.1 msrest_azure/0.6.4 azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.40.0 accept-language: - en-US @@ -385,7 +385,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001?api-version=2020-04-01-preview response: body: - string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"e5007d2c-4b13-4a74-9b6a-605d99f03501","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003","condition":null,"conditionVersion":null,"createdOn":"2022-09-20T07:28:14.4739067Z","updatedOn":"2022-09-20T07:28:14.9114133Z","createdBy":null,"updatedBy":"3472afbc-da6d-4050-88a0-b0fe52e69bc5","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001","type":"Microsoft.Authorization/roleAssignments","name":"88888888-0000-0000-0000-000000000001"}' + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"e5007d2c-4b13-4a74-9b6a-605d99f03501","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003","condition":null,"conditionVersion":null,"createdOn":"2022-09-29T18:39:06.5101940Z","updatedOn":"2022-09-29T18:39:06.8852073Z","createdBy":null,"updatedBy":"27f82b5d-ce19-4257-a337-dabea1926ae2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001","type":"Microsoft.Authorization/roleAssignments","name":"88888888-0000-0000-0000-000000000001"}' headers: cache-control: - no-cache @@ -394,7 +394,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:16 GMT + - Thu, 29 Sep 2022 18:39:08 GMT expires: - '-1' pragma: @@ -424,13 +424,13 @@ interactions: ParameterSetName: - -g --vnet-name --name User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003/subnets/cli000004?api-version=2022-01-01 response: body: string: "{\r\n \"name\": \"cli000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003/subnets/cli000004\",\r\n - \ \"etag\": \"W/\\\"832d23ff-bbce-49c7-ab87-566856d9e517\\\"\",\r\n \"properties\": + \ \"etag\": \"W/\\\"1942a82e-502e-45e0-9e2e-17bb77ff728c\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": @@ -443,9 +443,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:16 GMT + - Thu, 29 Sep 2022 18:39:07 GMT etag: - - W/"832d23ff-bbce-49c7-ab87-566856d9e517" + - W/"1942a82e-502e-45e0-9e2e-17bb77ff728c" expires: - '-1' pragma: @@ -462,15 +462,16 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1fe76b8d-3570-4046-826d-adeed80eb8e6 + - c55fa1e0-615a-4716-ac94-e0839716c238 status: code: 200 - message: OK + message: '' - request: body: '{"location": "eastus2", "identity": {"type": "None"}, "properties": {"delegatedManagementSubnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003/subnets/cli000004", - "externalGossipCertificates": [{"pem": "./test.pem"}], "externalSeedNodes": - [{"ipAddress": "127.0.0.1"}, {"ipAddress": "127.0.0.2"}]}}' + "externalGossipCertificates": [{"pem": "-----BEGIN CERTIFICATE-----\r\nMIICLDCCAdKgAwIBAgIBADAKBggqhkjOPQQDAjB9MQswCQYDVQQGEwJCRTEPMA0G\r\nA1UEChMGR251VExTMSUwIwYDVQQLExxHbnVUTFMgY2VydGlmaWNhdGUgYXV0aG9y\r\naXR5MQ8wDQYDVQQIEwZMZXV2ZW4xJTAjBgNVBAMTHEdudVRMUyBjZXJ0aWZpY2F0\r\nZSBhdXRob3JpdHkwHhcNMTEwNTIzMjAzODIxWhcNMTIxMjIyMDc0MTUxWjB9MQsw\r\nCQYDVQQGEwJCRTEPMA0GA1UEChMGR251VExTMSUwIwYDVQQLExxHbnVUTFMgY2Vy\r\ndGlmaWNhdGUgYXV0aG9yaXR5MQ8wDQYDVQQIEwZMZXV2ZW4xJTAjBgNVBAMTHEdu\r\ndVRMUyBjZXJ0aWZpY2F0ZSBhdXRob3JpdHkwWTATBgcqhkjOPQIBBggqhkjOPQMB\r\nBwNCAARS2I0jiuNn14Y2sSALCX3IybqiIJUvxUpj+oNfzngvj/Niyv2394BWnW4X\r\nuQ4RTEiywK87WRcWMGgJB5kX/t2no0MwQTAPBgNVHRMBAf8EBTADAQH/MA8GA1Ud\r\nDwEB/wQFAwMHBgAwHQYDVR0OBBYEFPC0gf6YEr+1KLlkQAPLzB9mTigDMAoGCCqG\r\nSM49BAMCA0gAMEUCIDGuwD1KPyG+hRf88MeyMQcqOFZD0TbVleF+UsAGQ4enAiEA\r\nl4wOuDwKQa+upc8GftXE2C//4mKANBC6It01gUaTIpo=\r\n-----END + CERTIFICATE-----"}], "externalSeedNodes": [{"ipAddress": "127.0.0.1"}, {"ipAddress": + "127.0.0.2"}]}}' headers: Accept: - application/json @@ -481,30 +482,32 @@ interactions: Connection: - keep-alive Content-Length: - - '404' + - '1246' Content-Type: - application/json ParameterSetName: - -c -l -g -s -e --external-seed-nodes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-08-15-preview response: body: - string: '{"code":"BadRequest","message":"\r\nCode: \r\nDetail message: The certificates - submitted in externalGossipCertificates cannot be parsed: Cannot find the - requested object.\r\n Certificate: ./test.pem\r\nDetail code: BadRequest\r\nTarget: - \r\nActivityId: cba1040e-38b5-11ed-8d22-8cdcd4532c5b, Microsoft.Azure.Documents.Common/2.14.0"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002","name":"cli000002","type":"Microsoft.DocumentDB/cassandraClusters","location":"East + US 2","tags":{},"systemData":{"createdBy":"amisi@microsoft.com","createdByType":"User","createdAt":"2022-09-29T18:39:09.9636662Z","lastModifiedBy":"amisi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-29T18:39:09.9636662Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003/subnets/cli000004","externalGossipCertificates":[{"pem":"-----BEGIN + CERTIFICATE-----\r\nMIICLDCCAdKgAwIBAgIBADAKBggqhkjOPQQDAjB9MQswCQYDVQQGEwJCRTEPMA0G\r\nA1UEChMGR251VExTMSUwIwYDVQQLExxHbnVUTFMgY2VydGlmaWNhdGUgYXV0aG9y\r\naXR5MQ8wDQYDVQQIEwZMZXV2ZW4xJTAjBgNVBAMTHEdudVRMUyBjZXJ0aWZpY2F0\r\nZSBhdXRob3JpdHkwHhcNMTEwNTIzMjAzODIxWhcNMTIxMjIyMDc0MTUxWjB9MQsw\r\nCQYDVQQGEwJCRTEPMA0GA1UEChMGR251VExTMSUwIwYDVQQLExxHbnVUTFMgY2Vy\r\ndGlmaWNhdGUgYXV0aG9yaXR5MQ8wDQYDVQQIEwZMZXV2ZW4xJTAjBgNVBAMTHEdu\r\ndVRMUyBjZXJ0aWZpY2F0ZSBhdXRob3JpdHkwWTATBgcqhkjOPQIBBggqhkjOPQMB\r\nBwNCAARS2I0jiuNn14Y2sSALCX3IybqiIJUvxUpj+oNfzngvj/Niyv2394BWnW4X\r\nuQ4RTEiywK87WRcWMGgJB5kX/t2no0MwQTAPBgNVHRMBAf8EBTADAQH/MA8GA1Ud\r\nDwEB/wQFAwMHBgAwHQYDVR0OBBYEFPC0gf6YEr+1KLlkQAPLzB9mTigDMAoGCCqG\r\nSM49BAMCA0gAMEUCIDGuwD1KPyG+hRf88MeyMQcqOFZD0TbVleF+UsAGQ4enAiEA\r\nl4wOuDwKQa+upc8GftXE2C//4mKANBC6It01gUaTIpo=\r\n-----END + CERTIFICATE-----"}],"externalSeedNodes":[{"ipAddress":"127.0.0.1"},{"ipAddress":"127.0.0.2"}],"gossipCertificates":[],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{},"provisioningState":"Creating","repairEnabled":true,"seedNodes":[],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRAZONPOEFCHTCLFT3WFICTCTLV27SOZS46IPJ6SYLA5BUKXXBLHN75QR/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLIUO2KRQ2"}}' headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '332' + - '2257' content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:19 GMT + - Thu, 29 Sep 2022 18:39:09 GMT pragma: - no-cache server: @@ -518,6 +521,1210 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '1199' status: - code: 400 - message: BadRequest + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:39:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:40:10 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:40:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:41:11 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:41:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:42:10 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:42:40 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:43:10 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:43:41 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:44:11 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:44:41 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:45:11 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/65773d96-de74-4330-bdac-06f6c6d251a4?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:45:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster create + Connection: + - keep-alive + ParameterSetName: + - -c -l -g -s -e --external-seed-nodes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002","name":"cli000002","type":"Microsoft.DocumentDB/cassandraClusters","location":"East + US 2","tags":{},"systemData":{"createdBy":"amisi@microsoft.com","createdByType":"User","createdAt":"2022-09-29T18:39:09.9636662Z","lastModifiedBy":"amisi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-29T18:39:09.9636662Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003/subnets/cli000004","externalGossipCertificates":[{"pem":"-----BEGIN + CERTIFICATE-----\r\nMIICLDCCAdKgAwIBAgIBADAKBggqhkjOPQQDAjB9MQswCQYDVQQGEwJCRTEPMA0G\r\nA1UEChMGR251VExTMSUwIwYDVQQLExxHbnVUTFMgY2VydGlmaWNhdGUgYXV0aG9y\r\naXR5MQ8wDQYDVQQIEwZMZXV2ZW4xJTAjBgNVBAMTHEdudVRMUyBjZXJ0aWZpY2F0\r\nZSBhdXRob3JpdHkwHhcNMTEwNTIzMjAzODIxWhcNMTIxMjIyMDc0MTUxWjB9MQsw\r\nCQYDVQQGEwJCRTEPMA0GA1UEChMGR251VExTMSUwIwYDVQQLExxHbnVUTFMgY2Vy\r\ndGlmaWNhdGUgYXV0aG9yaXR5MQ8wDQYDVQQIEwZMZXV2ZW4xJTAjBgNVBAMTHEdu\r\ndVRMUyBjZXJ0aWZpY2F0ZSBhdXRob3JpdHkwWTATBgcqhkjOPQIBBggqhkjOPQMB\r\nBwNCAARS2I0jiuNn14Y2sSALCX3IybqiIJUvxUpj+oNfzngvj/Niyv2394BWnW4X\r\nuQ4RTEiywK87WRcWMGgJB5kX/t2no0MwQTAPBgNVHRMBAf8EBTADAQH/MA8GA1Ud\r\nDwEB/wQFAwMHBgAwHQYDVR0OBBYEFPC0gf6YEr+1KLlkQAPLzB9mTigDMAoGCCqG\r\nSM49BAMCA0gAMEUCIDGuwD1KPyG+hRf88MeyMQcqOFZD0TbVleF+UsAGQ4enAiEA\r\nl4wOuDwKQa+upc8GftXE2C//4mKANBC6It01gUaTIpo=\r\n-----END + CERTIFICATE-----"}],"externalSeedNodes":[{"ipAddress":"127.0.0.1"},{"ipAddress":"127.0.0.2"}],"gossipCertificates":[{"pem":"-----BEGIN + CERTIFICATE-----\r\nMIIElDCCA3ygAwIBAgIQAf2j627KdciIQ4tyS8+8kTANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0xMzAzMDgxMjAwMDBaFw0yMzAzMDgx\r\nMjAwMDBaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAVowggFWMBIGA1UdEwEB/wQI\r\nMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgGGMDQGCCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0\r\ncDovL29jc3AuZGlnaWNlcnQuY29tMHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYI\r\nKwYBBQUHAgEWHGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwHQYDVR0OBBYEFA+AYRyCMWHV\r\nLyjnjUY4tCzhxtniMB8GA1UdIwQYMBaAFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA0GCSqGSIb3DQEB\r\nCwUAA4IBAQAjPt9L0jFCpbZ+QlwaRMxp0Wi0XUvgBCFsS+JtzLHgl4+mUwnNqipl5TlPHoOlblyY\r\noiQm5vuh7ZPHLgLGTUq/sELfeNqzqPlt/yGFUzZgTHbO7Djc1lGA8MXW5dRNJ2Srm8c+cftIl7gz\r\nbckTB+6WohsYFfZcTEDts8Ls/3HB40f/1LkAtDdC2iDJ6m6K7hQGrn2iWZiIqBtvLfTyyRRfJs8s\r\njX7tN8Cp1Tm5gr8ZDOo0rwAhaPitc+LJMto4JQtV05od8GiG7S5BNO98pVAdvzr508EIDObtHopY\r\nJeS4d60tbvVS3bR0j6tJLp07kzQoH3jOlOrHvdPJbRzeXDLz\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw\r\nMDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3\r\ndy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq\r\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn\r\nTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5\r\nBmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H\r\n4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y\r\n7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB\r\no2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm\r\n8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF\r\nBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr\r\nEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt\r\ntep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886\r\nUAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\r\nCAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIE6DCCA9CgAwIBAgIQAnQuqhfKjiHHF7sf/P0MoDANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjMwMDAwMDBaFw0zMDA5MjIy\r\nMzU5NTlaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAa4wggGqMB0GA1UdDgQWBBQP\r\ngGEcgjFh1S8o541GOLQs4cbZ4jAfBgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3RVTAOBgNV\r\nHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYB\r\nAf8CAQAwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5j\r\nb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2Jh\r\nbFJvb3RDQS5jcnQwewYDVR0fBHQwcjA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA3oDWgM4YxaHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDAwBgNVHSAEKTAnMAcGBWeBDAEBMAgGBmeBDAECATAIBgZn\r\ngQwBAgIwCAYGZ4EMAQIDMA0GCSqGSIb3DQEBCwUAA4IBAQB3MR8Il9cSm2PSEWUIpvZlubj6kgPL\r\noX7hyA2MPrQbkb4CCF6fWXF7Ef3gwOOPWdegUqHQS1TSSJZI73fpKQbLQxCgLzwWji3+HlU87MOY\r\n7hgNI+gH9bMtxKtXc1r2G1O6+x/6vYzTUVEgR17vf5irF0LKhVyfIjc0RXbyQ14AniKDrN+v0ebH\r\nExfppGlkTIBn6rakf4994VH6npdn6mkus5CkHBXIrMtPKex6XF2firjUDLuU7tC8y7WlHgjPxEED\r\nDb0Gw6D0yDdVSvG/5XlCNatBmO/8EznDu1vr72N8gJzISUZwa6CCUD7QBLbKJcXBBVVf8nwvV9Gv\r\nlW+sbXlr\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIE6jCCA9KgAwIBAgIQCjUI1VwpKwF9+K1lwA/35DANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjQwMDAwMDBaFw0zMDA5MjMy\r\nMzU5NTlaME8xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxKTAnBgNVBAMTIERp\r\nZ2lDZXJ0IFRMUyBSU0EgU0hBMjU2IDIwMjAgQ0ExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\r\nCgKCAQEAwUuzZUdwvN1PWNvsnO3DZuUfMRNUrUpmRh8sCuxkB+Uu3Ny5CiDt3+PE0J6aqXodgojl\r\nEVbbHp9YwlHnLDQNLtKS4VbL8Xlfs7uHyiUDe5pSQWYQYE9XE0nw6Ddng9/n00tnTCJRpt8OmRDt\r\nV1F0JuJ9x8piLhMbfyOIJVNvwTRYAIuE//i+p1hJInuWraKImxW8oHzf6VGo1bDtN+I2tIJLYrVJ\r\nmuzHZ9bjPvXj1hJeRPG/cUJ9WIQDgLGBAfr5yjK7tI4nhyfFK3TUqNaX3sNk+crOU6JWvHgXjkkD\r\nKa77SU+kFbnO8lwZV21reacroicgE7XQPUDTITAHk+qZ9QIDAQABo4IBrjCCAaowHQYDVR0OBBYE\r\nFLdrouqoqoSMeeq02g+YssWVdrn0MB8GA1UdIwQYMBaAFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA4G\r\nA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwEgYDVR0TAQH/BAgw\r\nBgEB/wIBADB2BggrBgEFBQcBAQRqMGgwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0\r\nLmNvbTBABggrBgEFBQcwAoY0aHR0cDovL2NhY2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0R2xv\r\nYmFsUm9vdENBLmNydDB7BgNVHR8EdDByMDegNaAzhjFodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v\r\nRGlnaUNlcnRHbG9iYWxSb290Q0EuY3JsMDegNaAzhjFodHRwOi8vY3JsNC5kaWdpY2VydC5jb20v\r\nRGlnaUNlcnRHbG9iYWxSb290Q0EuY3JsMDAGA1UdIAQpMCcwBwYFZ4EMAQEwCAYGZ4EMAQIBMAgG\r\nBmeBDAECAjAIBgZngQwBAgMwDQYJKoZIhvcNAQELBQADggEBAHert3onPa679n/gWlbJhKrKW3EX\r\n3SJH/E6f7tDBpATho+vFScH90cnfjK+URSxGKqNjOSD5nkoklEHIqdninFQFBstcHL4AGw+oWv8Z\r\nu2XHFq8hVt1hBcnpj5h232sb0HIMULkwKXq/YFkQZhM6LawVEWwtIwwCPgU7/uWhnOKK24fXSuhe\r\n50gG66sSmvKvhMNbg0qZgYOrAKHKCjxMoiWJKiKnpPMzTFuMLhoClw+dj20tlQj7T9rxkTgl4Zxu\r\nYRiHas6xuwAwapu3r9rxxZf+ingkquqTgLozZXq8oXfpf2kUCwA/d5KxTVtzhwoT0JzI8ks5T1KE\r\nSaZMkE4f97Q=\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFWjCCBEKgAwIBAgIQDxSWXyAgaZlP1ceseIlB4jANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIwMDcyMTIzMDAwMFoXDTI0MTAwODA3MDAwMFow\r\nTzELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEgMB4GA1UEAxMX\r\nTWljcm9zb2Z0IFJTQSBUTFMgQ0EgMDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCq\r\nYnfPmmOyBoTzkDb0mfMUUavqlQo7Rgb9EUEf/lsGWMk4bgj8T0RIzTqk970eouKVuL5RIMW/snBj\r\nXXgMQ8ApzWRJCZbar879BV8rKpHoAW4uGJssnNABf2n17j9TiFy6BWy+IhVnFILyLNK+W2M3zK9g\r\nheiWa2uACKhuvgCca5Vw/OQYErEdG7LBEzFnMzTmJcliW1iCdXby/vI/OxbfqkKD4zJtm45DJvC9\r\nDh+hpzqvLMiK5uo/+aXSJY+SqhoIEpz+rErHw+uAlKuHFtEjSeeku8eR3+Z5ND9BSqc6JtLqb0bj\r\nOHPm5dSRrgt4nnil75bjc9j3lWXpBb9PXP9Sp/nPCK+nTQmZwHGjUnqlO9ebAVQD47ZisFonnDAm\r\njrZNVqEXF3p7laEHrFMxttYuD81BdOzxAbL9Rb/8MeFGQjE2Qx65qgVfhH+RsYuuD9dUw/3wZAhq\r\n05yO6nk07AM9c+AbNtRoEcdZcLCHfMDcbkXKNs5DJncCqXAN6LhXVERCw/usG2MmCMLSIx9/kwt8\r\nbwhUmitOXc6fpT7SmFvRAtvxg84wUkg4Y/Gx++0j0z6StSeN0EJz150jaHG6WV4HUqaWTb98Tm90\r\nIgXAU4AW2GBOlzFPiU5IY9jt+eXC2Q6yC/ZpTL1LAcnL3Qa/OgLrHN0wiw1KFGD51WRPQ0Sh7QID\r\nAQABo4IBJTCCASEwHQYDVR0OBBYEFLV2DDARzseSQk1Mx1wsyKkM6AtkMB8GA1UdIwQYMBaAFOWd\r\nWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYI\r\nKwYBBQUHAwIwEgYDVR0TAQH/BAgwBgEB/wIBADA0BggrBgEFBQcBAQQoMCYwJAYIKwYBBQUHMAGG\r\nGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTA6BgNVHR8EMzAxMC+gLaArhilodHRwOi8vY3JsMy5k\r\naWdpY2VydC5jb20vT21uaXJvb3QyMDI1LmNybDAqBgNVHSAEIzAhMAgGBmeBDAECATAIBgZngQwB\r\nAgIwCwYJKwYBBAGCNyoBMA0GCSqGSIb3DQEBCwUAA4IBAQCfK76SZ1vae4qt6P+dTQUO7bYNFUHR\r\n5hXcA2D59CJWnEj5na7aKzyowKvQupW4yMH9fGNxtsh6iJswRqOOfZYC4/giBO/gNsBvwr8uDW7t\r\n1nYoDYGHPpvnpxCM2mYfQFHq576/TmeYu1RZY29C4w8xYBlkAA8mDJfRhMCmehk7cN5FJtyWRj2c\r\nZj/hOoI45TYDBChXpOlLZKIYiG1giY16vhCRi6zmPzEwv+tk156N6cGSVm44jTQ/rs1sa0JSYjzU\r\naYngoFdZC4OfxnIkQvUIA4TOFmPzNPEFdjcZsgbeEz4TcGHTBPK4R28F44qIMCtHRV55VMX53ev6\r\nP3hRddJb\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE\r\nChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li\r\nZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC\r\nSUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs\r\ndGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME\r\nuyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB\r\nUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C\r\nG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9\r\nXbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr\r\nl3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI\r\nVDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB\r\nBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh\r\ncL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5\r\nhbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa\r\nY71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H\r\nRCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFWjCCBEKgAwIBAgIQD6dHIsU9iMgPWJ77H51KOjANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIwMDcyMTIzMDAwMFoXDTI0MTAwODA3MDAwMFow\r\nTzELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEgMB4GA1UEAxMX\r\nTWljcm9zb2Z0IFJTQSBUTFMgQ0EgMDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQD0\r\nwBlZqiokfAYhMdHuEvWBapTj9tFKL+NdsS4pFDi8zJVdKQfR+F039CDXtD9YOnqS7o88+isKcgOe\r\nQNTri472mPnn8N3vPCX0bDOEVk+nkZNIBA3zApvGGg/40Thv78kAlxibMipsKahdbuoHByOB4ZlY\r\notcBhf/ObUf65kCRfXMRQqOKWkZLkilPPn3zkYM5GHxeI4MNZ1SoKBEoHa2E/uDwBQVxadY4SRZW\r\nFxMd7ARyI4Cz1ik4N2Z6ALD3MfjAgEEDwoknyw9TGvr4PubAZdqU511zNLBoavar2OAVTl0Tddj+\r\nRAhbnX1/zypqk+ifv+d3CgiDa8Mbvo1u2Q8nuUBrKVUmR6EjkV/dDrIsUaU643v/Wp/uE7xLDdhC\r\n5rplK9siNlYohMTMKLAkjxVeWBWbQj7REickISpc+yowi3yUrO5lCgNAKrCNYw+wAfAvhFkOeqPm\r\n6kP41IHVXVtGNC/UogcdiKUiR/N59IfYB+o2v54GMW+ubSC3BohLFbho/oZZ5XyulIZK75pwTHma\r\nuCIeE5clU9ivpLwPTx9b0Vno9+ApElrFgdY0/YKZ46GfjOC9ta4G25VJ1WKsMmWLtzyrfgwbYopq\r\nuZd724fFdpvsxfIvMG5m3VFkThOqzsOttDcUfyMTqM2pan4txG58uxNJ0MjR03UCEULRU+qMnwID\r\nAQABo4IBJTCCASEwHQYDVR0OBBYEFP8vf+EG9DjzLe0ljZjC/g72bPz6MB8GA1UdIwQYMBaAFOWd\r\nWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYI\r\nKwYBBQUHAwIwEgYDVR0TAQH/BAgwBgEB/wIBADA0BggrBgEFBQcBAQQoMCYwJAYIKwYBBQUHMAGG\r\nGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTA6BgNVHR8EMzAxMC+gLaArhilodHRwOi8vY3JsMy5k\r\naWdpY2VydC5jb20vT21uaXJvb3QyMDI1LmNybDAqBgNVHSAEIzAhMAgGBmeBDAECATAIBgZngQwB\r\nAgIwCwYJKwYBBAGCNyoBMA0GCSqGSIb3DQEBCwUAA4IBAQCg2d165dQ1tHS0IN83uOi4S5heLhsx\r\n+zXIOwtxnvwCWdOJ3wFLQaFDcgaMtN79UjMIFVIUedDZBsvalKnx+6l2tM/VH4YAyNPx+u1LFR0j\r\noPYpQYLbNYkedkNuhRmEBesPqj4aDz68ZDI6fJ92sj2q18QvJUJ5Qz728AvtFOat+AjgK0PFqPYE\r\nAviUKr162NB1XZJxf6uyIjUlnG4UEdHfUqdhl0R84mMtrYINksTzQ2sHYM8fEhqICtTlcRLr/FEr\r\nUaPUe9648nziSnA0qKH7rUZqP/Ifmbo+WNZSZG1BbgOhlk+521W+Ncih3HRbvRBE0LWYT8vWKnfj\r\ngZKxwHwJ\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIF8zCCBNugAwIBAgIQCq+mxcpjxFFB6jvh98dTFzANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMDA3MjkxMjMwMDBaFw0yNDA2Mjcy\r\nMzU5NTlaMFkxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKjAo\r\nBgNVBAMTIU1pY3Jvc29mdCBBenVyZSBUTFMgSXNzdWluZyBDQSAwMTCCAiIwDQYJKoZIhvcNAQEB\r\nBQADggIPADCCAgoCggIBAMedcDrkXufP7pxVm1FHLDNA9IjwHaMoaY8arqqZ4Gff4xyrRygnavXL\r\n7g12MPAx8Q6Dd9hfBzrfWxkF0Br2wIvlvkzW01naNVSkHp+OS3hL3W6nl/jYvZnVeJXjtsKYcXIf\r\n/6WtspcF5awlQ9LZJcjwaH7KoZuK+THpXCMtzD8XNVdmGW/JI0C/7U/E7evXn9XDio8SYkGSM63a\r\nLO5BtLCv092+1d4GGBSQYolRq+7Pd1kREkWBPm0ywZ2Vb8GIS5DLrjelEkBnKCyy3B0yQud9dpVs\r\niUeE7F5sY8Me96WVxQcbOyYdEY/j/9UpDlOG+vA+YgOvBhkKEjiqygVpP8EZoMMijephzg43b5Qi\r\n9r5UrvYoo19oR/8pf4HJNDPF0/FJwFVMW8PmCBLGstin3NE1+NeWTkGt0TzpHjgKyfaDP2tO4bCk\r\n1G7pP2kDFT7SYfc8xbgCkFQ2UCEXsaH/f5YmpLn4YPiNFCeeIida7xnfTvc47IxyVccHHq1FzGyg\r\nOqemrxEETKh8hvDR6eBdrBwmCHVgZrnAqnn93JtGyPLi6+cjWGVGtMZHwzVvX1HvSFG771sskcEj\r\nJxiQNQDQRWHEh3NxvNb7kFlAXnVdRkkvhjpRGchFhTAzqmwltdWhWDEyCMKC2x/mSZvZtlZGY+g3\r\n7Y72qHzidwtyW7rBetZJAgMBAAGjggGtMIIBqTAdBgNVHQ4EFgQUDyBd16FXlduSzyvQx8J3BM5y\r\ngHYwHwYDVR0jBBgwFoAUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1Ud\r\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEB\r\nBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRo\r\ndHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290RzIuY3J0MHsGA1Ud\r\nHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYGZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMA0G\r\nCSqGSIb3DQEBDAUAA4IBAQAlFvNh7QgXVLAZSsNR2XRmIn9iS8OHFCBAWxKJoi8YYQafpMTkMqeu\r\nzoL3HWb1pYEipsDkhiMnrpfeYZEA7Lz7yqEEtfgHcEBsK9KcStQGGZRfmWU07hPXHnFz+5gTXqzC\r\nE2PBMlRgVUYJiA25mJPXfB00gDvGhtYa+mENwM9Bq1B9YYLyLjRtUz8cyGsdyTIG/bBM/Q9jcV8J\r\nGqMU/UjAdh1pFyTnnHElY59Npi7F87ZqYYJEHJM2LGD+le8VsHjgeWX2CJQko7klXvcizuZvUEDT\r\njHaQcs2J+kPgfyMIOY1DMJ21NxOJ2xPRC/wAh/hzSBRVtoAnyuxtkZ4VjIOh\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx\r\nMjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3\r\ndy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq\r\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ\r\nkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO\r\n3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV\r\nBJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM\r\nUNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB\r\no0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu\r\n5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr\r\nF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U\r\nWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH\r\nQRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/\r\niyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl\r\nMrY=\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIF8zCCBNugAwIBAgIQAueRcfuAIek/4tmDg0xQwDANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMDA3MjkxMjMwMDBaFw0yNDA2Mjcy\r\nMzU5NTlaMFkxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKjAo\r\nBgNVBAMTIU1pY3Jvc29mdCBBenVyZSBUTFMgSXNzdWluZyBDQSAwNjCCAiIwDQYJKoZIhvcNAQEB\r\nBQADggIPADCCAgoCggIBALVGARl56bx3KBUSGuPc4H5uoNFkFH4e7pvTCxRi4j/+z+XbwjEz+5Ci\r\npDOqjx9/jWjskL5dk7PaQkzItidsAAnDCW1leZBOIi68Lff1bjTeZgMYiwdRd3Y39b/lcGpiuP2d\r\n23W95YHkMMT8IlWosYIX0f4kYb62rphyfnAjYb/4Od99ThnhlAxGtfvSbXcBVIKCYfZgqRvV+5lR\r\neUnd1aNjRYVzPOoifgSx2fRyy1+pO1UzaMMNnIOE71bVYW0A1hr19w7kOb0KkJXoALTDDj1ukUED\r\nqQuBfBxReL5mXiu1O7WG0vltg0VZ/SZzctBsdBlx1BkmWYBW261KZgBivrql5ELTKKd8qgtHcLQA\r\n5fl6JB0Qgs5XDaWehN86Gps5JW8ArjGtjcWAIP+X8CQaWfaCnuRm6Bk/03PQWhgdi84qwA0ssRfF\r\nJwHUPTNSnE8EiGVk2frt0u8PG1pwSQsFuNJfcYIHEv1vOzP7uEOuDydsmCjhlxuoK2n5/2aVR3BM\r\nTu+p4+gl8alXoBycyLmj3J/PUgqD8SL5fTCUegGsdia/Sa60N2oV7vQ17wjMN+LXa2rjj/b4ZlZg\r\nXVojDmAjDwIRdDUujQu0RVsJqFLMzSIHpp2CZp7mIoLrySay2YYBu7SiNwL95X6He2kS8eefBBHj\r\nzwW/9FxGqry57i71c2cDAgMBAAGjggGtMIIBqTAdBgNVHQ4EFgQU1cFnOsKjnfR3UltZEjgp5lVo\r\nu6UwHwYDVR0jBBgwFoAUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1Ud\r\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEB\r\nBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRo\r\ndHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290RzIuY3J0MHsGA1Ud\r\nHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYGZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMA0G\r\nCSqGSIb3DQEBDAUAA4IBAQB2oWc93fB8esci/8esixj++N22meiGDjgF+rA2LUK5IOQOgcUSTGKS\r\nqF9lYfAxPjrqPjDCUPHCURv+26ad5P/BYtXtbmtxJWu+cS5BhMDPPeG3oPZwXRHBJFAkY4O4AF7R\r\nIAAUW6EzDflUoDHKv83zOiPfYGcpHc9skxAInCedk7QSgXvMARjjOqdakor21DTmNIUotxo8kHv5\r\nhwRlGhBJwps6fEVi1Bt0trpM/3wYxlr473WSPUFZPgP1j519kLpWOJ8z09wxay+Br29irPcBYv0G\r\nMXlHqThy8y4m/HyTQeI2IMvMrQnwqPpY+rLIXyviI2vLoI+4xKE4Rn38ZZ8m\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIF8zCCBNugAwIBAgIQDXvt6X2CCZZ6UmMbi90YvTANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMDA3MjkxMjMwMDBaFw0yNDA2Mjcy\r\nMzU5NTlaMFkxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKjAo\r\nBgNVBAMTIU1pY3Jvc29mdCBBenVyZSBUTFMgSXNzdWluZyBDQSAwNTCCAiIwDQYJKoZIhvcNAQEB\r\nBQADggIPADCCAgoCggIBAKplDTmQ9afwVPQelDuu+NkxNJ084CNKnrZ21ABewE+UU4GKDnwygZdK\r\n6agNSMs5UochUEDzz9CpdV5tdPzL14O/GeE2gO5/aUFTUMG9c6neyxk5tq1WdKsPkitPws6V8MWa\r\n5d1L/y4RFhZHUsgxxUySlYlGpNcHhhsyr7EvFecZGA1MfsitAWVp6hiWANkWKINfRcdt3Z2A23hm\r\nMH9MRSGBccHiPuzwrVsSmLwvt3WlRDgObJkE40tFYvJ6GXAQiaGHCIWSVObgO3zj6xkdbEFMmJ/z\r\nr2Wet5KEcUDtUBhA4dUUoaPVz69u46V56Vscy3lXu1Ylsk84j5lUPLdsAxtultP4OPQoOTpnY8kx\r\nWkH6kgO5gTKE3HRvoVIjU4xJ0JQ746zy/8GdQA36SaNiz4U3u10zFZg2Rkv2dL1Lv58EXL02r5q5\r\nB/nhVH/M1joTvpRvaeEpAJhkIA9NkpvbGEpSdcA0OrtOOeGtrsiOyMBYkjpB5nw0cJY1QHOr3nIv\r\nJ2OnY+OKJbDSrhFqWsk8/1q6Z1WNvONz7te1pAtHerdPi5pCHeiXCNpv+fadwP0k8czaf2Vs19nY\r\nsgWn5uIyLQL8EehdBzCbOKJy9sl86S4Fqe4HGyAtmqGlaWOsq2A6O/paMi3BSmWTDbgPLCPBbPte\r\n/bsuAEF4ajkPEES3GHP9AgMBAAGjggGtMIIBqTAdBgNVHQ4EFgQUx7KcfxzjuFrv6WgaqF2UwSZS\r\namgwHwYDVR0jBBgwFoAUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1Ud\r\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEB\r\nBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRo\r\ndHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290RzIuY3J0MHsGA1Ud\r\nHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYGZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMA0G\r\nCSqGSIb3DQEBDAUAA4IBAQAe+G+G2RFdWtYxLIKMR5H/aVNFjNP7Jdeu+oZaKaIu7U3NidykFr99\r\n4jSxMBMV768ukJ5/hLSKsuj/SLjmAfwRAZ+w0RGqi/kOvPYUlBr/sKOwr3tVkg9ccZBebnBVG+DL\r\nKTp2Ox0+jYBCPxla5FO252qpk7/6wt8SZk3diSU12Jm7if/jjkhkGB/e8UdfrKoLytDvqVeiwPA5\r\nFPzqKoSqN75byLjsIKJEdNi07SY45hN/RUnsmIoAf93qlaHR/SJWVRhrWt3JmeoBJ2RDK492zF6T\r\nGu1moh4aE6e00YkwTPWreuwvaLB220vWmtgZPs+DSIb2d9hPBdCJgvcho1c7\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIF8zCCBNugAwIBAgIQDGrpfM7VmYOGkKAKnqUyFDANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMDA3MjkxMjMwMDBaFw0yNDA2Mjcy\r\nMzU5NTlaMFkxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKjAo\r\nBgNVBAMTIU1pY3Jvc29mdCBBenVyZSBUTFMgSXNzdWluZyBDQSAwMjCCAiIwDQYJKoZIhvcNAQEB\r\nBQADggIPADCCAgoCggIBAOBiO1K6Fk4fHI6t3mJkpg7lxoeUgL8tz9wuI2z0UgY8vFra3VBo7Qzn\r\nC4K3s9jqKWEyIQY11Le0108bSYa/TK0aioO6itpGiigEG+vH/iqtQXPSu6D804ri0NFZ1SOP9Izj\r\nYuQiK6AWntCqP4WAcZAPtpNrNLPBIyiqmiTDS4dlFg1dskMuVpT4z0MpgEMmxQnrSZ615rBQ25vn\r\nVbBNig04FCsh1V3S8ve5Gzh08oIrL/g5xq95oRrgEeOBIeiegQpoKrLYyo3R1Tt48HmSJCBYQ52Q\r\nc34RgxQdZsLXMUrWuL1JLAZP6yeo47ySSxKCjhq5/AUWvQBP3N/cP/iJzKKKw23qJ/kkVrE0DSVD\r\niIiXWF0c9abSGhYl9SPl86IHcIAIzwelJ4SKpHrVbh0/w4YHdFi5QbdAp7O5KxfxBYhQOeHyis01\r\nzkpYn6SqUFGvbK8eZ8y9Aclt8PIUftMG6q5BhdlBZkDDV3n70RlXwYvllzfZ/nV94l+hYp+GLW7j\r\nSmpxZLG/XEz4OXtTtWwLV+IkIOe/EDF79KCazW2SXOIvVInPoi1PqN4TudNv0GyBF5tRC/aBjUqp\r\nly1YYfeKwgRVs83z5kuiOicmdGZKH9SqU5bnKse7IlyfZLg6yAxYyTNe7A9acJ3/pGmCIkJ/9dfL\r\nUFc4hYb3YyIIYGmqm2/3AgMBAAGjggGtMIIBqTAdBgNVHQ4EFgQUAKuR/CFiJpeaqHkbYUGQYKli\r\nZ/0wHwYDVR0jBBgwFoAUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1Ud\r\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEB\r\nBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRo\r\ndHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290RzIuY3J0MHsGA1Ud\r\nHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYGZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMA0G\r\nCSqGSIb3DQEBDAUAA4IBAQAzo/KdmWPPTaYLQW7J5DqxEiBT9QyYGUfeZd7TR1837H6DSkFa/mGM\r\n1kLwi5y9miZKA9k6T9OwTx8CflcvbNO2UkFW0VCldEGHiyx5421+HpRxMQIRjligePtOtRGXwaNO\r\nQ7ySWfJhRhKcPKe2PGFHQI7/3n+T3kXQ/SLu2lk9Qs5YgSJ3VhxBUznYn1KVKJWPE07M55kuUgCq\r\nuAV0PksZj7EC4nK6e/UVbPumlj1nyjlxhvNud4WYmr4ntbBev6cSbK78dpI/3cr7P/WJPYJuL0Es\r\nO3MgjS3eDCX7NXp5ylue3TcpQfRU8BL+yZC1wqX98R4ndw7X4qfGaE7SlF7I\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDqDCCAy6gAwIBAgIQDo2+XqYQ5su1acc29tcASzAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0yMDA4MTIwMDAwMDBaFw0yNDA2MjcyMzU5\r\nNTlaMF0xCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLjAsBgNV\r\nBAMTJU1pY3Jvc29mdCBBenVyZSBFQ0MgVExTIElzc3VpbmcgQ0EgMDIwdjAQBgcqhkjOPQIBBgUr\r\ngQQAIgNiAATlxJr7ThHOTChFtITU0Taop1bFSVf3h9toLKI7bi0GVWd3a3uQVIImulk4pdVuOkoC\r\nI+wEIBkrsEnNUrH28+uUXb48SnwzdhArFcG3zygvZEnBYdcWNlOLKZ5XZhqUZKKjggGtMIIBqTAd\r\nBgNVHQ4EFgQUneUOdzdHngkz2ZC+KgnCEn9O0qMwHwYDVR0jBBgwFoAUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNV\r\nHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEBBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au\r\nZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln\r\naUNlcnRHbG9iYWxSb290RzMuY3J0MHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYG\r\nZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMAoGCCqGSM49BAMDA2gAMGUCMCIdzL1WliSNxC+uX8Iz\r\ngfyxdmELlX0I7TtWowrKUov8QSfi57irRIGpHvmxoFW7XQIxAPdJJZ/jAbKJ5lS21mLnKcdsctXO\r\ntl2eFVqGSfIFWbJUihZCKesfoSMThZ4fa/Ir8g==\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw\r\nMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k\r\naWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C\r\nAQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O\r\nYwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP\r\nBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y\r\n3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34\r\nVOKa5Vt8sycX\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDqDCCAy6gAwIBAgIQBm55zXYkxjEwx3q+tqi7lDAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0yMDA4MTIwMDAwMDBaFw0yNDA2MjcyMzU5\r\nNTlaMF0xCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLjAsBgNV\r\nBAMTJU1pY3Jvc29mdCBBenVyZSBFQ0MgVExTIElzc3VpbmcgQ0EgMDYwdjAQBgcqhkjOPQIBBgUr\r\ngQQAIgNiAARodFftKDyrox+TSSyDI1N0mihPAZTht8YaqlSbw8xGGrHBU6msYCcfjOdsbxmOyYv4\r\naF1IlXQWxionC+Z4BuqhQobPhgmB6sFxES9K441KK9QLTUWQYapoCbyfodkT/JqjggGtMIIBqTAd\r\nBgNVHQ4EFgQUH87HnWRTX7b8lQeulSYzUcEn2SYwHwYDVR0jBBgwFoAUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNV\r\nHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEBBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au\r\nZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln\r\naUNlcnRHbG9iYWxSb290RzMuY3J0MHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYG\r\nZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMAoGCCqGSM49BAMDA2gAMGUCMC6mseL4nziiCiMxO4ZV\r\nukItZ0JU3nZqpHmDkw3apBtupflaKdHeRqDc/jYXJJagnAIxAPTYJFPD55v1mmssDLRzYpB1DIJT\r\nasbhYvJr69O4PdqSjyrJzduOGHdE3+5NmWy/Ag==\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDqTCCAy6gAwIBAgIQCdxCpfV0/zo4nuBtXU3kQDAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0yMDA4MTIwMDAwMDBaFw0yNDA2MjcyMzU5\r\nNTlaMF0xCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLjAsBgNV\r\nBAMTJU1pY3Jvc29mdCBBenVyZSBFQ0MgVExTIElzc3VpbmcgQ0EgMDEwdjAQBgcqhkjOPQIBBgUr\r\ngQQAIgNiAAS2l9suuS4cCc6TIq49UKNhdFf8aqX+bCNy9qS+Z6oMvojY9juMwieyeWnamryKdYYm\r\nm/Gp7dLAJdOqbDPkpjf1hwFpXzfHvMS7dkYAOZznH9xAXB2DhYZtyhGqcyE6j5yjggGtMIIBqTAd\r\nBgNVHQ4EFgQUqv0wDdei1e+KencxqmamwmwRu28wHwYDVR0jBBgwFoAUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNV\r\nHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEBBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au\r\nZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln\r\naUNlcnRHbG9iYWxSb290RzMuY3J0MHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYG\r\nZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMAoGCCqGSM49BAMDA2kAMGYCMQDQRUmslOjL+aU3alpy\r\neQ9dwKPz1wGGCTBQqaB/99pLQQEjTd3qyc9dX2Pw8ZRnR4oCMQC+BRXUqY73PRgE7vNdX6Jwrwof\r\nyl27okJaXLVbi6O96eB3a59r8IytP2M8Pubw0hM=\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDqTCCAy6gAwIBAgIQDOWcMP16g1MuLQFGszL5ZTAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0yMDA4MTIwMDAwMDBaFw0yNDA2MjcyMzU5\r\nNTlaMF0xCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLjAsBgNV\r\nBAMTJU1pY3Jvc29mdCBBenVyZSBFQ0MgVExTIElzc3VpbmcgQ0EgMDUwdjAQBgcqhkjOPQIBBgUr\r\ngQQAIgNiAATMpLWI9tiXgEukKWh1kjMYAKbaq50AY1+CBCU/yuChcnzPTKO8Jgj00Z4y2Ic41I59\r\nkHUW7v10Ug2eFNaW6LEwnKkab33I+nswrHlTK0009agqhbSVs1LByY/g26RvTt2jggGtMIIBqTAd\r\nBgNVHQ4EFgQUVd/uHies8p4rnoA5NXlWRzrOsxAwHwYDVR0jBBgwFoAUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNV\r\nHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEBBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au\r\nZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln\r\naUNlcnRHbG9iYWxSb290RzMuY3J0MHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYG\r\nZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMAoGCCqGSM49BAMDA2kAMGYCMQCu22LB4kPjxpFT4OeZ\r\nuLnvAnjQe7bEn4xSyqCz+N54fjhE0lWrh80BvbiKtL0RQTsCMQDvmxaAuzNlRJctCgdw8UUAS4Jg\r\nj0Z1YCj/1pNDE/Jvfb3T81ELCvjeXnMjIlgYNP8=\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEQzCCAyugAwIBAgIQCidf5wTW7ssj1c1bSxpOBDANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjMwMDAwMDBaFw0zMDA5MjIy\r\nMzU5NTlaMFYxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxMDAuBgNVBAMTJ0Rp\r\nZ2lDZXJ0IFRMUyBIeWJyaWQgRUNDIFNIQTM4NCAyMDIwIENBMTB2MBAGByqGSM49AgEGBSuBBAAi\r\nA2IABMEbxppbmNmkKaDp1AS12+umsmxVwP/tmMZJLwYnUcu/cMEFesOxnYeJuq20ExfJqLSDyLiQ\r\n0cx0NTY8g3KwtdD3ImnI8YDEe0CPz2iHJlw5ifFNkU3aiYvkA8ND5b8vc6OCAa4wggGqMB0GA1Ud\r\nDgQWBBQKvAgpF4ylOW16Ds4zxy6z7fvDejAfBgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3R\r\nVTAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB\r\n/wQIMAYBAf8CAQAwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdp\r\nY2VydC5jb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2Vy\r\ndEdsb2JhbFJvb3RDQS5jcnQwewYDVR0fBHQwcjA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA3oDWgM4YxaHR0cDovL2NybDQuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDAwBgNVHSAEKTAnMAcGBWeBDAEBMAgGBmeBDAEC\r\nATAIBgZngQwBAgIwCAYGZ4EMAQIDMA0GCSqGSIb3DQEBDAUAA4IBAQDeOpcbhb17jApY4+PwCwYA\r\neq9EYyp/3YFtERim+vc4YLGwOWK9uHsu8AjJkltz32WQt960V6zALxyZZ02LXvIBoa33llPN1d9R\r\nJzcGRvJvPDGJLEoWKRGC5+23QhST4Nlg+j8cZMsywzEXJNmvPlVv/w+AbxsBCMqkBGPI2lNM8hkm\r\nxPad31z6n58SXqJdH/bYF462YvgdgbYKOytobPAyTgr3mYI5sUjeCzqJx1+NLyc8nAK8Ib2HxnC+\r\nIrrWzfRLvVNve8KaN9EtBH7TuMwNW4SpDCmGr6fY1h3tDjHhkTb9PA36zoaJzu0cIw265vZt6hCm\r\nYWJC+/j+fgZwcPwL\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEFzCCAv+gAwIBAgIQB/LzXIeod6967+lHmTUlvTANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMTA0MTQwMDAwMDBaFw0zMTA0MTMy\r\nMzU5NTlaMFYxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxMDAuBgNVBAMTJ0Rp\r\nZ2lDZXJ0IFRMUyBIeWJyaWQgRUNDIFNIQTM4NCAyMDIwIENBMTB2MBAGByqGSM49AgEGBSuBBAAi\r\nA2IABMEbxppbmNmkKaDp1AS12+umsmxVwP/tmMZJLwYnUcu/cMEFesOxnYeJuq20ExfJqLSDyLiQ\r\n0cx0NTY8g3KwtdD3ImnI8YDEe0CPz2iHJlw5ifFNkU3aiYvkA8ND5b8vc6OCAYIwggF+MBIGA1Ud\r\nEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFAq8CCkXjKU5bXoOzjPHLrPt+8N6MB8GA1UdIwQYMBaA\r\nFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcD\r\nAQYIKwYBBQUHAwIwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdp\r\nY2VydC5jb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2Vy\r\ndEdsb2JhbFJvb3RDQS5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVn\r\ngQwBATAIBgZngQwBAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQwFAAOCAQEAR1mB\r\nf9QbH7Bx9phdGLqYR5iwfnYr6v8ai6wms0KNMeZK6BnQ79oU59cUkqGS8qcuLa/7Hfb7U7CKP/zY\r\nFgrpsC62pQsYkDUmotr2qLcy/JUjS8ZFucTP5Hzu5sn4kL1y45nDHQsFfGqXbbKrAjbYwrwsAZI/\r\nBKOLdRHHuSm8EdCGupK8JvllyDfNJvaGEwwEqonleLHBTnm8dqMLUeTF0J5q/hosVq4GNiejcxwI\r\nfZMy0MJEGdqN9A57HSgDKwmKdsp33Id6rHtSJlWncg+d0ohP/rEhxRqhqjn1VtvChMQ1H3Dau0bw\r\nhr9kAMQ+959GG50jBbl9s08PqUU643QwmA==\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFrTCCBJWgAwIBAgIQB9JqWPDx4GjFlGd8ZBuA+DANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIyMDQwNzAwMDAwMFoXDTI1MDUxMTIzNTk1OVow\r\nSjELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEbMBkGA1UEAxMS\r\nTVNGVCBCQUxUIFJTMjU2IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwTgQW2vE\r\ntqjPda6g6ZwoqAqb1mdoiFEqeYB8nex6Y0mSgW8NnF4C+MiF1MCFjSlWYgkIVycQ4E86g7znUL1u\r\nVdkEol39U6UiogypLAsQh58fDe7goJrTE36BfQBeS9qx/rvfUPv/PhR74miZsc7nOUsaoMMS76LN\r\nymDhXD+imVseHynsmN2D2AJQZ/7nompXsn/NHIdQF2hqFdLqb6tanGSZuCqCvnf9kJ7RNQipq8lo\r\nzQhWSIQu6tQh2Rs+1iv2wEH7XJgSq8rcsnk4qI9uzfcvhPUNwU14a2rtnahcfUBHrjsaCsB7Ubgj\r\nqi+s9j3POkBCcBDW4x84kAwhpGNYIp1abupXdBPPZYZ6VI3ViA9xeoql/ig8tlGLHsalfYb69Hbm\r\nMGdrwDYmf4YIuLmWSBBynmOJUcNSaDSEtKxERNwcUHzrrp9A9SaC4eg8ZK6J5R5mbVr5eegELzWT\r\nvPtXjiCXlfDvpr+PXLchwEkV3xjymdZd7eq+NmaSafY5mCm/C/KF5eQOhgaXomERa2brYyUazJPQ\r\nzoyHwFOdKpfNINqRg+TnzwXoapbZzVXdquafgUYuHOa28T8/nv85tV20kxQMUy+ICV4anHsAibEp\r\nzgLuDV1Cl9CpoDMOL7fFYOpKXn/zLAG5ZyWW6h426JHq5SKWV4z4utoSDiqMGsZpL1UCAwEAAaOC\r\nAX0wggF5MBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFEa78CwfKmRLIeiu3crbctSqIShc\r\nMB8GA1UdIwQYMBaAFOWdWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUE\r\nFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIweQYIKwYBBQUHAQEEbTBrMCQGCCsGAQUFBzABhhhodHRw\r\nOi8vb2NzcC5kaWdpY2VydC5jb20wQwYIKwYBBQUHMAKGN2h0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0\r\nLmNvbS9CYWx0aW1vcmVDeWJlclRydXN0Um9vdC5jcnQwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDov\r\nL2NybDMuZGlnaWNlcnQuY29tL09tbmlyb290MjAyNS5jcmwwPQYDVR0gBDYwNDALBglghkgBhv1s\r\nAgEwBwYFZ4EMAQEwCAYGZ4EMAQIBMAgGBmeBDAECAjAIBgZngQwBAgMwDQYJKoZIhvcNAQELBQAD\r\nggEBADOP/3F1jZdadZfbmTfTRjJXHHjisxhiFlVL87cG9PLYIgn5E3xfuGKBnaGXnfdGlPBQuwB2\r\nlKIUA1/JuE5CYF//6Kpa087EDV+Vn3pJ04VkIibNi48Efjs6ROSWPeSd/CzqXB15LbeLB8v7tm4f\r\nsD7CRhERJJUfVkGP8s9249cy7V63SovqP6EYQhFxP0lwJUbzhmMNx37mjnK9dMiKhNKhGQ2KUBdH\r\n/NuiuBL11h2mFowSiuNq6sGBNv9JwwKBHQQ05jhzxXEJiw9lcCYg+2yIk5p6IY4ArdAwi4oZ4knE\r\noyyUmOQy/MkTEdsSptaEbOoBncTBFX2YkXulNYTPyz4=\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEtjCCA56gAwIBAgIQCv1eRG9c89YADp5Gwibf9jANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMjA0MjgwMDAwMDBaFw0zMjA0Mjcy\r\nMzU5NTlaMEcxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xGDAW\r\nBgNVBAMTD01TRlQgUlMyNTYgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMiJ\r\nV34oeVNHI0mZGh1Rj9mdde3zSY7IhQNqAmRaTzOeRye8QsfhYFXSiMW25JddlcqaqGJ9GEMcJPWB\r\nIBIEdNVYl1bB5KQOl+3m68p59Pu7npC74lJRY8F+p8PLKZAJjSkDD9ExmjHBlPcRrasgflPom3D0\r\nXB++nB1y+WLn+cB7DWLoj6qZSUDyWwnEDkkjfKee6ybxSAXq7oORPe9o2BKfgi7dTKlOd7eKhotw\r\n96yIgMx7yigE3Q3ARS8m+BOFZ/mx150gdKFfMcDNvSkCpxjVWnk//icrrmmEsn2xJbEuDCvtoSNv\r\nGIuCXxqhTM352HGfO2JKAF/Kjf5OrPn2QpECAwEAAaOCAYIwggF+MBIGA1UdEwEB/wQIMAYBAf8C\r\nAQAwHQYDVR0OBBYEFAyBfpQ5X8d3on8XFnk46DWWjn+UMB8GA1UdIwQYMBaAFE4iVCAYlebjbuYP\r\n+vq5Eu0GF485MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw\r\ndgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wQAYI\r\nKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0\r\nR2xvYmFsUm9vdEcyLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVngQwBATAIBgZngQwB\r\nAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQsFAAOCAQEAdYWmf+ABklEQShTbhGPQ\r\nmH1c9BfnEgUFMJsNpzo9dvRj1Uek+L9WfI3kBQn97oUtf25BQsfckIIvTlE3WhA2Cg2yWLTVjH0N\r\ny03dGsqoFYIypnuAwhOWUPHAu++vaUMcPUTUpQCbeC1h4YW4CCSTYN37D2Q555wxnni0elPj9O0p\r\nymWS8gZnsfoKjvoYi/qDPZw1/TSRpenOgI6XjmlmPLBrk4LIw7P7PPg4uXUpCzzeybvARG/NIIkF\r\nv1eRYIbDF+bIkZbJQFdB9BjjlA4ukAg2YkOyCiB8eXTBi2APaceh3+uBLIgLk8ysy52g2U3gP7Q2\r\n6Jlgq/xKzj3O9hFh/g==\r\n-----END + CERTIFICATE-----\r\n"}],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{"ipAddress":"10.0.0.4"},"provisioningState":"Succeeded","repairEnabled":true,"seedNodes":[],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRAZONPOEFCHTCLFT3WFICTCTLV27SOZS46IPJ6SYLA5BUKXXBLHN75QR/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLIUO2KRQ2"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '38166' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:45:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster show + Connection: + - keep-alive + ParameterSetName: + - -c -g + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002","name":"cli000002","type":"Microsoft.DocumentDB/cassandraClusters","location":"East + US 2","tags":{},"systemData":{"createdBy":"amisi@microsoft.com","createdByType":"User","createdAt":"2022-09-29T18:39:09.9636662Z","lastModifiedBy":"amisi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-29T18:39:09.9636662Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000003/subnets/cli000004","externalGossipCertificates":[{"pem":"-----BEGIN + CERTIFICATE-----\r\nMIICLDCCAdKgAwIBAgIBADAKBggqhkjOPQQDAjB9MQswCQYDVQQGEwJCRTEPMA0G\r\nA1UEChMGR251VExTMSUwIwYDVQQLExxHbnVUTFMgY2VydGlmaWNhdGUgYXV0aG9y\r\naXR5MQ8wDQYDVQQIEwZMZXV2ZW4xJTAjBgNVBAMTHEdudVRMUyBjZXJ0aWZpY2F0\r\nZSBhdXRob3JpdHkwHhcNMTEwNTIzMjAzODIxWhcNMTIxMjIyMDc0MTUxWjB9MQsw\r\nCQYDVQQGEwJCRTEPMA0GA1UEChMGR251VExTMSUwIwYDVQQLExxHbnVUTFMgY2Vy\r\ndGlmaWNhdGUgYXV0aG9yaXR5MQ8wDQYDVQQIEwZMZXV2ZW4xJTAjBgNVBAMTHEdu\r\ndVRMUyBjZXJ0aWZpY2F0ZSBhdXRob3JpdHkwWTATBgcqhkjOPQIBBggqhkjOPQMB\r\nBwNCAARS2I0jiuNn14Y2sSALCX3IybqiIJUvxUpj+oNfzngvj/Niyv2394BWnW4X\r\nuQ4RTEiywK87WRcWMGgJB5kX/t2no0MwQTAPBgNVHRMBAf8EBTADAQH/MA8GA1Ud\r\nDwEB/wQFAwMHBgAwHQYDVR0OBBYEFPC0gf6YEr+1KLlkQAPLzB9mTigDMAoGCCqG\r\nSM49BAMCA0gAMEUCIDGuwD1KPyG+hRf88MeyMQcqOFZD0TbVleF+UsAGQ4enAiEA\r\nl4wOuDwKQa+upc8GftXE2C//4mKANBC6It01gUaTIpo=\r\n-----END + CERTIFICATE-----"}],"externalSeedNodes":[{"ipAddress":"127.0.0.1"},{"ipAddress":"127.0.0.2"}],"gossipCertificates":[{"pem":"-----BEGIN + CERTIFICATE-----\r\nMIIElDCCA3ygAwIBAgIQAf2j627KdciIQ4tyS8+8kTANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0xMzAzMDgxMjAwMDBaFw0yMzAzMDgx\r\nMjAwMDBaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAVowggFWMBIGA1UdEwEB/wQI\r\nMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgGGMDQGCCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0\r\ncDovL29jc3AuZGlnaWNlcnQuY29tMHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYI\r\nKwYBBQUHAgEWHGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwHQYDVR0OBBYEFA+AYRyCMWHV\r\nLyjnjUY4tCzhxtniMB8GA1UdIwQYMBaAFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA0GCSqGSIb3DQEB\r\nCwUAA4IBAQAjPt9L0jFCpbZ+QlwaRMxp0Wi0XUvgBCFsS+JtzLHgl4+mUwnNqipl5TlPHoOlblyY\r\noiQm5vuh7ZPHLgLGTUq/sELfeNqzqPlt/yGFUzZgTHbO7Djc1lGA8MXW5dRNJ2Srm8c+cftIl7gz\r\nbckTB+6WohsYFfZcTEDts8Ls/3HB40f/1LkAtDdC2iDJ6m6K7hQGrn2iWZiIqBtvLfTyyRRfJs8s\r\njX7tN8Cp1Tm5gr8ZDOo0rwAhaPitc+LJMto4JQtV05od8GiG7S5BNO98pVAdvzr508EIDObtHopY\r\nJeS4d60tbvVS3bR0j6tJLp07kzQoH3jOlOrHvdPJbRzeXDLz\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw\r\nMDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3\r\ndy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq\r\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn\r\nTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5\r\nBmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H\r\n4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y\r\n7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB\r\no2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm\r\n8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF\r\nBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr\r\nEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt\r\ntep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886\r\nUAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\r\nCAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIE6DCCA9CgAwIBAgIQAnQuqhfKjiHHF7sf/P0MoDANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjMwMDAwMDBaFw0zMDA5MjIy\r\nMzU5NTlaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAa4wggGqMB0GA1UdDgQWBBQP\r\ngGEcgjFh1S8o541GOLQs4cbZ4jAfBgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3RVTAOBgNV\r\nHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYB\r\nAf8CAQAwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5j\r\nb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2Jh\r\nbFJvb3RDQS5jcnQwewYDVR0fBHQwcjA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA3oDWgM4YxaHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDAwBgNVHSAEKTAnMAcGBWeBDAEBMAgGBmeBDAECATAIBgZn\r\ngQwBAgIwCAYGZ4EMAQIDMA0GCSqGSIb3DQEBCwUAA4IBAQB3MR8Il9cSm2PSEWUIpvZlubj6kgPL\r\noX7hyA2MPrQbkb4CCF6fWXF7Ef3gwOOPWdegUqHQS1TSSJZI73fpKQbLQxCgLzwWji3+HlU87MOY\r\n7hgNI+gH9bMtxKtXc1r2G1O6+x/6vYzTUVEgR17vf5irF0LKhVyfIjc0RXbyQ14AniKDrN+v0ebH\r\nExfppGlkTIBn6rakf4994VH6npdn6mkus5CkHBXIrMtPKex6XF2firjUDLuU7tC8y7WlHgjPxEED\r\nDb0Gw6D0yDdVSvG/5XlCNatBmO/8EznDu1vr72N8gJzISUZwa6CCUD7QBLbKJcXBBVVf8nwvV9Gv\r\nlW+sbXlr\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIE6jCCA9KgAwIBAgIQCjUI1VwpKwF9+K1lwA/35DANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjQwMDAwMDBaFw0zMDA5MjMy\r\nMzU5NTlaME8xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxKTAnBgNVBAMTIERp\r\nZ2lDZXJ0IFRMUyBSU0EgU0hBMjU2IDIwMjAgQ0ExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\r\nCgKCAQEAwUuzZUdwvN1PWNvsnO3DZuUfMRNUrUpmRh8sCuxkB+Uu3Ny5CiDt3+PE0J6aqXodgojl\r\nEVbbHp9YwlHnLDQNLtKS4VbL8Xlfs7uHyiUDe5pSQWYQYE9XE0nw6Ddng9/n00tnTCJRpt8OmRDt\r\nV1F0JuJ9x8piLhMbfyOIJVNvwTRYAIuE//i+p1hJInuWraKImxW8oHzf6VGo1bDtN+I2tIJLYrVJ\r\nmuzHZ9bjPvXj1hJeRPG/cUJ9WIQDgLGBAfr5yjK7tI4nhyfFK3TUqNaX3sNk+crOU6JWvHgXjkkD\r\nKa77SU+kFbnO8lwZV21reacroicgE7XQPUDTITAHk+qZ9QIDAQABo4IBrjCCAaowHQYDVR0OBBYE\r\nFLdrouqoqoSMeeq02g+YssWVdrn0MB8GA1UdIwQYMBaAFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA4G\r\nA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwEgYDVR0TAQH/BAgw\r\nBgEB/wIBADB2BggrBgEFBQcBAQRqMGgwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0\r\nLmNvbTBABggrBgEFBQcwAoY0aHR0cDovL2NhY2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0R2xv\r\nYmFsUm9vdENBLmNydDB7BgNVHR8EdDByMDegNaAzhjFodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v\r\nRGlnaUNlcnRHbG9iYWxSb290Q0EuY3JsMDegNaAzhjFodHRwOi8vY3JsNC5kaWdpY2VydC5jb20v\r\nRGlnaUNlcnRHbG9iYWxSb290Q0EuY3JsMDAGA1UdIAQpMCcwBwYFZ4EMAQEwCAYGZ4EMAQIBMAgG\r\nBmeBDAECAjAIBgZngQwBAgMwDQYJKoZIhvcNAQELBQADggEBAHert3onPa679n/gWlbJhKrKW3EX\r\n3SJH/E6f7tDBpATho+vFScH90cnfjK+URSxGKqNjOSD5nkoklEHIqdninFQFBstcHL4AGw+oWv8Z\r\nu2XHFq8hVt1hBcnpj5h232sb0HIMULkwKXq/YFkQZhM6LawVEWwtIwwCPgU7/uWhnOKK24fXSuhe\r\n50gG66sSmvKvhMNbg0qZgYOrAKHKCjxMoiWJKiKnpPMzTFuMLhoClw+dj20tlQj7T9rxkTgl4Zxu\r\nYRiHas6xuwAwapu3r9rxxZf+ingkquqTgLozZXq8oXfpf2kUCwA/d5KxTVtzhwoT0JzI8ks5T1KE\r\nSaZMkE4f97Q=\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFWjCCBEKgAwIBAgIQDxSWXyAgaZlP1ceseIlB4jANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIwMDcyMTIzMDAwMFoXDTI0MTAwODA3MDAwMFow\r\nTzELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEgMB4GA1UEAxMX\r\nTWljcm9zb2Z0IFJTQSBUTFMgQ0EgMDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCq\r\nYnfPmmOyBoTzkDb0mfMUUavqlQo7Rgb9EUEf/lsGWMk4bgj8T0RIzTqk970eouKVuL5RIMW/snBj\r\nXXgMQ8ApzWRJCZbar879BV8rKpHoAW4uGJssnNABf2n17j9TiFy6BWy+IhVnFILyLNK+W2M3zK9g\r\nheiWa2uACKhuvgCca5Vw/OQYErEdG7LBEzFnMzTmJcliW1iCdXby/vI/OxbfqkKD4zJtm45DJvC9\r\nDh+hpzqvLMiK5uo/+aXSJY+SqhoIEpz+rErHw+uAlKuHFtEjSeeku8eR3+Z5ND9BSqc6JtLqb0bj\r\nOHPm5dSRrgt4nnil75bjc9j3lWXpBb9PXP9Sp/nPCK+nTQmZwHGjUnqlO9ebAVQD47ZisFonnDAm\r\njrZNVqEXF3p7laEHrFMxttYuD81BdOzxAbL9Rb/8MeFGQjE2Qx65qgVfhH+RsYuuD9dUw/3wZAhq\r\n05yO6nk07AM9c+AbNtRoEcdZcLCHfMDcbkXKNs5DJncCqXAN6LhXVERCw/usG2MmCMLSIx9/kwt8\r\nbwhUmitOXc6fpT7SmFvRAtvxg84wUkg4Y/Gx++0j0z6StSeN0EJz150jaHG6WV4HUqaWTb98Tm90\r\nIgXAU4AW2GBOlzFPiU5IY9jt+eXC2Q6yC/ZpTL1LAcnL3Qa/OgLrHN0wiw1KFGD51WRPQ0Sh7QID\r\nAQABo4IBJTCCASEwHQYDVR0OBBYEFLV2DDARzseSQk1Mx1wsyKkM6AtkMB8GA1UdIwQYMBaAFOWd\r\nWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYI\r\nKwYBBQUHAwIwEgYDVR0TAQH/BAgwBgEB/wIBADA0BggrBgEFBQcBAQQoMCYwJAYIKwYBBQUHMAGG\r\nGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTA6BgNVHR8EMzAxMC+gLaArhilodHRwOi8vY3JsMy5k\r\naWdpY2VydC5jb20vT21uaXJvb3QyMDI1LmNybDAqBgNVHSAEIzAhMAgGBmeBDAECATAIBgZngQwB\r\nAgIwCwYJKwYBBAGCNyoBMA0GCSqGSIb3DQEBCwUAA4IBAQCfK76SZ1vae4qt6P+dTQUO7bYNFUHR\r\n5hXcA2D59CJWnEj5na7aKzyowKvQupW4yMH9fGNxtsh6iJswRqOOfZYC4/giBO/gNsBvwr8uDW7t\r\n1nYoDYGHPpvnpxCM2mYfQFHq576/TmeYu1RZY29C4w8xYBlkAA8mDJfRhMCmehk7cN5FJtyWRj2c\r\nZj/hOoI45TYDBChXpOlLZKIYiG1giY16vhCRi6zmPzEwv+tk156N6cGSVm44jTQ/rs1sa0JSYjzU\r\naYngoFdZC4OfxnIkQvUIA4TOFmPzNPEFdjcZsgbeEz4TcGHTBPK4R28F44qIMCtHRV55VMX53ev6\r\nP3hRddJb\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE\r\nChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li\r\nZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC\r\nSUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs\r\ndGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME\r\nuyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB\r\nUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C\r\nG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9\r\nXbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr\r\nl3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI\r\nVDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB\r\nBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh\r\ncL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5\r\nhbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa\r\nY71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H\r\nRCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFWjCCBEKgAwIBAgIQD6dHIsU9iMgPWJ77H51KOjANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIwMDcyMTIzMDAwMFoXDTI0MTAwODA3MDAwMFow\r\nTzELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEgMB4GA1UEAxMX\r\nTWljcm9zb2Z0IFJTQSBUTFMgQ0EgMDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQD0\r\nwBlZqiokfAYhMdHuEvWBapTj9tFKL+NdsS4pFDi8zJVdKQfR+F039CDXtD9YOnqS7o88+isKcgOe\r\nQNTri472mPnn8N3vPCX0bDOEVk+nkZNIBA3zApvGGg/40Thv78kAlxibMipsKahdbuoHByOB4ZlY\r\notcBhf/ObUf65kCRfXMRQqOKWkZLkilPPn3zkYM5GHxeI4MNZ1SoKBEoHa2E/uDwBQVxadY4SRZW\r\nFxMd7ARyI4Cz1ik4N2Z6ALD3MfjAgEEDwoknyw9TGvr4PubAZdqU511zNLBoavar2OAVTl0Tddj+\r\nRAhbnX1/zypqk+ifv+d3CgiDa8Mbvo1u2Q8nuUBrKVUmR6EjkV/dDrIsUaU643v/Wp/uE7xLDdhC\r\n5rplK9siNlYohMTMKLAkjxVeWBWbQj7REickISpc+yowi3yUrO5lCgNAKrCNYw+wAfAvhFkOeqPm\r\n6kP41IHVXVtGNC/UogcdiKUiR/N59IfYB+o2v54GMW+ubSC3BohLFbho/oZZ5XyulIZK75pwTHma\r\nuCIeE5clU9ivpLwPTx9b0Vno9+ApElrFgdY0/YKZ46GfjOC9ta4G25VJ1WKsMmWLtzyrfgwbYopq\r\nuZd724fFdpvsxfIvMG5m3VFkThOqzsOttDcUfyMTqM2pan4txG58uxNJ0MjR03UCEULRU+qMnwID\r\nAQABo4IBJTCCASEwHQYDVR0OBBYEFP8vf+EG9DjzLe0ljZjC/g72bPz6MB8GA1UdIwQYMBaAFOWd\r\nWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYI\r\nKwYBBQUHAwIwEgYDVR0TAQH/BAgwBgEB/wIBADA0BggrBgEFBQcBAQQoMCYwJAYIKwYBBQUHMAGG\r\nGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTA6BgNVHR8EMzAxMC+gLaArhilodHRwOi8vY3JsMy5k\r\naWdpY2VydC5jb20vT21uaXJvb3QyMDI1LmNybDAqBgNVHSAEIzAhMAgGBmeBDAECATAIBgZngQwB\r\nAgIwCwYJKwYBBAGCNyoBMA0GCSqGSIb3DQEBCwUAA4IBAQCg2d165dQ1tHS0IN83uOi4S5heLhsx\r\n+zXIOwtxnvwCWdOJ3wFLQaFDcgaMtN79UjMIFVIUedDZBsvalKnx+6l2tM/VH4YAyNPx+u1LFR0j\r\noPYpQYLbNYkedkNuhRmEBesPqj4aDz68ZDI6fJ92sj2q18QvJUJ5Qz728AvtFOat+AjgK0PFqPYE\r\nAviUKr162NB1XZJxf6uyIjUlnG4UEdHfUqdhl0R84mMtrYINksTzQ2sHYM8fEhqICtTlcRLr/FEr\r\nUaPUe9648nziSnA0qKH7rUZqP/Ifmbo+WNZSZG1BbgOhlk+521W+Ncih3HRbvRBE0LWYT8vWKnfj\r\ngZKxwHwJ\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIF8zCCBNugAwIBAgIQCq+mxcpjxFFB6jvh98dTFzANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMDA3MjkxMjMwMDBaFw0yNDA2Mjcy\r\nMzU5NTlaMFkxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKjAo\r\nBgNVBAMTIU1pY3Jvc29mdCBBenVyZSBUTFMgSXNzdWluZyBDQSAwMTCCAiIwDQYJKoZIhvcNAQEB\r\nBQADggIPADCCAgoCggIBAMedcDrkXufP7pxVm1FHLDNA9IjwHaMoaY8arqqZ4Gff4xyrRygnavXL\r\n7g12MPAx8Q6Dd9hfBzrfWxkF0Br2wIvlvkzW01naNVSkHp+OS3hL3W6nl/jYvZnVeJXjtsKYcXIf\r\n/6WtspcF5awlQ9LZJcjwaH7KoZuK+THpXCMtzD8XNVdmGW/JI0C/7U/E7evXn9XDio8SYkGSM63a\r\nLO5BtLCv092+1d4GGBSQYolRq+7Pd1kREkWBPm0ywZ2Vb8GIS5DLrjelEkBnKCyy3B0yQud9dpVs\r\niUeE7F5sY8Me96WVxQcbOyYdEY/j/9UpDlOG+vA+YgOvBhkKEjiqygVpP8EZoMMijephzg43b5Qi\r\n9r5UrvYoo19oR/8pf4HJNDPF0/FJwFVMW8PmCBLGstin3NE1+NeWTkGt0TzpHjgKyfaDP2tO4bCk\r\n1G7pP2kDFT7SYfc8xbgCkFQ2UCEXsaH/f5YmpLn4YPiNFCeeIida7xnfTvc47IxyVccHHq1FzGyg\r\nOqemrxEETKh8hvDR6eBdrBwmCHVgZrnAqnn93JtGyPLi6+cjWGVGtMZHwzVvX1HvSFG771sskcEj\r\nJxiQNQDQRWHEh3NxvNb7kFlAXnVdRkkvhjpRGchFhTAzqmwltdWhWDEyCMKC2x/mSZvZtlZGY+g3\r\n7Y72qHzidwtyW7rBetZJAgMBAAGjggGtMIIBqTAdBgNVHQ4EFgQUDyBd16FXlduSzyvQx8J3BM5y\r\ngHYwHwYDVR0jBBgwFoAUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1Ud\r\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEB\r\nBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRo\r\ndHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290RzIuY3J0MHsGA1Ud\r\nHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYGZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMA0G\r\nCSqGSIb3DQEBDAUAA4IBAQAlFvNh7QgXVLAZSsNR2XRmIn9iS8OHFCBAWxKJoi8YYQafpMTkMqeu\r\nzoL3HWb1pYEipsDkhiMnrpfeYZEA7Lz7yqEEtfgHcEBsK9KcStQGGZRfmWU07hPXHnFz+5gTXqzC\r\nE2PBMlRgVUYJiA25mJPXfB00gDvGhtYa+mENwM9Bq1B9YYLyLjRtUz8cyGsdyTIG/bBM/Q9jcV8J\r\nGqMU/UjAdh1pFyTnnHElY59Npi7F87ZqYYJEHJM2LGD+le8VsHjgeWX2CJQko7klXvcizuZvUEDT\r\njHaQcs2J+kPgfyMIOY1DMJ21NxOJ2xPRC/wAh/hzSBRVtoAnyuxtkZ4VjIOh\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx\r\nMjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3\r\ndy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq\r\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ\r\nkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO\r\n3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV\r\nBJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM\r\nUNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB\r\no0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu\r\n5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr\r\nF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U\r\nWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH\r\nQRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/\r\niyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl\r\nMrY=\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIF8zCCBNugAwIBAgIQAueRcfuAIek/4tmDg0xQwDANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMDA3MjkxMjMwMDBaFw0yNDA2Mjcy\r\nMzU5NTlaMFkxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKjAo\r\nBgNVBAMTIU1pY3Jvc29mdCBBenVyZSBUTFMgSXNzdWluZyBDQSAwNjCCAiIwDQYJKoZIhvcNAQEB\r\nBQADggIPADCCAgoCggIBALVGARl56bx3KBUSGuPc4H5uoNFkFH4e7pvTCxRi4j/+z+XbwjEz+5Ci\r\npDOqjx9/jWjskL5dk7PaQkzItidsAAnDCW1leZBOIi68Lff1bjTeZgMYiwdRd3Y39b/lcGpiuP2d\r\n23W95YHkMMT8IlWosYIX0f4kYb62rphyfnAjYb/4Od99ThnhlAxGtfvSbXcBVIKCYfZgqRvV+5lR\r\neUnd1aNjRYVzPOoifgSx2fRyy1+pO1UzaMMNnIOE71bVYW0A1hr19w7kOb0KkJXoALTDDj1ukUED\r\nqQuBfBxReL5mXiu1O7WG0vltg0VZ/SZzctBsdBlx1BkmWYBW261KZgBivrql5ELTKKd8qgtHcLQA\r\n5fl6JB0Qgs5XDaWehN86Gps5JW8ArjGtjcWAIP+X8CQaWfaCnuRm6Bk/03PQWhgdi84qwA0ssRfF\r\nJwHUPTNSnE8EiGVk2frt0u8PG1pwSQsFuNJfcYIHEv1vOzP7uEOuDydsmCjhlxuoK2n5/2aVR3BM\r\nTu+p4+gl8alXoBycyLmj3J/PUgqD8SL5fTCUegGsdia/Sa60N2oV7vQ17wjMN+LXa2rjj/b4ZlZg\r\nXVojDmAjDwIRdDUujQu0RVsJqFLMzSIHpp2CZp7mIoLrySay2YYBu7SiNwL95X6He2kS8eefBBHj\r\nzwW/9FxGqry57i71c2cDAgMBAAGjggGtMIIBqTAdBgNVHQ4EFgQU1cFnOsKjnfR3UltZEjgp5lVo\r\nu6UwHwYDVR0jBBgwFoAUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1Ud\r\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEB\r\nBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRo\r\ndHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290RzIuY3J0MHsGA1Ud\r\nHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYGZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMA0G\r\nCSqGSIb3DQEBDAUAA4IBAQB2oWc93fB8esci/8esixj++N22meiGDjgF+rA2LUK5IOQOgcUSTGKS\r\nqF9lYfAxPjrqPjDCUPHCURv+26ad5P/BYtXtbmtxJWu+cS5BhMDPPeG3oPZwXRHBJFAkY4O4AF7R\r\nIAAUW6EzDflUoDHKv83zOiPfYGcpHc9skxAInCedk7QSgXvMARjjOqdakor21DTmNIUotxo8kHv5\r\nhwRlGhBJwps6fEVi1Bt0trpM/3wYxlr473WSPUFZPgP1j519kLpWOJ8z09wxay+Br29irPcBYv0G\r\nMXlHqThy8y4m/HyTQeI2IMvMrQnwqPpY+rLIXyviI2vLoI+4xKE4Rn38ZZ8m\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIF8zCCBNugAwIBAgIQDXvt6X2CCZZ6UmMbi90YvTANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMDA3MjkxMjMwMDBaFw0yNDA2Mjcy\r\nMzU5NTlaMFkxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKjAo\r\nBgNVBAMTIU1pY3Jvc29mdCBBenVyZSBUTFMgSXNzdWluZyBDQSAwNTCCAiIwDQYJKoZIhvcNAQEB\r\nBQADggIPADCCAgoCggIBAKplDTmQ9afwVPQelDuu+NkxNJ084CNKnrZ21ABewE+UU4GKDnwygZdK\r\n6agNSMs5UochUEDzz9CpdV5tdPzL14O/GeE2gO5/aUFTUMG9c6neyxk5tq1WdKsPkitPws6V8MWa\r\n5d1L/y4RFhZHUsgxxUySlYlGpNcHhhsyr7EvFecZGA1MfsitAWVp6hiWANkWKINfRcdt3Z2A23hm\r\nMH9MRSGBccHiPuzwrVsSmLwvt3WlRDgObJkE40tFYvJ6GXAQiaGHCIWSVObgO3zj6xkdbEFMmJ/z\r\nr2Wet5KEcUDtUBhA4dUUoaPVz69u46V56Vscy3lXu1Ylsk84j5lUPLdsAxtultP4OPQoOTpnY8kx\r\nWkH6kgO5gTKE3HRvoVIjU4xJ0JQ746zy/8GdQA36SaNiz4U3u10zFZg2Rkv2dL1Lv58EXL02r5q5\r\nB/nhVH/M1joTvpRvaeEpAJhkIA9NkpvbGEpSdcA0OrtOOeGtrsiOyMBYkjpB5nw0cJY1QHOr3nIv\r\nJ2OnY+OKJbDSrhFqWsk8/1q6Z1WNvONz7te1pAtHerdPi5pCHeiXCNpv+fadwP0k8czaf2Vs19nY\r\nsgWn5uIyLQL8EehdBzCbOKJy9sl86S4Fqe4HGyAtmqGlaWOsq2A6O/paMi3BSmWTDbgPLCPBbPte\r\n/bsuAEF4ajkPEES3GHP9AgMBAAGjggGtMIIBqTAdBgNVHQ4EFgQUx7KcfxzjuFrv6WgaqF2UwSZS\r\namgwHwYDVR0jBBgwFoAUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1Ud\r\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEB\r\nBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRo\r\ndHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290RzIuY3J0MHsGA1Ud\r\nHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYGZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMA0G\r\nCSqGSIb3DQEBDAUAA4IBAQAe+G+G2RFdWtYxLIKMR5H/aVNFjNP7Jdeu+oZaKaIu7U3NidykFr99\r\n4jSxMBMV768ukJ5/hLSKsuj/SLjmAfwRAZ+w0RGqi/kOvPYUlBr/sKOwr3tVkg9ccZBebnBVG+DL\r\nKTp2Ox0+jYBCPxla5FO252qpk7/6wt8SZk3diSU12Jm7if/jjkhkGB/e8UdfrKoLytDvqVeiwPA5\r\nFPzqKoSqN75byLjsIKJEdNi07SY45hN/RUnsmIoAf93qlaHR/SJWVRhrWt3JmeoBJ2RDK492zF6T\r\nGu1moh4aE6e00YkwTPWreuwvaLB220vWmtgZPs+DSIb2d9hPBdCJgvcho1c7\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIF8zCCBNugAwIBAgIQDGrpfM7VmYOGkKAKnqUyFDANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMDA3MjkxMjMwMDBaFw0yNDA2Mjcy\r\nMzU5NTlaMFkxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKjAo\r\nBgNVBAMTIU1pY3Jvc29mdCBBenVyZSBUTFMgSXNzdWluZyBDQSAwMjCCAiIwDQYJKoZIhvcNAQEB\r\nBQADggIPADCCAgoCggIBAOBiO1K6Fk4fHI6t3mJkpg7lxoeUgL8tz9wuI2z0UgY8vFra3VBo7Qzn\r\nC4K3s9jqKWEyIQY11Le0108bSYa/TK0aioO6itpGiigEG+vH/iqtQXPSu6D804ri0NFZ1SOP9Izj\r\nYuQiK6AWntCqP4WAcZAPtpNrNLPBIyiqmiTDS4dlFg1dskMuVpT4z0MpgEMmxQnrSZ615rBQ25vn\r\nVbBNig04FCsh1V3S8ve5Gzh08oIrL/g5xq95oRrgEeOBIeiegQpoKrLYyo3R1Tt48HmSJCBYQ52Q\r\nc34RgxQdZsLXMUrWuL1JLAZP6yeo47ySSxKCjhq5/AUWvQBP3N/cP/iJzKKKw23qJ/kkVrE0DSVD\r\niIiXWF0c9abSGhYl9SPl86IHcIAIzwelJ4SKpHrVbh0/w4YHdFi5QbdAp7O5KxfxBYhQOeHyis01\r\nzkpYn6SqUFGvbK8eZ8y9Aclt8PIUftMG6q5BhdlBZkDDV3n70RlXwYvllzfZ/nV94l+hYp+GLW7j\r\nSmpxZLG/XEz4OXtTtWwLV+IkIOe/EDF79KCazW2SXOIvVInPoi1PqN4TudNv0GyBF5tRC/aBjUqp\r\nly1YYfeKwgRVs83z5kuiOicmdGZKH9SqU5bnKse7IlyfZLg6yAxYyTNe7A9acJ3/pGmCIkJ/9dfL\r\nUFc4hYb3YyIIYGmqm2/3AgMBAAGjggGtMIIBqTAdBgNVHQ4EFgQUAKuR/CFiJpeaqHkbYUGQYKli\r\nZ/0wHwYDVR0jBBgwFoAUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1Ud\r\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEB\r\nBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRo\r\ndHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290RzIuY3J0MHsGA1Ud\r\nHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYGZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMA0G\r\nCSqGSIb3DQEBDAUAA4IBAQAzo/KdmWPPTaYLQW7J5DqxEiBT9QyYGUfeZd7TR1837H6DSkFa/mGM\r\n1kLwi5y9miZKA9k6T9OwTx8CflcvbNO2UkFW0VCldEGHiyx5421+HpRxMQIRjligePtOtRGXwaNO\r\nQ7ySWfJhRhKcPKe2PGFHQI7/3n+T3kXQ/SLu2lk9Qs5YgSJ3VhxBUznYn1KVKJWPE07M55kuUgCq\r\nuAV0PksZj7EC4nK6e/UVbPumlj1nyjlxhvNud4WYmr4ntbBev6cSbK78dpI/3cr7P/WJPYJuL0Es\r\nO3MgjS3eDCX7NXp5ylue3TcpQfRU8BL+yZC1wqX98R4ndw7X4qfGaE7SlF7I\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDqDCCAy6gAwIBAgIQDo2+XqYQ5su1acc29tcASzAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0yMDA4MTIwMDAwMDBaFw0yNDA2MjcyMzU5\r\nNTlaMF0xCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLjAsBgNV\r\nBAMTJU1pY3Jvc29mdCBBenVyZSBFQ0MgVExTIElzc3VpbmcgQ0EgMDIwdjAQBgcqhkjOPQIBBgUr\r\ngQQAIgNiAATlxJr7ThHOTChFtITU0Taop1bFSVf3h9toLKI7bi0GVWd3a3uQVIImulk4pdVuOkoC\r\nI+wEIBkrsEnNUrH28+uUXb48SnwzdhArFcG3zygvZEnBYdcWNlOLKZ5XZhqUZKKjggGtMIIBqTAd\r\nBgNVHQ4EFgQUneUOdzdHngkz2ZC+KgnCEn9O0qMwHwYDVR0jBBgwFoAUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNV\r\nHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEBBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au\r\nZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln\r\naUNlcnRHbG9iYWxSb290RzMuY3J0MHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYG\r\nZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMAoGCCqGSM49BAMDA2gAMGUCMCIdzL1WliSNxC+uX8Iz\r\ngfyxdmELlX0I7TtWowrKUov8QSfi57irRIGpHvmxoFW7XQIxAPdJJZ/jAbKJ5lS21mLnKcdsctXO\r\ntl2eFVqGSfIFWbJUihZCKesfoSMThZ4fa/Ir8g==\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw\r\nMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k\r\naWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C\r\nAQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O\r\nYwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP\r\nBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y\r\n3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34\r\nVOKa5Vt8sycX\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDqDCCAy6gAwIBAgIQBm55zXYkxjEwx3q+tqi7lDAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0yMDA4MTIwMDAwMDBaFw0yNDA2MjcyMzU5\r\nNTlaMF0xCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLjAsBgNV\r\nBAMTJU1pY3Jvc29mdCBBenVyZSBFQ0MgVExTIElzc3VpbmcgQ0EgMDYwdjAQBgcqhkjOPQIBBgUr\r\ngQQAIgNiAARodFftKDyrox+TSSyDI1N0mihPAZTht8YaqlSbw8xGGrHBU6msYCcfjOdsbxmOyYv4\r\naF1IlXQWxionC+Z4BuqhQobPhgmB6sFxES9K441KK9QLTUWQYapoCbyfodkT/JqjggGtMIIBqTAd\r\nBgNVHQ4EFgQUH87HnWRTX7b8lQeulSYzUcEn2SYwHwYDVR0jBBgwFoAUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNV\r\nHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEBBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au\r\nZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln\r\naUNlcnRHbG9iYWxSb290RzMuY3J0MHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYG\r\nZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMAoGCCqGSM49BAMDA2gAMGUCMC6mseL4nziiCiMxO4ZV\r\nukItZ0JU3nZqpHmDkw3apBtupflaKdHeRqDc/jYXJJagnAIxAPTYJFPD55v1mmssDLRzYpB1DIJT\r\nasbhYvJr69O4PdqSjyrJzduOGHdE3+5NmWy/Ag==\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDqTCCAy6gAwIBAgIQCdxCpfV0/zo4nuBtXU3kQDAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0yMDA4MTIwMDAwMDBaFw0yNDA2MjcyMzU5\r\nNTlaMF0xCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLjAsBgNV\r\nBAMTJU1pY3Jvc29mdCBBenVyZSBFQ0MgVExTIElzc3VpbmcgQ0EgMDEwdjAQBgcqhkjOPQIBBgUr\r\ngQQAIgNiAAS2l9suuS4cCc6TIq49UKNhdFf8aqX+bCNy9qS+Z6oMvojY9juMwieyeWnamryKdYYm\r\nm/Gp7dLAJdOqbDPkpjf1hwFpXzfHvMS7dkYAOZznH9xAXB2DhYZtyhGqcyE6j5yjggGtMIIBqTAd\r\nBgNVHQ4EFgQUqv0wDdei1e+KencxqmamwmwRu28wHwYDVR0jBBgwFoAUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNV\r\nHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEBBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au\r\nZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln\r\naUNlcnRHbG9iYWxSb290RzMuY3J0MHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYG\r\nZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMAoGCCqGSM49BAMDA2kAMGYCMQDQRUmslOjL+aU3alpy\r\neQ9dwKPz1wGGCTBQqaB/99pLQQEjTd3qyc9dX2Pw8ZRnR4oCMQC+BRXUqY73PRgE7vNdX6Jwrwof\r\nyl27okJaXLVbi6O96eB3a59r8IytP2M8Pubw0hM=\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDqTCCAy6gAwIBAgIQDOWcMP16g1MuLQFGszL5ZTAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0yMDA4MTIwMDAwMDBaFw0yNDA2MjcyMzU5\r\nNTlaMF0xCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLjAsBgNV\r\nBAMTJU1pY3Jvc29mdCBBenVyZSBFQ0MgVExTIElzc3VpbmcgQ0EgMDUwdjAQBgcqhkjOPQIBBgUr\r\ngQQAIgNiAATMpLWI9tiXgEukKWh1kjMYAKbaq50AY1+CBCU/yuChcnzPTKO8Jgj00Z4y2Ic41I59\r\nkHUW7v10Ug2eFNaW6LEwnKkab33I+nswrHlTK0009agqhbSVs1LByY/g26RvTt2jggGtMIIBqTAd\r\nBgNVHQ4EFgQUVd/uHies8p4rnoA5NXlWRzrOsxAwHwYDVR0jBBgwFoAUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNV\r\nHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEBBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au\r\nZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln\r\naUNlcnRHbG9iYWxSb290RzMuY3J0MHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYG\r\nZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMAoGCCqGSM49BAMDA2kAMGYCMQCu22LB4kPjxpFT4OeZ\r\nuLnvAnjQe7bEn4xSyqCz+N54fjhE0lWrh80BvbiKtL0RQTsCMQDvmxaAuzNlRJctCgdw8UUAS4Jg\r\nj0Z1YCj/1pNDE/Jvfb3T81ELCvjeXnMjIlgYNP8=\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEQzCCAyugAwIBAgIQCidf5wTW7ssj1c1bSxpOBDANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjMwMDAwMDBaFw0zMDA5MjIy\r\nMzU5NTlaMFYxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxMDAuBgNVBAMTJ0Rp\r\nZ2lDZXJ0IFRMUyBIeWJyaWQgRUNDIFNIQTM4NCAyMDIwIENBMTB2MBAGByqGSM49AgEGBSuBBAAi\r\nA2IABMEbxppbmNmkKaDp1AS12+umsmxVwP/tmMZJLwYnUcu/cMEFesOxnYeJuq20ExfJqLSDyLiQ\r\n0cx0NTY8g3KwtdD3ImnI8YDEe0CPz2iHJlw5ifFNkU3aiYvkA8ND5b8vc6OCAa4wggGqMB0GA1Ud\r\nDgQWBBQKvAgpF4ylOW16Ds4zxy6z7fvDejAfBgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3R\r\nVTAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB\r\n/wQIMAYBAf8CAQAwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdp\r\nY2VydC5jb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2Vy\r\ndEdsb2JhbFJvb3RDQS5jcnQwewYDVR0fBHQwcjA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA3oDWgM4YxaHR0cDovL2NybDQuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDAwBgNVHSAEKTAnMAcGBWeBDAEBMAgGBmeBDAEC\r\nATAIBgZngQwBAgIwCAYGZ4EMAQIDMA0GCSqGSIb3DQEBDAUAA4IBAQDeOpcbhb17jApY4+PwCwYA\r\neq9EYyp/3YFtERim+vc4YLGwOWK9uHsu8AjJkltz32WQt960V6zALxyZZ02LXvIBoa33llPN1d9R\r\nJzcGRvJvPDGJLEoWKRGC5+23QhST4Nlg+j8cZMsywzEXJNmvPlVv/w+AbxsBCMqkBGPI2lNM8hkm\r\nxPad31z6n58SXqJdH/bYF462YvgdgbYKOytobPAyTgr3mYI5sUjeCzqJx1+NLyc8nAK8Ib2HxnC+\r\nIrrWzfRLvVNve8KaN9EtBH7TuMwNW4SpDCmGr6fY1h3tDjHhkTb9PA36zoaJzu0cIw265vZt6hCm\r\nYWJC+/j+fgZwcPwL\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEFzCCAv+gAwIBAgIQB/LzXIeod6967+lHmTUlvTANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMTA0MTQwMDAwMDBaFw0zMTA0MTMy\r\nMzU5NTlaMFYxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxMDAuBgNVBAMTJ0Rp\r\nZ2lDZXJ0IFRMUyBIeWJyaWQgRUNDIFNIQTM4NCAyMDIwIENBMTB2MBAGByqGSM49AgEGBSuBBAAi\r\nA2IABMEbxppbmNmkKaDp1AS12+umsmxVwP/tmMZJLwYnUcu/cMEFesOxnYeJuq20ExfJqLSDyLiQ\r\n0cx0NTY8g3KwtdD3ImnI8YDEe0CPz2iHJlw5ifFNkU3aiYvkA8ND5b8vc6OCAYIwggF+MBIGA1Ud\r\nEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFAq8CCkXjKU5bXoOzjPHLrPt+8N6MB8GA1UdIwQYMBaA\r\nFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcD\r\nAQYIKwYBBQUHAwIwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdp\r\nY2VydC5jb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2Vy\r\ndEdsb2JhbFJvb3RDQS5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVn\r\ngQwBATAIBgZngQwBAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQwFAAOCAQEAR1mB\r\nf9QbH7Bx9phdGLqYR5iwfnYr6v8ai6wms0KNMeZK6BnQ79oU59cUkqGS8qcuLa/7Hfb7U7CKP/zY\r\nFgrpsC62pQsYkDUmotr2qLcy/JUjS8ZFucTP5Hzu5sn4kL1y45nDHQsFfGqXbbKrAjbYwrwsAZI/\r\nBKOLdRHHuSm8EdCGupK8JvllyDfNJvaGEwwEqonleLHBTnm8dqMLUeTF0J5q/hosVq4GNiejcxwI\r\nfZMy0MJEGdqN9A57HSgDKwmKdsp33Id6rHtSJlWncg+d0ohP/rEhxRqhqjn1VtvChMQ1H3Dau0bw\r\nhr9kAMQ+959GG50jBbl9s08PqUU643QwmA==\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFrTCCBJWgAwIBAgIQB9JqWPDx4GjFlGd8ZBuA+DANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIyMDQwNzAwMDAwMFoXDTI1MDUxMTIzNTk1OVow\r\nSjELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEbMBkGA1UEAxMS\r\nTVNGVCBCQUxUIFJTMjU2IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwTgQW2vE\r\ntqjPda6g6ZwoqAqb1mdoiFEqeYB8nex6Y0mSgW8NnF4C+MiF1MCFjSlWYgkIVycQ4E86g7znUL1u\r\nVdkEol39U6UiogypLAsQh58fDe7goJrTE36BfQBeS9qx/rvfUPv/PhR74miZsc7nOUsaoMMS76LN\r\nymDhXD+imVseHynsmN2D2AJQZ/7nompXsn/NHIdQF2hqFdLqb6tanGSZuCqCvnf9kJ7RNQipq8lo\r\nzQhWSIQu6tQh2Rs+1iv2wEH7XJgSq8rcsnk4qI9uzfcvhPUNwU14a2rtnahcfUBHrjsaCsB7Ubgj\r\nqi+s9j3POkBCcBDW4x84kAwhpGNYIp1abupXdBPPZYZ6VI3ViA9xeoql/ig8tlGLHsalfYb69Hbm\r\nMGdrwDYmf4YIuLmWSBBynmOJUcNSaDSEtKxERNwcUHzrrp9A9SaC4eg8ZK6J5R5mbVr5eegELzWT\r\nvPtXjiCXlfDvpr+PXLchwEkV3xjymdZd7eq+NmaSafY5mCm/C/KF5eQOhgaXomERa2brYyUazJPQ\r\nzoyHwFOdKpfNINqRg+TnzwXoapbZzVXdquafgUYuHOa28T8/nv85tV20kxQMUy+ICV4anHsAibEp\r\nzgLuDV1Cl9CpoDMOL7fFYOpKXn/zLAG5ZyWW6h426JHq5SKWV4z4utoSDiqMGsZpL1UCAwEAAaOC\r\nAX0wggF5MBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFEa78CwfKmRLIeiu3crbctSqIShc\r\nMB8GA1UdIwQYMBaAFOWdWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUE\r\nFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIweQYIKwYBBQUHAQEEbTBrMCQGCCsGAQUFBzABhhhodHRw\r\nOi8vb2NzcC5kaWdpY2VydC5jb20wQwYIKwYBBQUHMAKGN2h0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0\r\nLmNvbS9CYWx0aW1vcmVDeWJlclRydXN0Um9vdC5jcnQwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDov\r\nL2NybDMuZGlnaWNlcnQuY29tL09tbmlyb290MjAyNS5jcmwwPQYDVR0gBDYwNDALBglghkgBhv1s\r\nAgEwBwYFZ4EMAQEwCAYGZ4EMAQIBMAgGBmeBDAECAjAIBgZngQwBAgMwDQYJKoZIhvcNAQELBQAD\r\nggEBADOP/3F1jZdadZfbmTfTRjJXHHjisxhiFlVL87cG9PLYIgn5E3xfuGKBnaGXnfdGlPBQuwB2\r\nlKIUA1/JuE5CYF//6Kpa087EDV+Vn3pJ04VkIibNi48Efjs6ROSWPeSd/CzqXB15LbeLB8v7tm4f\r\nsD7CRhERJJUfVkGP8s9249cy7V63SovqP6EYQhFxP0lwJUbzhmMNx37mjnK9dMiKhNKhGQ2KUBdH\r\n/NuiuBL11h2mFowSiuNq6sGBNv9JwwKBHQQ05jhzxXEJiw9lcCYg+2yIk5p6IY4ArdAwi4oZ4knE\r\noyyUmOQy/MkTEdsSptaEbOoBncTBFX2YkXulNYTPyz4=\r\n-----END + CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEtjCCA56gAwIBAgIQCv1eRG9c89YADp5Gwibf9jANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMjA0MjgwMDAwMDBaFw0zMjA0Mjcy\r\nMzU5NTlaMEcxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xGDAW\r\nBgNVBAMTD01TRlQgUlMyNTYgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMiJ\r\nV34oeVNHI0mZGh1Rj9mdde3zSY7IhQNqAmRaTzOeRye8QsfhYFXSiMW25JddlcqaqGJ9GEMcJPWB\r\nIBIEdNVYl1bB5KQOl+3m68p59Pu7npC74lJRY8F+p8PLKZAJjSkDD9ExmjHBlPcRrasgflPom3D0\r\nXB++nB1y+WLn+cB7DWLoj6qZSUDyWwnEDkkjfKee6ybxSAXq7oORPe9o2BKfgi7dTKlOd7eKhotw\r\n96yIgMx7yigE3Q3ARS8m+BOFZ/mx150gdKFfMcDNvSkCpxjVWnk//icrrmmEsn2xJbEuDCvtoSNv\r\nGIuCXxqhTM352HGfO2JKAF/Kjf5OrPn2QpECAwEAAaOCAYIwggF+MBIGA1UdEwEB/wQIMAYBAf8C\r\nAQAwHQYDVR0OBBYEFAyBfpQ5X8d3on8XFnk46DWWjn+UMB8GA1UdIwQYMBaAFE4iVCAYlebjbuYP\r\n+vq5Eu0GF485MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw\r\ndgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wQAYI\r\nKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0\r\nR2xvYmFsUm9vdEcyLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVngQwBATAIBgZngQwB\r\nAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQsFAAOCAQEAdYWmf+ABklEQShTbhGPQ\r\nmH1c9BfnEgUFMJsNpzo9dvRj1Uek+L9WfI3kBQn97oUtf25BQsfckIIvTlE3WhA2Cg2yWLTVjH0N\r\ny03dGsqoFYIypnuAwhOWUPHAu++vaUMcPUTUpQCbeC1h4YW4CCSTYN37D2Q555wxnni0elPj9O0p\r\nymWS8gZnsfoKjvoYi/qDPZw1/TSRpenOgI6XjmlmPLBrk4LIw7P7PPg4uXUpCzzeybvARG/NIIkF\r\nv1eRYIbDF+bIkZbJQFdB9BjjlA4ukAg2YkOyCiB8eXTBi2APaceh3+uBLIgLk8ysy52g2U3gP7Q2\r\n6Jlgq/xKzj3O9hFh/g==\r\n-----END + CERTIFICATE-----\r\n"}],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{"ipAddress":"10.0.0.4"},"provisioningState":"Succeeded","repairEnabled":true,"seedNodes":[],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRAZONPOEFCHTCLFT3WFICTCTLV27SOZS46IPJ6SYLA5BUKXXBLHN75QR/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLIUO2KRQ2"}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '38166' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:45:43 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Enqueued"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3eb87bb5-56ea-4ffd-86ab-f0e3cdb5f730?api-version=2022-08-15-preview + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:45:44 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationResults/3eb87bb5-56ea-4ffd-86ab-f0e3cdb5f730?api-version=2022-08-15-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster delete + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3eb87bb5-56ea-4ffd-86ab-f0e3cdb5f730?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:46:14 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster delete + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3eb87bb5-56ea-4ffd-86ab-f0e3cdb5f730?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:46:44 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster delete + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3eb87bb5-56ea-4ffd-86ab-f0e3cdb5f730?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:47:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster delete + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3eb87bb5-56ea-4ffd-86ab-f0e3cdb5f730?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:47:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster delete + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3eb87bb5-56ea-4ffd-86ab-f0e3cdb5f730?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:48:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster delete + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3eb87bb5-56ea-4ffd-86ab-f0e3cdb5f730?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:48:45 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster delete + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3eb87bb5-56ea-4ffd-86ab-f0e3cdb5f730?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:49:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster delete + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3eb87bb5-56ea-4ffd-86ab-f0e3cdb5f730?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:49:46 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster delete + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/3eb87bb5-56ea-4ffd-86ab-f0e3cdb5f730?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '22' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 18:50:15 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok version: 1 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_managed_cassandra_verify_lists.yaml b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_managed_cassandra_verify_lists.yaml index abede68a70d..b998641d24d 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_managed_cassandra_verify_lists.yaml +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/recordings/test_managed_cassandra_verify_lists.yaml @@ -20,21 +20,22 @@ interactions: ParameterSetName: - -g -l -n --subnet-name User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005?api-version=2022-01-01 response: body: string: "{\r\n \"name\": \"cli000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005\",\r\n - \ \"etag\": \"W/\\\"aff800b7-1c94-45fc-a8f7-2b7ca357230c\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"9c13a5a0-9023-4c66-931e-c910afa040f9\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"aea5055f-8abc-43cb-9704-be27c6723c82\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"ec12ff17-d028-4aea-8cd0-cf5338ffff74\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [\r\n {\r\n \"name\": \"cli000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006\",\r\n - \ \"etag\": \"W/\\\"aff800b7-1c94-45fc-a8f7-2b7ca357230c\\\"\",\r\n + \ \"etag\": \"W/\\\"9c13a5a0-9023-4c66-931e-c910afa040f9\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": @@ -45,7 +46,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/a106379a-8a87-4925-9139-d125baba06af?api-version=2022-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/b162fcfe-3043-4164-9f02-9b2a95ab80e3?api-version=2022-01-01 cache-control: - no-cache content-length: @@ -53,7 +54,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:09 GMT + - Thu, 29 Sep 2022 07:08:07 GMT expires: - '-1' pragma: @@ -66,12 +67,12 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 3d7b6906-d577-48f2-8266-53c98cf8c5be + - d25a2815-0849-4459-ab43-98e7c1c2fd24 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 201 - message: Created + message: '' - request: body: null headers: @@ -86,9 +87,10 @@ interactions: ParameterSetName: - -g -l -n --subnet-name User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/a106379a-8a87-4925-9139-d125baba06af?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/b162fcfe-3043-4164-9f02-9b2a95ab80e3?api-version=2022-01-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -100,7 +102,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:12 GMT + - Thu, 29 Sep 2022 07:08:10 GMT expires: - '-1' pragma: @@ -117,10 +119,10 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cfa33560-65e1-4081-bd6d-845ab2cbd357 + - 39f18b1a-47de-457c-af77-05e2313f9875 status: code: 200 - message: OK + message: '' - request: body: null headers: @@ -135,21 +137,22 @@ interactions: ParameterSetName: - -g -l -n --subnet-name User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.1 + (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005?api-version=2022-01-01 response: body: string: "{\r\n \"name\": \"cli000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005\",\r\n - \ \"etag\": \"W/\\\"bc756003-5c5d-4f73-8f65-5b5b48ae0f18\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"9bc4550d-e813-4c45-84ac-68d53d22ba7c\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"aea5055f-8abc-43cb-9704-be27c6723c82\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"ec12ff17-d028-4aea-8cd0-cf5338ffff74\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [\r\n {\r\n \"name\": \"cli000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006\",\r\n - \ \"etag\": \"W/\\\"bc756003-5c5d-4f73-8f65-5b5b48ae0f18\\\"\",\r\n + \ \"etag\": \"W/\\\"9bc4550d-e813-4c45-84ac-68d53d22ba7c\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": @@ -164,9 +167,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:12 GMT + - Thu, 29 Sep 2022 07:08:10 GMT etag: - - W/"bc756003-5c5d-4f73-8f65-5b5b48ae0f18" + - W/"9bc4550d-e813-4c45-84ac-68d53d22ba7c" expires: - '-1' pragma: @@ -183,10 +186,10 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 69f4917e-a2df-4f0a-bdf4-4e38e82e8664 + - d203f0b8-6504-4c02-b294-aa15f8ffae98 status: code: 200 - message: OK + message: '' - request: body: null headers: @@ -201,21 +204,21 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005?api-version=2022-01-01 response: body: string: "{\r\n \"name\": \"cli000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005\",\r\n - \ \"etag\": \"W/\\\"bc756003-5c5d-4f73-8f65-5b5b48ae0f18\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"9bc4550d-e813-4c45-84ac-68d53d22ba7c\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"aea5055f-8abc-43cb-9704-be27c6723c82\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"ec12ff17-d028-4aea-8cd0-cf5338ffff74\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [\r\n {\r\n \"name\": \"cli000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006\",\r\n - \ \"etag\": \"W/\\\"bc756003-5c5d-4f73-8f65-5b5b48ae0f18\\\"\",\r\n + \ \"etag\": \"W/\\\"9bc4550d-e813-4c45-84ac-68d53d22ba7c\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": @@ -230,9 +233,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:12 GMT + - Thu, 29 Sep 2022 07:08:11 GMT etag: - - W/"bc756003-5c5d-4f73-8f65-5b5b48ae0f18" + - W/"9bc4550d-e813-4c45-84ac-68d53d22ba7c" expires: - '-1' pragma: @@ -249,10 +252,10 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - aff81442-1353-4d77-a259-cf8559218feb + - 10a2134a-f7ef-4be8-99da-f764d9ca6211 status: code: 200 - message: OK + message: '' - request: body: null headers: @@ -267,7 +270,7 @@ interactions: ParameterSetName: - --assignee --role --scope User-Agent: - - python/3.10.2 (Windows-10-10.0.19044-SP0) AZURECLI/2.40.0 + - python/3.10.1 (Windows-10-10.0.19044-SP0) AZURECLI/2.40.0 (PIP) method: GET uri: https://graph.microsoft.com/v1.0/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%27e5007d2c-4b13-4a74-9b6a-605d99f03501%27%29 response: @@ -281,11 +284,11 @@ interactions: content-type: - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:13 GMT + - Thu, 29 Sep 2022 07:08:12 GMT odata-version: - '4.0' request-id: - - 3c11be1c-1dea-4ebf-8669-37618fa0129a + - dbe936a5-e988-4bcc-8b8c-d5f04524a007 strict-transport-security: - max-age=31536000 transfer-encoding: @@ -293,7 +296,7 @@ interactions: vary: - Accept-Encoding x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"West US 2","Slice":"E","Ring":"1","ScaleUnit":"002","RoleInstance":"MWH0EPF0005A6B6"}}' + - '{"ServerInfo":{"DataCenter":"West US 2","Slice":"E","Ring":"1","ScaleUnit":"002","RoleInstance":"MWH0EPF00032D56"}}' x-ms-resource-unit: - '1' status: @@ -318,7 +321,7 @@ interactions: ParameterSetName: - --assignee --role --scope User-Agent: - - python/3.10.2 (Windows-10-10.0.19044-SP0) AZURECLI/2.40.0 + - python/3.10.1 (Windows-10-10.0.19044-SP0) AZURECLI/2.40.0 (PIP) method: POST uri: https://graph.microsoft.com/v1.0/directoryObjects/getByIds response: @@ -338,13 +341,13 @@ interactions: content-type: - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:13 GMT + - Thu, 29 Sep 2022 07:08:11 GMT location: - https://graph.microsoft.com odata-version: - '4.0' request-id: - - 09dbcaa0-9ed4-4ba5-bcb7-7aa4f8c2c3c2 + - bfc1fb6b-f409-441a-8bed-caa5fbd33bfb strict-transport-security: - max-age=31536000 transfer-encoding: @@ -352,7 +355,7 @@ interactions: vary: - Accept-Encoding x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"West US 2","Slice":"E","Ring":"1","ScaleUnit":"002","RoleInstance":"MWH0EPF0004E10A"}}' + - '{"ServerInfo":{"DataCenter":"West US 2","Slice":"E","Ring":"1","ScaleUnit":"002","RoleInstance":"MWH0EPF00070F96"}}' x-ms-resource-unit: - '3' status: @@ -377,15 +380,15 @@ interactions: ParameterSetName: - --assignee --role --scope User-Agent: - - python/3.10.2 (Windows-10-10.0.19044-SP0) msrest/0.7.1 msrest_azure/0.6.4 - azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.40.0 + - python/3.10.1 (Windows-10-10.0.19044-SP0) msrest/0.7.1 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.40.0 (PIP) accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001?api-version=2020-04-01-preview response: body: - string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"e5007d2c-4b13-4a74-9b6a-605d99f03501","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005","condition":null,"conditionVersion":null,"createdOn":"2022-09-20T07:28:14.3096115Z","updatedOn":"2022-09-20T07:28:14.8408727Z","createdBy":null,"updatedBy":"3472afbc-da6d-4050-88a0-b0fe52e69bc5","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001","type":"Microsoft.Authorization/roleAssignments","name":"88888888-0000-0000-0000-000000000001"}' + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"e5007d2c-4b13-4a74-9b6a-605d99f03501","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005","condition":null,"conditionVersion":null,"createdOn":"2022-09-29T07:08:13.2546146Z","updatedOn":"2022-09-29T07:08:13.9890686Z","createdBy":null,"updatedBy":"27f82b5d-ce19-4257-a337-dabea1926ae2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001","type":"Microsoft.Authorization/roleAssignments","name":"88888888-0000-0000-0000-000000000001"}' headers: cache-control: - no-cache @@ -394,7 +397,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:16 GMT + - Thu, 29 Sep 2022 07:08:15 GMT expires: - '-1' pragma: @@ -406,7 +409,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' status: code: 201 message: Created @@ -424,13 +427,13 @@ interactions: ParameterSetName: - -g --vnet-name --name User-Agent: - - AZURECLI/2.40.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006?api-version=2022-01-01 response: body: string: "{\r\n \"name\": \"cli000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006\",\r\n - \ \"etag\": \"W/\\\"bc756003-5c5d-4f73-8f65-5b5b48ae0f18\\\"\",\r\n \"properties\": + \ \"etag\": \"W/\\\"9bc4550d-e813-4c45-84ac-68d53d22ba7c\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": @@ -443,9 +446,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Sep 2022 07:28:17 GMT + - Thu, 29 Sep 2022 07:08:15 GMT etag: - - W/"bc756003-5c5d-4f73-8f65-5b5b48ae0f18" + - W/"9bc4550d-e813-4c45-84ac-68d53d22ba7c" expires: - '-1' pragma: @@ -462,7 +465,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a629e2a6-235c-4f04-bb3d-89db1559bfa5 + - 77eb60bd-b734-4819-a943-b5dcb222aa2a status: code: 200 message: OK @@ -486,24 +489,24 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002","name":"cli000002","type":"Microsoft.DocumentDB/cassandraClusters","location":"East - US 2","tags":{},"systemData":{"createdBy":"ashwsing@microsoft.com","createdByType":"User","createdAt":"2022-09-20T07:28:19.6184791Z","lastModifiedBy":"ashwsing@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T07:28:19.6184791Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","externalGossipCertificates":[],"externalSeedNodes":[],"gossipCertificates":[],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{},"provisioningState":"Creating","repairEnabled":true,"seedNodes":[],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRAJIA6MGAIYTMB42TBQHWQ7WHFCVTOSOQP4NQSR2XKZ7UWKQJ2UY72RN/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLIJDS5US5"}}' + US 2","tags":{},"systemData":{"createdBy":"amisi@microsoft.com","createdByType":"User","createdAt":"2022-09-29T07:08:17.6007143Z","lastModifiedBy":"amisi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-29T07:08:17.6007143Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","externalGossipCertificates":[],"externalSeedNodes":[],"gossipCertificates":[],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{},"provisioningState":"Creating","repairEnabled":true,"seedNodes":[],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRADBQGTUAQWYQ3SD3VMVA55K5JLAFWA2C7TUKYWIIJTVYBQVLYJPX6WQ/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLINP6RKUI"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bf63d8ee-b6cf-4672-b2c1-b0f237698d6b?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '1350' + - '1344' content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:19 GMT + - Thu, 29 Sep 2022 07:08:18 GMT pragma: - no-cache server: @@ -533,9 +536,9 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bf63d8ee-b6cf-4672-b2c1-b0f237698d6b?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -547,7 +550,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:28:50 GMT + - Thu, 29 Sep 2022 07:08:48 GMT pragma: - no-cache server: @@ -579,9 +582,9 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bf63d8ee-b6cf-4672-b2c1-b0f237698d6b?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -593,7 +596,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:19 GMT + - Thu, 29 Sep 2022 07:09:18 GMT pragma: - no-cache server: @@ -625,9 +628,9 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bf63d8ee-b6cf-4672-b2c1-b0f237698d6b?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -639,7 +642,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:29:50 GMT + - Thu, 29 Sep 2022 07:09:48 GMT pragma: - no-cache server: @@ -671,9 +674,9 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bf63d8ee-b6cf-4672-b2c1-b0f237698d6b?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -685,7 +688,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:20 GMT + - Thu, 29 Sep 2022 07:10:18 GMT pragma: - no-cache server: @@ -717,9 +720,9 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bf63d8ee-b6cf-4672-b2c1-b0f237698d6b?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -731,7 +734,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:30:50 GMT + - Thu, 29 Sep 2022 07:10:48 GMT pragma: - no-cache server: @@ -763,9 +766,9 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bf63d8ee-b6cf-4672-b2c1-b0f237698d6b?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -777,7 +780,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:21 GMT + - Thu, 29 Sep 2022 07:11:19 GMT pragma: - no-cache server: @@ -809,9 +812,9 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bf63d8ee-b6cf-4672-b2c1-b0f237698d6b?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -823,7 +826,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:31:51 GMT + - Thu, 29 Sep 2022 07:11:49 GMT pragma: - no-cache server: @@ -855,9 +858,9 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bf63d8ee-b6cf-4672-b2c1-b0f237698d6b?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -869,7 +872,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:21 GMT + - Thu, 29 Sep 2022 07:12:19 GMT pragma: - no-cache server: @@ -901,9 +904,9 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bf63d8ee-b6cf-4672-b2c1-b0f237698d6b?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -915,7 +918,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:32:50 GMT + - Thu, 29 Sep 2022 07:12:49 GMT pragma: - no-cache server: @@ -947,9 +950,9 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bf63d8ee-b6cf-4672-b2c1-b0f237698d6b?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -961,7 +964,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:33:20 GMT + - Thu, 29 Sep 2022 07:13:19 GMT pragma: - no-cache server: @@ -993,55 +996,9 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-type: - - application/json - date: - - Tue, 20 Sep 2022 07:33:51 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.14.0 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - managed-cassandra cluster create - Connection: - - keep-alive - ParameterSetName: - - -c -l -g -s -i - User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/60167a4b-6965-4d20-a7c0-f633b94250cd?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/bf63d8ee-b6cf-4672-b2c1-b0f237698d6b?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -1053,7 +1010,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:21 GMT + - Thu, 29 Sep 2022 07:13:49 GMT pragma: - no-cache server: @@ -1085,13 +1042,13 @@ interactions: ParameterSetName: - -c -l -g -s -i User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002","name":"cli000002","type":"Microsoft.DocumentDB/cassandraClusters","location":"East - US 2","tags":{},"systemData":{"createdBy":"ashwsing@microsoft.com","createdByType":"User","createdAt":"2022-09-20T07:28:19.6184791Z","lastModifiedBy":"ashwsing@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T07:28:19.6184791Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","externalGossipCertificates":[],"externalSeedNodes":[],"gossipCertificates":[{"pem":"-----BEGIN + US 2","tags":{},"systemData":{"createdBy":"amisi@microsoft.com","createdByType":"User","createdAt":"2022-09-29T07:08:17.6007143Z","lastModifiedBy":"amisi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-29T07:08:17.6007143Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","externalGossipCertificates":[],"externalSeedNodes":[],"gossipCertificates":[{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIElDCCA3ygAwIBAgIQAf2j627KdciIQ4tyS8+8kTANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0xMzAzMDgxMjAwMDBaFw0yMzAzMDgx\r\nMjAwMDBaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAVowggFWMBIGA1UdEwEB/wQI\r\nMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgGGMDQGCCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0\r\ncDovL29jc3AuZGlnaWNlcnQuY29tMHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYI\r\nKwYBBQUHAgEWHGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwHQYDVR0OBBYEFA+AYRyCMWHV\r\nLyjnjUY4tCzhxtniMB8GA1UdIwQYMBaAFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA0GCSqGSIb3DQEB\r\nCwUAA4IBAQAjPt9L0jFCpbZ+QlwaRMxp0Wi0XUvgBCFsS+JtzLHgl4+mUwnNqipl5TlPHoOlblyY\r\noiQm5vuh7ZPHLgLGTUq/sELfeNqzqPlt/yGFUzZgTHbO7Djc1lGA8MXW5dRNJ2Srm8c+cftIl7gz\r\nbckTB+6WohsYFfZcTEDts8Ls/3HB40f/1LkAtDdC2iDJ6m6K7hQGrn2iWZiIqBtvLfTyyRRfJs8s\r\njX7tN8Cp1Tm5gr8ZDOo0rwAhaPitc+LJMto4JQtV05od8GiG7S5BNO98pVAdvzr508EIDObtHopY\r\nJeS4d60tbvVS3bR0j6tJLp07kzQoH3jOlOrHvdPJbRzeXDLz\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw\r\nMDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3\r\ndy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq\r\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn\r\nTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5\r\nBmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H\r\n4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y\r\n7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB\r\no2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm\r\n8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF\r\nBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr\r\nEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt\r\ntep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886\r\nUAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\r\nCAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIE6DCCA9CgAwIBAgIQAnQuqhfKjiHHF7sf/P0MoDANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjMwMDAwMDBaFw0zMDA5MjIy\r\nMzU5NTlaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAa4wggGqMB0GA1UdDgQWBBQP\r\ngGEcgjFh1S8o541GOLQs4cbZ4jAfBgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3RVTAOBgNV\r\nHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYB\r\nAf8CAQAwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5j\r\nb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2Jh\r\nbFJvb3RDQS5jcnQwewYDVR0fBHQwcjA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA3oDWgM4YxaHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDAwBgNVHSAEKTAnMAcGBWeBDAEBMAgGBmeBDAECATAIBgZn\r\ngQwBAgIwCAYGZ4EMAQIDMA0GCSqGSIb3DQEBCwUAA4IBAQB3MR8Il9cSm2PSEWUIpvZlubj6kgPL\r\noX7hyA2MPrQbkb4CCF6fWXF7Ef3gwOOPWdegUqHQS1TSSJZI73fpKQbLQxCgLzwWji3+HlU87MOY\r\n7hgNI+gH9bMtxKtXc1r2G1O6+x/6vYzTUVEgR17vf5irF0LKhVyfIjc0RXbyQ14AniKDrN+v0ebH\r\nExfppGlkTIBn6rakf4994VH6npdn6mkus5CkHBXIrMtPKex6XF2firjUDLuU7tC8y7WlHgjPxEED\r\nDb0Gw6D0yDdVSvG/5XlCNatBmO/8EznDu1vr72N8gJzISUZwa6CCUD7QBLbKJcXBBVVf8nwvV9Gv\r\nlW+sbXlr\r\n-----END @@ -1113,16 +1070,16 @@ interactions: CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEFzCCAv+gAwIBAgIQB/LzXIeod6967+lHmTUlvTANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMTA0MTQwMDAwMDBaFw0zMTA0MTMy\r\nMzU5NTlaMFYxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxMDAuBgNVBAMTJ0Rp\r\nZ2lDZXJ0IFRMUyBIeWJyaWQgRUNDIFNIQTM4NCAyMDIwIENBMTB2MBAGByqGSM49AgEGBSuBBAAi\r\nA2IABMEbxppbmNmkKaDp1AS12+umsmxVwP/tmMZJLwYnUcu/cMEFesOxnYeJuq20ExfJqLSDyLiQ\r\n0cx0NTY8g3KwtdD3ImnI8YDEe0CPz2iHJlw5ifFNkU3aiYvkA8ND5b8vc6OCAYIwggF+MBIGA1Ud\r\nEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFAq8CCkXjKU5bXoOzjPHLrPt+8N6MB8GA1UdIwQYMBaA\r\nFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcD\r\nAQYIKwYBBQUHAwIwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdp\r\nY2VydC5jb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2Vy\r\ndEdsb2JhbFJvb3RDQS5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVn\r\ngQwBATAIBgZngQwBAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQwFAAOCAQEAR1mB\r\nf9QbH7Bx9phdGLqYR5iwfnYr6v8ai6wms0KNMeZK6BnQ79oU59cUkqGS8qcuLa/7Hfb7U7CKP/zY\r\nFgrpsC62pQsYkDUmotr2qLcy/JUjS8ZFucTP5Hzu5sn4kL1y45nDHQsFfGqXbbKrAjbYwrwsAZI/\r\nBKOLdRHHuSm8EdCGupK8JvllyDfNJvaGEwwEqonleLHBTnm8dqMLUeTF0J5q/hosVq4GNiejcxwI\r\nfZMy0MJEGdqN9A57HSgDKwmKdsp33Id6rHtSJlWncg+d0ohP/rEhxRqhqjn1VtvChMQ1H3Dau0bw\r\nhr9kAMQ+959GG50jBbl9s08PqUU643QwmA==\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFrTCCBJWgAwIBAgIQB9JqWPDx4GjFlGd8ZBuA+DANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIyMDQwNzAwMDAwMFoXDTI1MDUxMTIzNTk1OVow\r\nSjELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEbMBkGA1UEAxMS\r\nTVNGVCBCQUxUIFJTMjU2IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwTgQW2vE\r\ntqjPda6g6ZwoqAqb1mdoiFEqeYB8nex6Y0mSgW8NnF4C+MiF1MCFjSlWYgkIVycQ4E86g7znUL1u\r\nVdkEol39U6UiogypLAsQh58fDe7goJrTE36BfQBeS9qx/rvfUPv/PhR74miZsc7nOUsaoMMS76LN\r\nymDhXD+imVseHynsmN2D2AJQZ/7nompXsn/NHIdQF2hqFdLqb6tanGSZuCqCvnf9kJ7RNQipq8lo\r\nzQhWSIQu6tQh2Rs+1iv2wEH7XJgSq8rcsnk4qI9uzfcvhPUNwU14a2rtnahcfUBHrjsaCsB7Ubgj\r\nqi+s9j3POkBCcBDW4x84kAwhpGNYIp1abupXdBPPZYZ6VI3ViA9xeoql/ig8tlGLHsalfYb69Hbm\r\nMGdrwDYmf4YIuLmWSBBynmOJUcNSaDSEtKxERNwcUHzrrp9A9SaC4eg8ZK6J5R5mbVr5eegELzWT\r\nvPtXjiCXlfDvpr+PXLchwEkV3xjymdZd7eq+NmaSafY5mCm/C/KF5eQOhgaXomERa2brYyUazJPQ\r\nzoyHwFOdKpfNINqRg+TnzwXoapbZzVXdquafgUYuHOa28T8/nv85tV20kxQMUy+ICV4anHsAibEp\r\nzgLuDV1Cl9CpoDMOL7fFYOpKXn/zLAG5ZyWW6h426JHq5SKWV4z4utoSDiqMGsZpL1UCAwEAAaOC\r\nAX0wggF5MBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFEa78CwfKmRLIeiu3crbctSqIShc\r\nMB8GA1UdIwQYMBaAFOWdWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUE\r\nFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIweQYIKwYBBQUHAQEEbTBrMCQGCCsGAQUFBzABhhhodHRw\r\nOi8vb2NzcC5kaWdpY2VydC5jb20wQwYIKwYBBQUHMAKGN2h0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0\r\nLmNvbS9CYWx0aW1vcmVDeWJlclRydXN0Um9vdC5jcnQwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDov\r\nL2NybDMuZGlnaWNlcnQuY29tL09tbmlyb290MjAyNS5jcmwwPQYDVR0gBDYwNDALBglghkgBhv1s\r\nAgEwBwYFZ4EMAQEwCAYGZ4EMAQIBMAgGBmeBDAECAjAIBgZngQwBAgMwDQYJKoZIhvcNAQELBQAD\r\nggEBADOP/3F1jZdadZfbmTfTRjJXHHjisxhiFlVL87cG9PLYIgn5E3xfuGKBnaGXnfdGlPBQuwB2\r\nlKIUA1/JuE5CYF//6Kpa087EDV+Vn3pJ04VkIibNi48Efjs6ROSWPeSd/CzqXB15LbeLB8v7tm4f\r\nsD7CRhERJJUfVkGP8s9249cy7V63SovqP6EYQhFxP0lwJUbzhmMNx37mjnK9dMiKhNKhGQ2KUBdH\r\n/NuiuBL11h2mFowSiuNq6sGBNv9JwwKBHQQ05jhzxXEJiw9lcCYg+2yIk5p6IY4ArdAwi4oZ4knE\r\noyyUmOQy/MkTEdsSptaEbOoBncTBFX2YkXulNYTPyz4=\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEtjCCA56gAwIBAgIQCv1eRG9c89YADp5Gwibf9jANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMjA0MjgwMDAwMDBaFw0zMjA0Mjcy\r\nMzU5NTlaMEcxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xGDAW\r\nBgNVBAMTD01TRlQgUlMyNTYgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMiJ\r\nV34oeVNHI0mZGh1Rj9mdde3zSY7IhQNqAmRaTzOeRye8QsfhYFXSiMW25JddlcqaqGJ9GEMcJPWB\r\nIBIEdNVYl1bB5KQOl+3m68p59Pu7npC74lJRY8F+p8PLKZAJjSkDD9ExmjHBlPcRrasgflPom3D0\r\nXB++nB1y+WLn+cB7DWLoj6qZSUDyWwnEDkkjfKee6ybxSAXq7oORPe9o2BKfgi7dTKlOd7eKhotw\r\n96yIgMx7yigE3Q3ARS8m+BOFZ/mx150gdKFfMcDNvSkCpxjVWnk//icrrmmEsn2xJbEuDCvtoSNv\r\nGIuCXxqhTM352HGfO2JKAF/Kjf5OrPn2QpECAwEAAaOCAYIwggF+MBIGA1UdEwEB/wQIMAYBAf8C\r\nAQAwHQYDVR0OBBYEFAyBfpQ5X8d3on8XFnk46DWWjn+UMB8GA1UdIwQYMBaAFE4iVCAYlebjbuYP\r\n+vq5Eu0GF485MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw\r\ndgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wQAYI\r\nKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0\r\nR2xvYmFsUm9vdEcyLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVngQwBATAIBgZngQwB\r\nAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQsFAAOCAQEAdYWmf+ABklEQShTbhGPQ\r\nmH1c9BfnEgUFMJsNpzo9dvRj1Uek+L9WfI3kBQn97oUtf25BQsfckIIvTlE3WhA2Cg2yWLTVjH0N\r\ny03dGsqoFYIypnuAwhOWUPHAu++vaUMcPUTUpQCbeC1h4YW4CCSTYN37D2Q555wxnni0elPj9O0p\r\nymWS8gZnsfoKjvoYi/qDPZw1/TSRpenOgI6XjmlmPLBrk4LIw7P7PPg4uXUpCzzeybvARG/NIIkF\r\nv1eRYIbDF+bIkZbJQFdB9BjjlA4ukAg2YkOyCiB8eXTBi2APaceh3+uBLIgLk8ysy52g2U3gP7Q2\r\n6Jlgq/xKzj3O9hFh/g==\r\n-----END - CERTIFICATE-----\r\n"}],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{"ipAddress":"10.0.0.4"},"provisioningState":"Succeeded","repairEnabled":true,"seedNodes":[],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRAJIA6MGAIYTMB42TBQHWQ7WHFCVTOSOQP4NQSR2XKZ7UWKQJ2UY72RN/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLIJDS5US5"}}' + CERTIFICATE-----\r\n"}],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{"ipAddress":"10.0.0.4"},"provisioningState":"Succeeded","repairEnabled":true,"seedNodes":[],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRADBQGTUAQWYQ3SD3VMVA55K5JLAFWA2C7TUKYWIIJTVYBQVLYJPX6WQ/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLINP6RKUI"}}' headers: cache-control: - no-store, no-cache content-length: - - '37259' + - '37253' content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:22 GMT + - Thu, 29 Sep 2022 07:13:50 GMT pragma: - no-cache server: @@ -1154,13 +1111,13 @@ interactions: ParameterSetName: - -c -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-08-15-preview response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002","name":"cli000002","type":"Microsoft.DocumentDB/cassandraClusters","location":"East - US 2","tags":{},"systemData":{"createdBy":"ashwsing@microsoft.com","createdByType":"User","createdAt":"2022-09-20T07:28:19.6184791Z","lastModifiedBy":"ashwsing@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T07:28:19.6184791Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","externalGossipCertificates":[],"externalSeedNodes":[],"gossipCertificates":[{"pem":"-----BEGIN + US 2","tags":{},"systemData":{"createdBy":"amisi@microsoft.com","createdByType":"User","createdAt":"2022-09-29T07:08:17.6007143Z","lastModifiedBy":"amisi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-29T07:08:17.6007143Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","externalGossipCertificates":[],"externalSeedNodes":[],"gossipCertificates":[{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIElDCCA3ygAwIBAgIQAf2j627KdciIQ4tyS8+8kTANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0xMzAzMDgxMjAwMDBaFw0yMzAzMDgx\r\nMjAwMDBaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAVowggFWMBIGA1UdEwEB/wQI\r\nMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgGGMDQGCCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0\r\ncDovL29jc3AuZGlnaWNlcnQuY29tMHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYI\r\nKwYBBQUHAgEWHGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwHQYDVR0OBBYEFA+AYRyCMWHV\r\nLyjnjUY4tCzhxtniMB8GA1UdIwQYMBaAFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA0GCSqGSIb3DQEB\r\nCwUAA4IBAQAjPt9L0jFCpbZ+QlwaRMxp0Wi0XUvgBCFsS+JtzLHgl4+mUwnNqipl5TlPHoOlblyY\r\noiQm5vuh7ZPHLgLGTUq/sELfeNqzqPlt/yGFUzZgTHbO7Djc1lGA8MXW5dRNJ2Srm8c+cftIl7gz\r\nbckTB+6WohsYFfZcTEDts8Ls/3HB40f/1LkAtDdC2iDJ6m6K7hQGrn2iWZiIqBtvLfTyyRRfJs8s\r\njX7tN8Cp1Tm5gr8ZDOo0rwAhaPitc+LJMto4JQtV05od8GiG7S5BNO98pVAdvzr508EIDObtHopY\r\nJeS4d60tbvVS3bR0j6tJLp07kzQoH3jOlOrHvdPJbRzeXDLz\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw\r\nMDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3\r\ndy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq\r\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn\r\nTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5\r\nBmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H\r\n4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y\r\n7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB\r\no2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm\r\n8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF\r\nBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr\r\nEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt\r\ntep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886\r\nUAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\r\nCAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIE6DCCA9CgAwIBAgIQAnQuqhfKjiHHF7sf/P0MoDANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjMwMDAwMDBaFw0zMDA5MjIy\r\nMzU5NTlaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAa4wggGqMB0GA1UdDgQWBBQP\r\ngGEcgjFh1S8o541GOLQs4cbZ4jAfBgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3RVTAOBgNV\r\nHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYB\r\nAf8CAQAwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5j\r\nb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2Jh\r\nbFJvb3RDQS5jcnQwewYDVR0fBHQwcjA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA3oDWgM4YxaHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDAwBgNVHSAEKTAnMAcGBWeBDAEBMAgGBmeBDAECATAIBgZn\r\ngQwBAgIwCAYGZ4EMAQIDMA0GCSqGSIb3DQEBCwUAA4IBAQB3MR8Il9cSm2PSEWUIpvZlubj6kgPL\r\noX7hyA2MPrQbkb4CCF6fWXF7Ef3gwOOPWdegUqHQS1TSSJZI73fpKQbLQxCgLzwWji3+HlU87MOY\r\n7hgNI+gH9bMtxKtXc1r2G1O6+x/6vYzTUVEgR17vf5irF0LKhVyfIjc0RXbyQ14AniKDrN+v0ebH\r\nExfppGlkTIBn6rakf4994VH6npdn6mkus5CkHBXIrMtPKex6XF2firjUDLuU7tC8y7WlHgjPxEED\r\nDb0Gw6D0yDdVSvG/5XlCNatBmO/8EznDu1vr72N8gJzISUZwa6CCUD7QBLbKJcXBBVVf8nwvV9Gv\r\nlW+sbXlr\r\n-----END @@ -1182,16 +1139,16 @@ interactions: CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEFzCCAv+gAwIBAgIQB/LzXIeod6967+lHmTUlvTANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMTA0MTQwMDAwMDBaFw0zMTA0MTMy\r\nMzU5NTlaMFYxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxMDAuBgNVBAMTJ0Rp\r\nZ2lDZXJ0IFRMUyBIeWJyaWQgRUNDIFNIQTM4NCAyMDIwIENBMTB2MBAGByqGSM49AgEGBSuBBAAi\r\nA2IABMEbxppbmNmkKaDp1AS12+umsmxVwP/tmMZJLwYnUcu/cMEFesOxnYeJuq20ExfJqLSDyLiQ\r\n0cx0NTY8g3KwtdD3ImnI8YDEe0CPz2iHJlw5ifFNkU3aiYvkA8ND5b8vc6OCAYIwggF+MBIGA1Ud\r\nEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFAq8CCkXjKU5bXoOzjPHLrPt+8N6MB8GA1UdIwQYMBaA\r\nFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcD\r\nAQYIKwYBBQUHAwIwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdp\r\nY2VydC5jb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2Vy\r\ndEdsb2JhbFJvb3RDQS5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVn\r\ngQwBATAIBgZngQwBAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQwFAAOCAQEAR1mB\r\nf9QbH7Bx9phdGLqYR5iwfnYr6v8ai6wms0KNMeZK6BnQ79oU59cUkqGS8qcuLa/7Hfb7U7CKP/zY\r\nFgrpsC62pQsYkDUmotr2qLcy/JUjS8ZFucTP5Hzu5sn4kL1y45nDHQsFfGqXbbKrAjbYwrwsAZI/\r\nBKOLdRHHuSm8EdCGupK8JvllyDfNJvaGEwwEqonleLHBTnm8dqMLUeTF0J5q/hosVq4GNiejcxwI\r\nfZMy0MJEGdqN9A57HSgDKwmKdsp33Id6rHtSJlWncg+d0ohP/rEhxRqhqjn1VtvChMQ1H3Dau0bw\r\nhr9kAMQ+959GG50jBbl9s08PqUU643QwmA==\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFrTCCBJWgAwIBAgIQB9JqWPDx4GjFlGd8ZBuA+DANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIyMDQwNzAwMDAwMFoXDTI1MDUxMTIzNTk1OVow\r\nSjELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEbMBkGA1UEAxMS\r\nTVNGVCBCQUxUIFJTMjU2IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwTgQW2vE\r\ntqjPda6g6ZwoqAqb1mdoiFEqeYB8nex6Y0mSgW8NnF4C+MiF1MCFjSlWYgkIVycQ4E86g7znUL1u\r\nVdkEol39U6UiogypLAsQh58fDe7goJrTE36BfQBeS9qx/rvfUPv/PhR74miZsc7nOUsaoMMS76LN\r\nymDhXD+imVseHynsmN2D2AJQZ/7nompXsn/NHIdQF2hqFdLqb6tanGSZuCqCvnf9kJ7RNQipq8lo\r\nzQhWSIQu6tQh2Rs+1iv2wEH7XJgSq8rcsnk4qI9uzfcvhPUNwU14a2rtnahcfUBHrjsaCsB7Ubgj\r\nqi+s9j3POkBCcBDW4x84kAwhpGNYIp1abupXdBPPZYZ6VI3ViA9xeoql/ig8tlGLHsalfYb69Hbm\r\nMGdrwDYmf4YIuLmWSBBynmOJUcNSaDSEtKxERNwcUHzrrp9A9SaC4eg8ZK6J5R5mbVr5eegELzWT\r\nvPtXjiCXlfDvpr+PXLchwEkV3xjymdZd7eq+NmaSafY5mCm/C/KF5eQOhgaXomERa2brYyUazJPQ\r\nzoyHwFOdKpfNINqRg+TnzwXoapbZzVXdquafgUYuHOa28T8/nv85tV20kxQMUy+ICV4anHsAibEp\r\nzgLuDV1Cl9CpoDMOL7fFYOpKXn/zLAG5ZyWW6h426JHq5SKWV4z4utoSDiqMGsZpL1UCAwEAAaOC\r\nAX0wggF5MBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFEa78CwfKmRLIeiu3crbctSqIShc\r\nMB8GA1UdIwQYMBaAFOWdWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUE\r\nFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIweQYIKwYBBQUHAQEEbTBrMCQGCCsGAQUFBzABhhhodHRw\r\nOi8vb2NzcC5kaWdpY2VydC5jb20wQwYIKwYBBQUHMAKGN2h0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0\r\nLmNvbS9CYWx0aW1vcmVDeWJlclRydXN0Um9vdC5jcnQwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDov\r\nL2NybDMuZGlnaWNlcnQuY29tL09tbmlyb290MjAyNS5jcmwwPQYDVR0gBDYwNDALBglghkgBhv1s\r\nAgEwBwYFZ4EMAQEwCAYGZ4EMAQIBMAgGBmeBDAECAjAIBgZngQwBAgMwDQYJKoZIhvcNAQELBQAD\r\nggEBADOP/3F1jZdadZfbmTfTRjJXHHjisxhiFlVL87cG9PLYIgn5E3xfuGKBnaGXnfdGlPBQuwB2\r\nlKIUA1/JuE5CYF//6Kpa087EDV+Vn3pJ04VkIibNi48Efjs6ROSWPeSd/CzqXB15LbeLB8v7tm4f\r\nsD7CRhERJJUfVkGP8s9249cy7V63SovqP6EYQhFxP0lwJUbzhmMNx37mjnK9dMiKhNKhGQ2KUBdH\r\n/NuiuBL11h2mFowSiuNq6sGBNv9JwwKBHQQ05jhzxXEJiw9lcCYg+2yIk5p6IY4ArdAwi4oZ4knE\r\noyyUmOQy/MkTEdsSptaEbOoBncTBFX2YkXulNYTPyz4=\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEtjCCA56gAwIBAgIQCv1eRG9c89YADp5Gwibf9jANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMjA0MjgwMDAwMDBaFw0zMjA0Mjcy\r\nMzU5NTlaMEcxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xGDAW\r\nBgNVBAMTD01TRlQgUlMyNTYgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMiJ\r\nV34oeVNHI0mZGh1Rj9mdde3zSY7IhQNqAmRaTzOeRye8QsfhYFXSiMW25JddlcqaqGJ9GEMcJPWB\r\nIBIEdNVYl1bB5KQOl+3m68p59Pu7npC74lJRY8F+p8PLKZAJjSkDD9ExmjHBlPcRrasgflPom3D0\r\nXB++nB1y+WLn+cB7DWLoj6qZSUDyWwnEDkkjfKee6ybxSAXq7oORPe9o2BKfgi7dTKlOd7eKhotw\r\n96yIgMx7yigE3Q3ARS8m+BOFZ/mx150gdKFfMcDNvSkCpxjVWnk//icrrmmEsn2xJbEuDCvtoSNv\r\nGIuCXxqhTM352HGfO2JKAF/Kjf5OrPn2QpECAwEAAaOCAYIwggF+MBIGA1UdEwEB/wQIMAYBAf8C\r\nAQAwHQYDVR0OBBYEFAyBfpQ5X8d3on8XFnk46DWWjn+UMB8GA1UdIwQYMBaAFE4iVCAYlebjbuYP\r\n+vq5Eu0GF485MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw\r\ndgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wQAYI\r\nKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0\r\nR2xvYmFsUm9vdEcyLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVngQwBATAIBgZngQwB\r\nAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQsFAAOCAQEAdYWmf+ABklEQShTbhGPQ\r\nmH1c9BfnEgUFMJsNpzo9dvRj1Uek+L9WfI3kBQn97oUtf25BQsfckIIvTlE3WhA2Cg2yWLTVjH0N\r\ny03dGsqoFYIypnuAwhOWUPHAu++vaUMcPUTUpQCbeC1h4YW4CCSTYN37D2Q555wxnni0elPj9O0p\r\nymWS8gZnsfoKjvoYi/qDPZw1/TSRpenOgI6XjmlmPLBrk4LIw7P7PPg4uXUpCzzeybvARG/NIIkF\r\nv1eRYIbDF+bIkZbJQFdB9BjjlA4ukAg2YkOyCiB8eXTBi2APaceh3+uBLIgLk8ysy52g2U3gP7Q2\r\n6Jlgq/xKzj3O9hFh/g==\r\n-----END - CERTIFICATE-----\r\n"}],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{"ipAddress":"10.0.0.4"},"provisioningState":"Succeeded","repairEnabled":true,"seedNodes":[],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRAJIA6MGAIYTMB42TBQHWQ7WHFCVTOSOQP4NQSR2XKZ7UWKQJ2UY72RN/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLIJDS5US5"}}' + CERTIFICATE-----\r\n"}],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{"ipAddress":"10.0.0.4"},"provisioningState":"Succeeded","repairEnabled":true,"seedNodes":[],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRADBQGTUAQWYQ3SD3VMVA55K5JLAFWA2C7TUKYWIIJTVYBQVLYJPX6WQ/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLINP6RKUI"}}' headers: cache-control: - no-store, no-cache content-length: - - '37259' + - '37253' content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:23 GMT + - Thu, 29 Sep 2022 07:13:51 GMT pragma: - no-cache server: @@ -1228,24 +1185,24 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004","name":"cli-dc000004","type":"Microsoft.DocumentDB/cassandraClusters/dataCenters","systemData":{"createdBy":"ashwsing@microsoft.com","createdByType":"User","createdAt":"2022-09-20T07:34:25.1902792Z","lastModifiedBy":"ashwsing@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T07:34:25.1902792Z"},"properties":{"provisioningState":"Creating","dataCenterLocation":"East + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004","name":"cli-dc000004","type":"Microsoft.DocumentDB/cassandraClusters/dataCenters","systemData":{"createdBy":"amisi@microsoft.com","createdByType":"User","createdAt":"2022-09-29T07:13:52.4700737Z","lastModifiedBy":"amisi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-29T07:13:52.4700737Z"},"properties":{"provisioningState":"Creating","dataCenterLocation":"East US 2","delegatedSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","nodeCount":3,"seedNodes":[],"base64EncodedCassandraYamlFragment":"","availabilityZone":false,"authenticationMethodLdapProperties":null,"errors":[]}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: - - '921' + - '915' content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:25 GMT + - Thu, 29 Sep 2022 07:13:52 GMT pragma: - no-cache server: @@ -1275,9 +1232,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1289,7 +1246,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:34:55 GMT + - Thu, 29 Sep 2022 07:14:22 GMT pragma: - no-cache server: @@ -1321,9 +1278,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1335,7 +1292,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:25 GMT + - Thu, 29 Sep 2022 07:14:53 GMT pragma: - no-cache server: @@ -1367,9 +1324,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1381,7 +1338,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:35:56 GMT + - Thu, 29 Sep 2022 07:15:23 GMT pragma: - no-cache server: @@ -1413,9 +1370,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1427,7 +1384,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:36:26 GMT + - Thu, 29 Sep 2022 07:15:53 GMT pragma: - no-cache server: @@ -1459,9 +1416,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1473,7 +1430,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:36:55 GMT + - Thu, 29 Sep 2022 07:16:24 GMT pragma: - no-cache server: @@ -1505,9 +1462,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1519,7 +1476,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:37:26 GMT + - Thu, 29 Sep 2022 07:16:54 GMT pragma: - no-cache server: @@ -1551,9 +1508,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1565,7 +1522,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:37:56 GMT + - Thu, 29 Sep 2022 07:17:24 GMT pragma: - no-cache server: @@ -1597,9 +1554,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1611,7 +1568,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:38:26 GMT + - Thu, 29 Sep 2022 07:17:54 GMT pragma: - no-cache server: @@ -1643,9 +1600,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1657,7 +1614,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:38:56 GMT + - Thu, 29 Sep 2022 07:18:24 GMT pragma: - no-cache server: @@ -1689,9 +1646,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1703,7 +1660,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:39:27 GMT + - Thu, 29 Sep 2022 07:18:55 GMT pragma: - no-cache server: @@ -1735,9 +1692,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1749,7 +1706,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:39:57 GMT + - Thu, 29 Sep 2022 07:19:25 GMT pragma: - no-cache server: @@ -1781,9 +1738,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1795,7 +1752,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:40:26 GMT + - Thu, 29 Sep 2022 07:19:55 GMT pragma: - no-cache server: @@ -1827,9 +1784,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1841,7 +1798,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:40:57 GMT + - Thu, 29 Sep 2022 07:20:25 GMT pragma: - no-cache server: @@ -1873,9 +1830,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1887,7 +1844,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:41:27 GMT + - Thu, 29 Sep 2022 07:20:55 GMT pragma: - no-cache server: @@ -1919,9 +1876,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1933,7 +1890,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:41:58 GMT + - Thu, 29 Sep 2022 07:21:25 GMT pragma: - no-cache server: @@ -1965,9 +1922,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -1979,7 +1936,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:42:28 GMT + - Thu, 29 Sep 2022 07:21:56 GMT pragma: - no-cache server: @@ -2011,9 +1968,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2025,7 +1982,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:42:57 GMT + - Thu, 29 Sep 2022 07:22:26 GMT pragma: - no-cache server: @@ -2057,9 +2014,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2071,7 +2028,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:43:28 GMT + - Thu, 29 Sep 2022 07:22:56 GMT pragma: - no-cache server: @@ -2103,9 +2060,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2117,7 +2074,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:43:58 GMT + - Thu, 29 Sep 2022 07:23:26 GMT pragma: - no-cache server: @@ -2149,9 +2106,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2163,7 +2120,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:44:28 GMT + - Thu, 29 Sep 2022 07:23:56 GMT pragma: - no-cache server: @@ -2195,9 +2152,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2209,7 +2166,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:44:59 GMT + - Thu, 29 Sep 2022 07:24:27 GMT pragma: - no-cache server: @@ -2241,9 +2198,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2255,7 +2212,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:45:28 GMT + - Thu, 29 Sep 2022 07:24:57 GMT pragma: - no-cache server: @@ -2287,9 +2244,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2301,7 +2258,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:45:59 GMT + - Thu, 29 Sep 2022 07:25:27 GMT pragma: - no-cache server: @@ -2333,9 +2290,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2347,7 +2304,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:46:29 GMT + - Thu, 29 Sep 2022 07:25:57 GMT pragma: - no-cache server: @@ -2379,9 +2336,9 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2393,7 +2350,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:46:59 GMT + - Thu, 29 Sep 2022 07:26:28 GMT pragma: - no-cache server: @@ -2425,9 +2382,101 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/7b53fe18-6cc4-4329-a2df-f5ad6d5f90ec?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:26:58 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra datacenter create + Connection: + - keep-alive + ParameterSetName: + - -c -d -l -g -n -s + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:27:28 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra datacenter create + Connection: + - keep-alive + ParameterSetName: + - -c -d -l -g -n -s + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/1459e125-e0bd-4002-9077-63b564c3b6a3?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -2439,7 +2488,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:29 GMT + - Thu, 29 Sep 2022 07:27:58 GMT pragma: - no-cache server: @@ -2471,22 +2520,22 @@ interactions: ParameterSetName: - -c -d -l -g -n -s User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004","name":"cli-dc000004","type":"Microsoft.DocumentDB/cassandraClusters/dataCenters","systemData":{"createdBy":"ashwsing@microsoft.com","createdByType":"User","createdAt":"2022-09-20T07:34:25.1902792Z","lastModifiedBy":"ashwsing@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T07:34:25.1902792Z"},"properties":{"provisioningState":"Succeeded","dataCenterLocation":"East + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004","name":"cli-dc000004","type":"Microsoft.DocumentDB/cassandraClusters/dataCenters","systemData":{"createdBy":"amisi@microsoft.com","createdByType":"User","createdAt":"2022-09-29T07:13:52.4700737Z","lastModifiedBy":"amisi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-29T07:13:52.4700737Z"},"properties":{"provisioningState":"Succeeded","dataCenterLocation":"East US 2","delegatedSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","nodeCount":3,"seedNodes":[{"ipAddress":"10.0.0.5"},{"ipAddress":"10.0.0.6"},{"ipAddress":"10.0.0.7"}],"base64EncodedCassandraYamlFragment":"","availabilityZone":false,"authenticationMethodLdapProperties":null,"errors":[],"sku":"Standard_DS14_v2","diskSku":"P30","diskCapacity":4}}' headers: cache-control: - no-store, no-cache content-length: - - '1054' + - '1048' content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:29 GMT + - Thu, 29 Sep 2022 07:27:58 GMT pragma: - no-cache server: @@ -2518,22 +2567,22 @@ interactions: ParameterSetName: - -c -d -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004?api-version=2022-08-15-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004","name":"cli-dc000004","type":"Microsoft.DocumentDB/cassandraClusters/dataCenters","systemData":{"createdBy":"ashwsing@microsoft.com","createdByType":"User","createdAt":"2022-09-20T07:34:25.1902792Z","lastModifiedBy":"ashwsing@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T07:34:25.1902792Z"},"properties":{"provisioningState":"Succeeded","dataCenterLocation":"East + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004","name":"cli-dc000004","type":"Microsoft.DocumentDB/cassandraClusters/dataCenters","systemData":{"createdBy":"amisi@microsoft.com","createdByType":"User","createdAt":"2022-09-29T07:13:52.4700737Z","lastModifiedBy":"amisi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-29T07:13:52.4700737Z"},"properties":{"provisioningState":"Succeeded","dataCenterLocation":"East US 2","delegatedSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","nodeCount":3,"seedNodes":[{"ipAddress":"10.0.0.5"},{"ipAddress":"10.0.0.6"},{"ipAddress":"10.0.0.7"}],"base64EncodedCassandraYamlFragment":"","availabilityZone":false,"authenticationMethodLdapProperties":null,"errors":[],"sku":"Standard_DS14_v2","diskSku":"P30","diskCapacity":4}}' headers: cache-control: - no-store, no-cache content-length: - - '1054' + - '1048' content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:30 GMT + - Thu, 29 Sep 2022 07:27:59 GMT pragma: - no-cache server: @@ -2565,22 +2614,22 @@ interactions: ParameterSetName: - -c -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters?api-version=2022-08-15-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004","name":"cli-dc000004","type":"Microsoft.DocumentDB/cassandraClusters/dataCenters","systemData":{"createdBy":"ashwsing@microsoft.com","createdByType":"User","createdAt":"2022-09-20T07:34:25.1902792Z","lastModifiedBy":"ashwsing@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T07:34:25.1902792Z"},"properties":{"provisioningState":"Succeeded","dataCenterLocation":"East + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002/dataCenters/cli-dc000004","name":"cli-dc000004","type":"Microsoft.DocumentDB/cassandraClusters/dataCenters","systemData":{"createdBy":"amisi@microsoft.com","createdByType":"User","createdAt":"2022-09-29T07:13:52.4700737Z","lastModifiedBy":"amisi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-29T07:13:52.4700737Z"},"properties":{"provisioningState":"Succeeded","dataCenterLocation":"East US 2","delegatedSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","nodeCount":3,"seedNodes":[{"ipAddress":"10.0.0.5"},{"ipAddress":"10.0.0.6"},{"ipAddress":"10.0.0.7"}],"base64EncodedCassandraYamlFragment":"","availabilityZone":false,"authenticationMethodLdapProperties":null,"errors":[],"sku":"Standard_DS14_v2","diskSku":"P30","diskCapacity":4}}]}' headers: cache-control: - no-store, no-cache content-length: - - '1066' + - '1060' content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:31 GMT + - Thu, 29 Sep 2022 07:28:00 GMT pragma: - no-cache server: @@ -2612,13 +2661,13 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters?api-version=2022-08-15-preview response: body: string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002","name":"cli000002","type":"Microsoft.DocumentDB/cassandraClusters","location":"East - US 2","tags":{},"systemData":{"createdBy":"ashwsing@microsoft.com","createdByType":"User","createdAt":"2022-09-20T07:28:19.6184791Z","lastModifiedBy":"ashwsing@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T07:28:19.6184791Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","externalGossipCertificates":[],"externalSeedNodes":[],"gossipCertificates":[{"pem":"-----BEGIN + US 2","tags":{},"systemData":{"createdBy":"amisi@microsoft.com","createdByType":"User","createdAt":"2022-09-29T07:08:17.6007143Z","lastModifiedBy":"amisi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-29T07:08:17.6007143Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","externalGossipCertificates":[],"externalSeedNodes":[],"gossipCertificates":[{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIElDCCA3ygAwIBAgIQAf2j627KdciIQ4tyS8+8kTANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0xMzAzMDgxMjAwMDBaFw0yMzAzMDgx\r\nMjAwMDBaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAVowggFWMBIGA1UdEwEB/wQI\r\nMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgGGMDQGCCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0\r\ncDovL29jc3AuZGlnaWNlcnQuY29tMHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYI\r\nKwYBBQUHAgEWHGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwHQYDVR0OBBYEFA+AYRyCMWHV\r\nLyjnjUY4tCzhxtniMB8GA1UdIwQYMBaAFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA0GCSqGSIb3DQEB\r\nCwUAA4IBAQAjPt9L0jFCpbZ+QlwaRMxp0Wi0XUvgBCFsS+JtzLHgl4+mUwnNqipl5TlPHoOlblyY\r\noiQm5vuh7ZPHLgLGTUq/sELfeNqzqPlt/yGFUzZgTHbO7Djc1lGA8MXW5dRNJ2Srm8c+cftIl7gz\r\nbckTB+6WohsYFfZcTEDts8Ls/3HB40f/1LkAtDdC2iDJ6m6K7hQGrn2iWZiIqBtvLfTyyRRfJs8s\r\njX7tN8Cp1Tm5gr8ZDOo0rwAhaPitc+LJMto4JQtV05od8GiG7S5BNO98pVAdvzr508EIDObtHopY\r\nJeS4d60tbvVS3bR0j6tJLp07kzQoH3jOlOrHvdPJbRzeXDLz\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw\r\nMDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3\r\ndy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq\r\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn\r\nTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5\r\nBmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H\r\n4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y\r\n7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB\r\no2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm\r\n8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF\r\nBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr\r\nEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt\r\ntep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886\r\nUAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\r\nCAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIE6DCCA9CgAwIBAgIQAnQuqhfKjiHHF7sf/P0MoDANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjMwMDAwMDBaFw0zMDA5MjIy\r\nMzU5NTlaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAa4wggGqMB0GA1UdDgQWBBQP\r\ngGEcgjFh1S8o541GOLQs4cbZ4jAfBgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3RVTAOBgNV\r\nHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYB\r\nAf8CAQAwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5j\r\nb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2Jh\r\nbFJvb3RDQS5jcnQwewYDVR0fBHQwcjA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA3oDWgM4YxaHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDAwBgNVHSAEKTAnMAcGBWeBDAEBMAgGBmeBDAECATAIBgZn\r\ngQwBAgIwCAYGZ4EMAQIDMA0GCSqGSIb3DQEBCwUAA4IBAQB3MR8Il9cSm2PSEWUIpvZlubj6kgPL\r\noX7hyA2MPrQbkb4CCF6fWXF7Ef3gwOOPWdegUqHQS1TSSJZI73fpKQbLQxCgLzwWji3+HlU87MOY\r\n7hgNI+gH9bMtxKtXc1r2G1O6+x/6vYzTUVEgR17vf5irF0LKhVyfIjc0RXbyQ14AniKDrN+v0ebH\r\nExfppGlkTIBn6rakf4994VH6npdn6mkus5CkHBXIrMtPKex6XF2firjUDLuU7tC8y7WlHgjPxEED\r\nDb0Gw6D0yDdVSvG/5XlCNatBmO/8EznDu1vr72N8gJzISUZwa6CCUD7QBLbKJcXBBVVf8nwvV9Gv\r\nlW+sbXlr\r\n-----END @@ -2640,16 +2689,16 @@ interactions: CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEFzCCAv+gAwIBAgIQB/LzXIeod6967+lHmTUlvTANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMTA0MTQwMDAwMDBaFw0zMTA0MTMy\r\nMzU5NTlaMFYxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxMDAuBgNVBAMTJ0Rp\r\nZ2lDZXJ0IFRMUyBIeWJyaWQgRUNDIFNIQTM4NCAyMDIwIENBMTB2MBAGByqGSM49AgEGBSuBBAAi\r\nA2IABMEbxppbmNmkKaDp1AS12+umsmxVwP/tmMZJLwYnUcu/cMEFesOxnYeJuq20ExfJqLSDyLiQ\r\n0cx0NTY8g3KwtdD3ImnI8YDEe0CPz2iHJlw5ifFNkU3aiYvkA8ND5b8vc6OCAYIwggF+MBIGA1Ud\r\nEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFAq8CCkXjKU5bXoOzjPHLrPt+8N6MB8GA1UdIwQYMBaA\r\nFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcD\r\nAQYIKwYBBQUHAwIwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdp\r\nY2VydC5jb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2Vy\r\ndEdsb2JhbFJvb3RDQS5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVn\r\ngQwBATAIBgZngQwBAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQwFAAOCAQEAR1mB\r\nf9QbH7Bx9phdGLqYR5iwfnYr6v8ai6wms0KNMeZK6BnQ79oU59cUkqGS8qcuLa/7Hfb7U7CKP/zY\r\nFgrpsC62pQsYkDUmotr2qLcy/JUjS8ZFucTP5Hzu5sn4kL1y45nDHQsFfGqXbbKrAjbYwrwsAZI/\r\nBKOLdRHHuSm8EdCGupK8JvllyDfNJvaGEwwEqonleLHBTnm8dqMLUeTF0J5q/hosVq4GNiejcxwI\r\nfZMy0MJEGdqN9A57HSgDKwmKdsp33Id6rHtSJlWncg+d0ohP/rEhxRqhqjn1VtvChMQ1H3Dau0bw\r\nhr9kAMQ+959GG50jBbl9s08PqUU643QwmA==\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFrTCCBJWgAwIBAgIQB9JqWPDx4GjFlGd8ZBuA+DANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIyMDQwNzAwMDAwMFoXDTI1MDUxMTIzNTk1OVow\r\nSjELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEbMBkGA1UEAxMS\r\nTVNGVCBCQUxUIFJTMjU2IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwTgQW2vE\r\ntqjPda6g6ZwoqAqb1mdoiFEqeYB8nex6Y0mSgW8NnF4C+MiF1MCFjSlWYgkIVycQ4E86g7znUL1u\r\nVdkEol39U6UiogypLAsQh58fDe7goJrTE36BfQBeS9qx/rvfUPv/PhR74miZsc7nOUsaoMMS76LN\r\nymDhXD+imVseHynsmN2D2AJQZ/7nompXsn/NHIdQF2hqFdLqb6tanGSZuCqCvnf9kJ7RNQipq8lo\r\nzQhWSIQu6tQh2Rs+1iv2wEH7XJgSq8rcsnk4qI9uzfcvhPUNwU14a2rtnahcfUBHrjsaCsB7Ubgj\r\nqi+s9j3POkBCcBDW4x84kAwhpGNYIp1abupXdBPPZYZ6VI3ViA9xeoql/ig8tlGLHsalfYb69Hbm\r\nMGdrwDYmf4YIuLmWSBBynmOJUcNSaDSEtKxERNwcUHzrrp9A9SaC4eg8ZK6J5R5mbVr5eegELzWT\r\nvPtXjiCXlfDvpr+PXLchwEkV3xjymdZd7eq+NmaSafY5mCm/C/KF5eQOhgaXomERa2brYyUazJPQ\r\nzoyHwFOdKpfNINqRg+TnzwXoapbZzVXdquafgUYuHOa28T8/nv85tV20kxQMUy+ICV4anHsAibEp\r\nzgLuDV1Cl9CpoDMOL7fFYOpKXn/zLAG5ZyWW6h426JHq5SKWV4z4utoSDiqMGsZpL1UCAwEAAaOC\r\nAX0wggF5MBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFEa78CwfKmRLIeiu3crbctSqIShc\r\nMB8GA1UdIwQYMBaAFOWdWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUE\r\nFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIweQYIKwYBBQUHAQEEbTBrMCQGCCsGAQUFBzABhhhodHRw\r\nOi8vb2NzcC5kaWdpY2VydC5jb20wQwYIKwYBBQUHMAKGN2h0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0\r\nLmNvbS9CYWx0aW1vcmVDeWJlclRydXN0Um9vdC5jcnQwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDov\r\nL2NybDMuZGlnaWNlcnQuY29tL09tbmlyb290MjAyNS5jcmwwPQYDVR0gBDYwNDALBglghkgBhv1s\r\nAgEwBwYFZ4EMAQEwCAYGZ4EMAQIBMAgGBmeBDAECAjAIBgZngQwBAgMwDQYJKoZIhvcNAQELBQAD\r\nggEBADOP/3F1jZdadZfbmTfTRjJXHHjisxhiFlVL87cG9PLYIgn5E3xfuGKBnaGXnfdGlPBQuwB2\r\nlKIUA1/JuE5CYF//6Kpa087EDV+Vn3pJ04VkIibNi48Efjs6ROSWPeSd/CzqXB15LbeLB8v7tm4f\r\nsD7CRhERJJUfVkGP8s9249cy7V63SovqP6EYQhFxP0lwJUbzhmMNx37mjnK9dMiKhNKhGQ2KUBdH\r\n/NuiuBL11h2mFowSiuNq6sGBNv9JwwKBHQQ05jhzxXEJiw9lcCYg+2yIk5p6IY4ArdAwi4oZ4knE\r\noyyUmOQy/MkTEdsSptaEbOoBncTBFX2YkXulNYTPyz4=\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEtjCCA56gAwIBAgIQCv1eRG9c89YADp5Gwibf9jANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMjA0MjgwMDAwMDBaFw0zMjA0Mjcy\r\nMzU5NTlaMEcxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xGDAW\r\nBgNVBAMTD01TRlQgUlMyNTYgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMiJ\r\nV34oeVNHI0mZGh1Rj9mdde3zSY7IhQNqAmRaTzOeRye8QsfhYFXSiMW25JddlcqaqGJ9GEMcJPWB\r\nIBIEdNVYl1bB5KQOl+3m68p59Pu7npC74lJRY8F+p8PLKZAJjSkDD9ExmjHBlPcRrasgflPom3D0\r\nXB++nB1y+WLn+cB7DWLoj6qZSUDyWwnEDkkjfKee6ybxSAXq7oORPe9o2BKfgi7dTKlOd7eKhotw\r\n96yIgMx7yigE3Q3ARS8m+BOFZ/mx150gdKFfMcDNvSkCpxjVWnk//icrrmmEsn2xJbEuDCvtoSNv\r\nGIuCXxqhTM352HGfO2JKAF/Kjf5OrPn2QpECAwEAAaOCAYIwggF+MBIGA1UdEwEB/wQIMAYBAf8C\r\nAQAwHQYDVR0OBBYEFAyBfpQ5X8d3on8XFnk46DWWjn+UMB8GA1UdIwQYMBaAFE4iVCAYlebjbuYP\r\n+vq5Eu0GF485MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw\r\ndgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wQAYI\r\nKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0\r\nR2xvYmFsUm9vdEcyLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVngQwBATAIBgZngQwB\r\nAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQsFAAOCAQEAdYWmf+ABklEQShTbhGPQ\r\nmH1c9BfnEgUFMJsNpzo9dvRj1Uek+L9WfI3kBQn97oUtf25BQsfckIIvTlE3WhA2Cg2yWLTVjH0N\r\ny03dGsqoFYIypnuAwhOWUPHAu++vaUMcPUTUpQCbeC1h4YW4CCSTYN37D2Q555wxnni0elPj9O0p\r\nymWS8gZnsfoKjvoYi/qDPZw1/TSRpenOgI6XjmlmPLBrk4LIw7P7PPg4uXUpCzzeybvARG/NIIkF\r\nv1eRYIbDF+bIkZbJQFdB9BjjlA4ukAg2YkOyCiB8eXTBi2APaceh3+uBLIgLk8ysy52g2U3gP7Q2\r\n6Jlgq/xKzj3O9hFh/g==\r\n-----END - CERTIFICATE-----\r\n"}],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{"ipAddress":"10.0.0.4"},"provisioningState":"Succeeded","repairEnabled":true,"seedNodes":[{"ipAddress":"10.0.0.5"},{"ipAddress":"10.0.0.6"},{"ipAddress":"10.0.0.7"}],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRAJIA6MGAIYTMB42TBQHWQ7WHFCVTOSOQP4NQSR2XKZ7UWKQJ2UY72RN/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLIJDS5US5"}}]}' + CERTIFICATE-----\r\n"}],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{"ipAddress":"10.0.0.4"},"provisioningState":"Succeeded","repairEnabled":true,"seedNodes":[{"ipAddress":"10.0.0.5"},{"ipAddress":"10.0.0.6"},{"ipAddress":"10.0.0.7"}],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRADBQGTUAQWYQ3SD3VMVA55K5JLAFWA2C7TUKYWIIJTVYBQVLYJPX6WQ/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLINP6RKUI"}}]}' headers: cache-control: - no-store, no-cache content-length: - - '37345' + - '37339' content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:33 GMT + - Thu, 29 Sep 2022 07:28:00 GMT pragma: - no-cache server: @@ -2679,36 +2728,13 @@ interactions: Connection: - keep-alive User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/cassandraClusters?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/cassandraClusters?api-version=2022-08-15-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandraaow3lig6u5hk5iqeqod5tgzkrgvkqgniwvy3ei6gjdany6uqfxwgwl/providers/Microsoft.DocumentDB/cassandraClusters/cliafsfy6w","name":"cliafsfy6w","type":"Microsoft.DocumentDB/cassandraClusters","location":"East - US 2","tags":{},"systemData":{"createdBy":"ashwsing@microsoft.com","createdByType":"User","createdAt":"2022-09-20T06:55:09.1152031Z","lastModifiedBy":"ashwsing@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T06:55:09.1152031Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandraaow3lig6u5hk5iqeqod5tgzkrgvkqgniwvy3ei6gjdany6uqfxwgwl/providers/Microsoft.Network/virtualNetworks/clisi7g3ve/subnets/cliitipztl","externalGossipCertificates":[],"externalSeedNodes":[],"gossipCertificates":[{"pem":"-----BEGIN - CERTIFICATE-----\r\nMIIElDCCA3ygAwIBAgIQAf2j627KdciIQ4tyS8+8kTANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0xMzAzMDgxMjAwMDBaFw0yMzAzMDgx\r\nMjAwMDBaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAVowggFWMBIGA1UdEwEB/wQI\r\nMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgGGMDQGCCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0\r\ncDovL29jc3AuZGlnaWNlcnQuY29tMHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYI\r\nKwYBBQUHAgEWHGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwHQYDVR0OBBYEFA+AYRyCMWHV\r\nLyjnjUY4tCzhxtniMB8GA1UdIwQYMBaAFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA0GCSqGSIb3DQEB\r\nCwUAA4IBAQAjPt9L0jFCpbZ+QlwaRMxp0Wi0XUvgBCFsS+JtzLHgl4+mUwnNqipl5TlPHoOlblyY\r\noiQm5vuh7ZPHLgLGTUq/sELfeNqzqPlt/yGFUzZgTHbO7Djc1lGA8MXW5dRNJ2Srm8c+cftIl7gz\r\nbckTB+6WohsYFfZcTEDts8Ls/3HB40f/1LkAtDdC2iDJ6m6K7hQGrn2iWZiIqBtvLfTyyRRfJs8s\r\njX7tN8Cp1Tm5gr8ZDOo0rwAhaPitc+LJMto4JQtV05od8GiG7S5BNO98pVAdvzr508EIDObtHopY\r\nJeS4d60tbvVS3bR0j6tJLp07kzQoH3jOlOrHvdPJbRzeXDLz\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw\r\nMDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3\r\ndy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq\r\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn\r\nTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5\r\nBmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H\r\n4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y\r\n7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB\r\no2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm\r\n8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF\r\nBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr\r\nEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt\r\ntep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886\r\nUAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\r\nCAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIE6DCCA9CgAwIBAgIQAnQuqhfKjiHHF7sf/P0MoDANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjMwMDAwMDBaFw0zMDA5MjIy\r\nMzU5NTlaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAa4wggGqMB0GA1UdDgQWBBQP\r\ngGEcgjFh1S8o541GOLQs4cbZ4jAfBgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3RVTAOBgNV\r\nHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYB\r\nAf8CAQAwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5j\r\nb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2Jh\r\nbFJvb3RDQS5jcnQwewYDVR0fBHQwcjA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA3oDWgM4YxaHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDAwBgNVHSAEKTAnMAcGBWeBDAEBMAgGBmeBDAECATAIBgZn\r\ngQwBAgIwCAYGZ4EMAQIDMA0GCSqGSIb3DQEBCwUAA4IBAQB3MR8Il9cSm2PSEWUIpvZlubj6kgPL\r\noX7hyA2MPrQbkb4CCF6fWXF7Ef3gwOOPWdegUqHQS1TSSJZI73fpKQbLQxCgLzwWji3+HlU87MOY\r\n7hgNI+gH9bMtxKtXc1r2G1O6+x/6vYzTUVEgR17vf5irF0LKhVyfIjc0RXbyQ14AniKDrN+v0ebH\r\nExfppGlkTIBn6rakf4994VH6npdn6mkus5CkHBXIrMtPKex6XF2firjUDLuU7tC8y7WlHgjPxEED\r\nDb0Gw6D0yDdVSvG/5XlCNatBmO/8EznDu1vr72N8gJzISUZwa6CCUD7QBLbKJcXBBVVf8nwvV9Gv\r\nlW+sbXlr\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIE6jCCA9KgAwIBAgIQCjUI1VwpKwF9+K1lwA/35DANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjQwMDAwMDBaFw0zMDA5MjMy\r\nMzU5NTlaME8xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxKTAnBgNVBAMTIERp\r\nZ2lDZXJ0IFRMUyBSU0EgU0hBMjU2IDIwMjAgQ0ExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\r\nCgKCAQEAwUuzZUdwvN1PWNvsnO3DZuUfMRNUrUpmRh8sCuxkB+Uu3Ny5CiDt3+PE0J6aqXodgojl\r\nEVbbHp9YwlHnLDQNLtKS4VbL8Xlfs7uHyiUDe5pSQWYQYE9XE0nw6Ddng9/n00tnTCJRpt8OmRDt\r\nV1F0JuJ9x8piLhMbfyOIJVNvwTRYAIuE//i+p1hJInuWraKImxW8oHzf6VGo1bDtN+I2tIJLYrVJ\r\nmuzHZ9bjPvXj1hJeRPG/cUJ9WIQDgLGBAfr5yjK7tI4nhyfFK3TUqNaX3sNk+crOU6JWvHgXjkkD\r\nKa77SU+kFbnO8lwZV21reacroicgE7XQPUDTITAHk+qZ9QIDAQABo4IBrjCCAaowHQYDVR0OBBYE\r\nFLdrouqoqoSMeeq02g+YssWVdrn0MB8GA1UdIwQYMBaAFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA4G\r\nA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwEgYDVR0TAQH/BAgw\r\nBgEB/wIBADB2BggrBgEFBQcBAQRqMGgwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0\r\nLmNvbTBABggrBgEFBQcwAoY0aHR0cDovL2NhY2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0R2xv\r\nYmFsUm9vdENBLmNydDB7BgNVHR8EdDByMDegNaAzhjFodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v\r\nRGlnaUNlcnRHbG9iYWxSb290Q0EuY3JsMDegNaAzhjFodHRwOi8vY3JsNC5kaWdpY2VydC5jb20v\r\nRGlnaUNlcnRHbG9iYWxSb290Q0EuY3JsMDAGA1UdIAQpMCcwBwYFZ4EMAQEwCAYGZ4EMAQIBMAgG\r\nBmeBDAECAjAIBgZngQwBAgMwDQYJKoZIhvcNAQELBQADggEBAHert3onPa679n/gWlbJhKrKW3EX\r\n3SJH/E6f7tDBpATho+vFScH90cnfjK+URSxGKqNjOSD5nkoklEHIqdninFQFBstcHL4AGw+oWv8Z\r\nu2XHFq8hVt1hBcnpj5h232sb0HIMULkwKXq/YFkQZhM6LawVEWwtIwwCPgU7/uWhnOKK24fXSuhe\r\n50gG66sSmvKvhMNbg0qZgYOrAKHKCjxMoiWJKiKnpPMzTFuMLhoClw+dj20tlQj7T9rxkTgl4Zxu\r\nYRiHas6xuwAwapu3r9rxxZf+ingkquqTgLozZXq8oXfpf2kUCwA/d5KxTVtzhwoT0JzI8ks5T1KE\r\nSaZMkE4f97Q=\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFWjCCBEKgAwIBAgIQDxSWXyAgaZlP1ceseIlB4jANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIwMDcyMTIzMDAwMFoXDTI0MTAwODA3MDAwMFow\r\nTzELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEgMB4GA1UEAxMX\r\nTWljcm9zb2Z0IFJTQSBUTFMgQ0EgMDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCq\r\nYnfPmmOyBoTzkDb0mfMUUavqlQo7Rgb9EUEf/lsGWMk4bgj8T0RIzTqk970eouKVuL5RIMW/snBj\r\nXXgMQ8ApzWRJCZbar879BV8rKpHoAW4uGJssnNABf2n17j9TiFy6BWy+IhVnFILyLNK+W2M3zK9g\r\nheiWa2uACKhuvgCca5Vw/OQYErEdG7LBEzFnMzTmJcliW1iCdXby/vI/OxbfqkKD4zJtm45DJvC9\r\nDh+hpzqvLMiK5uo/+aXSJY+SqhoIEpz+rErHw+uAlKuHFtEjSeeku8eR3+Z5ND9BSqc6JtLqb0bj\r\nOHPm5dSRrgt4nnil75bjc9j3lWXpBb9PXP9Sp/nPCK+nTQmZwHGjUnqlO9ebAVQD47ZisFonnDAm\r\njrZNVqEXF3p7laEHrFMxttYuD81BdOzxAbL9Rb/8MeFGQjE2Qx65qgVfhH+RsYuuD9dUw/3wZAhq\r\n05yO6nk07AM9c+AbNtRoEcdZcLCHfMDcbkXKNs5DJncCqXAN6LhXVERCw/usG2MmCMLSIx9/kwt8\r\nbwhUmitOXc6fpT7SmFvRAtvxg84wUkg4Y/Gx++0j0z6StSeN0EJz150jaHG6WV4HUqaWTb98Tm90\r\nIgXAU4AW2GBOlzFPiU5IY9jt+eXC2Q6yC/ZpTL1LAcnL3Qa/OgLrHN0wiw1KFGD51WRPQ0Sh7QID\r\nAQABo4IBJTCCASEwHQYDVR0OBBYEFLV2DDARzseSQk1Mx1wsyKkM6AtkMB8GA1UdIwQYMBaAFOWd\r\nWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYI\r\nKwYBBQUHAwIwEgYDVR0TAQH/BAgwBgEB/wIBADA0BggrBgEFBQcBAQQoMCYwJAYIKwYBBQUHMAGG\r\nGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTA6BgNVHR8EMzAxMC+gLaArhilodHRwOi8vY3JsMy5k\r\naWdpY2VydC5jb20vT21uaXJvb3QyMDI1LmNybDAqBgNVHSAEIzAhMAgGBmeBDAECATAIBgZngQwB\r\nAgIwCwYJKwYBBAGCNyoBMA0GCSqGSIb3DQEBCwUAA4IBAQCfK76SZ1vae4qt6P+dTQUO7bYNFUHR\r\n5hXcA2D59CJWnEj5na7aKzyowKvQupW4yMH9fGNxtsh6iJswRqOOfZYC4/giBO/gNsBvwr8uDW7t\r\n1nYoDYGHPpvnpxCM2mYfQFHq576/TmeYu1RZY29C4w8xYBlkAA8mDJfRhMCmehk7cN5FJtyWRj2c\r\nZj/hOoI45TYDBChXpOlLZKIYiG1giY16vhCRi6zmPzEwv+tk156N6cGSVm44jTQ/rs1sa0JSYjzU\r\naYngoFdZC4OfxnIkQvUIA4TOFmPzNPEFdjcZsgbeEz4TcGHTBPK4R28F44qIMCtHRV55VMX53ev6\r\nP3hRddJb\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE\r\nChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li\r\nZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC\r\nSUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs\r\ndGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME\r\nuyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB\r\nUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C\r\nG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9\r\nXbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr\r\nl3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI\r\nVDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB\r\nBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh\r\ncL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5\r\nhbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa\r\nY71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H\r\nRCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFWjCCBEKgAwIBAgIQD6dHIsU9iMgPWJ77H51KOjANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIwMDcyMTIzMDAwMFoXDTI0MTAwODA3MDAwMFow\r\nTzELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEgMB4GA1UEAxMX\r\nTWljcm9zb2Z0IFJTQSBUTFMgQ0EgMDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQD0\r\nwBlZqiokfAYhMdHuEvWBapTj9tFKL+NdsS4pFDi8zJVdKQfR+F039CDXtD9YOnqS7o88+isKcgOe\r\nQNTri472mPnn8N3vPCX0bDOEVk+nkZNIBA3zApvGGg/40Thv78kAlxibMipsKahdbuoHByOB4ZlY\r\notcBhf/ObUf65kCRfXMRQqOKWkZLkilPPn3zkYM5GHxeI4MNZ1SoKBEoHa2E/uDwBQVxadY4SRZW\r\nFxMd7ARyI4Cz1ik4N2Z6ALD3MfjAgEEDwoknyw9TGvr4PubAZdqU511zNLBoavar2OAVTl0Tddj+\r\nRAhbnX1/zypqk+ifv+d3CgiDa8Mbvo1u2Q8nuUBrKVUmR6EjkV/dDrIsUaU643v/Wp/uE7xLDdhC\r\n5rplK9siNlYohMTMKLAkjxVeWBWbQj7REickISpc+yowi3yUrO5lCgNAKrCNYw+wAfAvhFkOeqPm\r\n6kP41IHVXVtGNC/UogcdiKUiR/N59IfYB+o2v54GMW+ubSC3BohLFbho/oZZ5XyulIZK75pwTHma\r\nuCIeE5clU9ivpLwPTx9b0Vno9+ApElrFgdY0/YKZ46GfjOC9ta4G25VJ1WKsMmWLtzyrfgwbYopq\r\nuZd724fFdpvsxfIvMG5m3VFkThOqzsOttDcUfyMTqM2pan4txG58uxNJ0MjR03UCEULRU+qMnwID\r\nAQABo4IBJTCCASEwHQYDVR0OBBYEFP8vf+EG9DjzLe0ljZjC/g72bPz6MB8GA1UdIwQYMBaAFOWd\r\nWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYI\r\nKwYBBQUHAwIwEgYDVR0TAQH/BAgwBgEB/wIBADA0BggrBgEFBQcBAQQoMCYwJAYIKwYBBQUHMAGG\r\nGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTA6BgNVHR8EMzAxMC+gLaArhilodHRwOi8vY3JsMy5k\r\naWdpY2VydC5jb20vT21uaXJvb3QyMDI1LmNybDAqBgNVHSAEIzAhMAgGBmeBDAECATAIBgZngQwB\r\nAgIwCwYJKwYBBAGCNyoBMA0GCSqGSIb3DQEBCwUAA4IBAQCg2d165dQ1tHS0IN83uOi4S5heLhsx\r\n+zXIOwtxnvwCWdOJ3wFLQaFDcgaMtN79UjMIFVIUedDZBsvalKnx+6l2tM/VH4YAyNPx+u1LFR0j\r\noPYpQYLbNYkedkNuhRmEBesPqj4aDz68ZDI6fJ92sj2q18QvJUJ5Qz728AvtFOat+AjgK0PFqPYE\r\nAviUKr162NB1XZJxf6uyIjUlnG4UEdHfUqdhl0R84mMtrYINksTzQ2sHYM8fEhqICtTlcRLr/FEr\r\nUaPUe9648nziSnA0qKH7rUZqP/Ifmbo+WNZSZG1BbgOhlk+521W+Ncih3HRbvRBE0LWYT8vWKnfj\r\ngZKxwHwJ\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIF8zCCBNugAwIBAgIQCq+mxcpjxFFB6jvh98dTFzANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMDA3MjkxMjMwMDBaFw0yNDA2Mjcy\r\nMzU5NTlaMFkxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKjAo\r\nBgNVBAMTIU1pY3Jvc29mdCBBenVyZSBUTFMgSXNzdWluZyBDQSAwMTCCAiIwDQYJKoZIhvcNAQEB\r\nBQADggIPADCCAgoCggIBAMedcDrkXufP7pxVm1FHLDNA9IjwHaMoaY8arqqZ4Gff4xyrRygnavXL\r\n7g12MPAx8Q6Dd9hfBzrfWxkF0Br2wIvlvkzW01naNVSkHp+OS3hL3W6nl/jYvZnVeJXjtsKYcXIf\r\n/6WtspcF5awlQ9LZJcjwaH7KoZuK+THpXCMtzD8XNVdmGW/JI0C/7U/E7evXn9XDio8SYkGSM63a\r\nLO5BtLCv092+1d4GGBSQYolRq+7Pd1kREkWBPm0ywZ2Vb8GIS5DLrjelEkBnKCyy3B0yQud9dpVs\r\niUeE7F5sY8Me96WVxQcbOyYdEY/j/9UpDlOG+vA+YgOvBhkKEjiqygVpP8EZoMMijephzg43b5Qi\r\n9r5UrvYoo19oR/8pf4HJNDPF0/FJwFVMW8PmCBLGstin3NE1+NeWTkGt0TzpHjgKyfaDP2tO4bCk\r\n1G7pP2kDFT7SYfc8xbgCkFQ2UCEXsaH/f5YmpLn4YPiNFCeeIida7xnfTvc47IxyVccHHq1FzGyg\r\nOqemrxEETKh8hvDR6eBdrBwmCHVgZrnAqnn93JtGyPLi6+cjWGVGtMZHwzVvX1HvSFG771sskcEj\r\nJxiQNQDQRWHEh3NxvNb7kFlAXnVdRkkvhjpRGchFhTAzqmwltdWhWDEyCMKC2x/mSZvZtlZGY+g3\r\n7Y72qHzidwtyW7rBetZJAgMBAAGjggGtMIIBqTAdBgNVHQ4EFgQUDyBd16FXlduSzyvQx8J3BM5y\r\ngHYwHwYDVR0jBBgwFoAUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1Ud\r\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEB\r\nBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRo\r\ndHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290RzIuY3J0MHsGA1Ud\r\nHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYGZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMA0G\r\nCSqGSIb3DQEBDAUAA4IBAQAlFvNh7QgXVLAZSsNR2XRmIn9iS8OHFCBAWxKJoi8YYQafpMTkMqeu\r\nzoL3HWb1pYEipsDkhiMnrpfeYZEA7Lz7yqEEtfgHcEBsK9KcStQGGZRfmWU07hPXHnFz+5gTXqzC\r\nE2PBMlRgVUYJiA25mJPXfB00gDvGhtYa+mENwM9Bq1B9YYLyLjRtUz8cyGsdyTIG/bBM/Q9jcV8J\r\nGqMU/UjAdh1pFyTnnHElY59Npi7F87ZqYYJEHJM2LGD+le8VsHjgeWX2CJQko7klXvcizuZvUEDT\r\njHaQcs2J+kPgfyMIOY1DMJ21NxOJ2xPRC/wAh/hzSBRVtoAnyuxtkZ4VjIOh\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx\r\nMjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3\r\ndy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq\r\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ\r\nkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO\r\n3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV\r\nBJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM\r\nUNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB\r\no0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu\r\n5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr\r\nF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U\r\nWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH\r\nQRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/\r\niyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl\r\nMrY=\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIF8zCCBNugAwIBAgIQAueRcfuAIek/4tmDg0xQwDANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMDA3MjkxMjMwMDBaFw0yNDA2Mjcy\r\nMzU5NTlaMFkxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKjAo\r\nBgNVBAMTIU1pY3Jvc29mdCBBenVyZSBUTFMgSXNzdWluZyBDQSAwNjCCAiIwDQYJKoZIhvcNAQEB\r\nBQADggIPADCCAgoCggIBALVGARl56bx3KBUSGuPc4H5uoNFkFH4e7pvTCxRi4j/+z+XbwjEz+5Ci\r\npDOqjx9/jWjskL5dk7PaQkzItidsAAnDCW1leZBOIi68Lff1bjTeZgMYiwdRd3Y39b/lcGpiuP2d\r\n23W95YHkMMT8IlWosYIX0f4kYb62rphyfnAjYb/4Od99ThnhlAxGtfvSbXcBVIKCYfZgqRvV+5lR\r\neUnd1aNjRYVzPOoifgSx2fRyy1+pO1UzaMMNnIOE71bVYW0A1hr19w7kOb0KkJXoALTDDj1ukUED\r\nqQuBfBxReL5mXiu1O7WG0vltg0VZ/SZzctBsdBlx1BkmWYBW261KZgBivrql5ELTKKd8qgtHcLQA\r\n5fl6JB0Qgs5XDaWehN86Gps5JW8ArjGtjcWAIP+X8CQaWfaCnuRm6Bk/03PQWhgdi84qwA0ssRfF\r\nJwHUPTNSnE8EiGVk2frt0u8PG1pwSQsFuNJfcYIHEv1vOzP7uEOuDydsmCjhlxuoK2n5/2aVR3BM\r\nTu+p4+gl8alXoBycyLmj3J/PUgqD8SL5fTCUegGsdia/Sa60N2oV7vQ17wjMN+LXa2rjj/b4ZlZg\r\nXVojDmAjDwIRdDUujQu0RVsJqFLMzSIHpp2CZp7mIoLrySay2YYBu7SiNwL95X6He2kS8eefBBHj\r\nzwW/9FxGqry57i71c2cDAgMBAAGjggGtMIIBqTAdBgNVHQ4EFgQU1cFnOsKjnfR3UltZEjgp5lVo\r\nu6UwHwYDVR0jBBgwFoAUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1Ud\r\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEB\r\nBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRo\r\ndHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290RzIuY3J0MHsGA1Ud\r\nHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYGZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMA0G\r\nCSqGSIb3DQEBDAUAA4IBAQB2oWc93fB8esci/8esixj++N22meiGDjgF+rA2LUK5IOQOgcUSTGKS\r\nqF9lYfAxPjrqPjDCUPHCURv+26ad5P/BYtXtbmtxJWu+cS5BhMDPPeG3oPZwXRHBJFAkY4O4AF7R\r\nIAAUW6EzDflUoDHKv83zOiPfYGcpHc9skxAInCedk7QSgXvMARjjOqdakor21DTmNIUotxo8kHv5\r\nhwRlGhBJwps6fEVi1Bt0trpM/3wYxlr473WSPUFZPgP1j519kLpWOJ8z09wxay+Br29irPcBYv0G\r\nMXlHqThy8y4m/HyTQeI2IMvMrQnwqPpY+rLIXyviI2vLoI+4xKE4Rn38ZZ8m\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIF8zCCBNugAwIBAgIQDXvt6X2CCZZ6UmMbi90YvTANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMDA3MjkxMjMwMDBaFw0yNDA2Mjcy\r\nMzU5NTlaMFkxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKjAo\r\nBgNVBAMTIU1pY3Jvc29mdCBBenVyZSBUTFMgSXNzdWluZyBDQSAwNTCCAiIwDQYJKoZIhvcNAQEB\r\nBQADggIPADCCAgoCggIBAKplDTmQ9afwVPQelDuu+NkxNJ084CNKnrZ21ABewE+UU4GKDnwygZdK\r\n6agNSMs5UochUEDzz9CpdV5tdPzL14O/GeE2gO5/aUFTUMG9c6neyxk5tq1WdKsPkitPws6V8MWa\r\n5d1L/y4RFhZHUsgxxUySlYlGpNcHhhsyr7EvFecZGA1MfsitAWVp6hiWANkWKINfRcdt3Z2A23hm\r\nMH9MRSGBccHiPuzwrVsSmLwvt3WlRDgObJkE40tFYvJ6GXAQiaGHCIWSVObgO3zj6xkdbEFMmJ/z\r\nr2Wet5KEcUDtUBhA4dUUoaPVz69u46V56Vscy3lXu1Ylsk84j5lUPLdsAxtultP4OPQoOTpnY8kx\r\nWkH6kgO5gTKE3HRvoVIjU4xJ0JQ746zy/8GdQA36SaNiz4U3u10zFZg2Rkv2dL1Lv58EXL02r5q5\r\nB/nhVH/M1joTvpRvaeEpAJhkIA9NkpvbGEpSdcA0OrtOOeGtrsiOyMBYkjpB5nw0cJY1QHOr3nIv\r\nJ2OnY+OKJbDSrhFqWsk8/1q6Z1WNvONz7te1pAtHerdPi5pCHeiXCNpv+fadwP0k8czaf2Vs19nY\r\nsgWn5uIyLQL8EehdBzCbOKJy9sl86S4Fqe4HGyAtmqGlaWOsq2A6O/paMi3BSmWTDbgPLCPBbPte\r\n/bsuAEF4ajkPEES3GHP9AgMBAAGjggGtMIIBqTAdBgNVHQ4EFgQUx7KcfxzjuFrv6WgaqF2UwSZS\r\namgwHwYDVR0jBBgwFoAUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1Ud\r\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEB\r\nBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRo\r\ndHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290RzIuY3J0MHsGA1Ud\r\nHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYGZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMA0G\r\nCSqGSIb3DQEBDAUAA4IBAQAe+G+G2RFdWtYxLIKMR5H/aVNFjNP7Jdeu+oZaKaIu7U3NidykFr99\r\n4jSxMBMV768ukJ5/hLSKsuj/SLjmAfwRAZ+w0RGqi/kOvPYUlBr/sKOwr3tVkg9ccZBebnBVG+DL\r\nKTp2Ox0+jYBCPxla5FO252qpk7/6wt8SZk3diSU12Jm7if/jjkhkGB/e8UdfrKoLytDvqVeiwPA5\r\nFPzqKoSqN75byLjsIKJEdNi07SY45hN/RUnsmIoAf93qlaHR/SJWVRhrWt3JmeoBJ2RDK492zF6T\r\nGu1moh4aE6e00YkwTPWreuwvaLB220vWmtgZPs+DSIb2d9hPBdCJgvcho1c7\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIF8zCCBNugAwIBAgIQDGrpfM7VmYOGkKAKnqUyFDANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMDA3MjkxMjMwMDBaFw0yNDA2Mjcy\r\nMzU5NTlaMFkxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKjAo\r\nBgNVBAMTIU1pY3Jvc29mdCBBenVyZSBUTFMgSXNzdWluZyBDQSAwMjCCAiIwDQYJKoZIhvcNAQEB\r\nBQADggIPADCCAgoCggIBAOBiO1K6Fk4fHI6t3mJkpg7lxoeUgL8tz9wuI2z0UgY8vFra3VBo7Qzn\r\nC4K3s9jqKWEyIQY11Le0108bSYa/TK0aioO6itpGiigEG+vH/iqtQXPSu6D804ri0NFZ1SOP9Izj\r\nYuQiK6AWntCqP4WAcZAPtpNrNLPBIyiqmiTDS4dlFg1dskMuVpT4z0MpgEMmxQnrSZ615rBQ25vn\r\nVbBNig04FCsh1V3S8ve5Gzh08oIrL/g5xq95oRrgEeOBIeiegQpoKrLYyo3R1Tt48HmSJCBYQ52Q\r\nc34RgxQdZsLXMUrWuL1JLAZP6yeo47ySSxKCjhq5/AUWvQBP3N/cP/iJzKKKw23qJ/kkVrE0DSVD\r\niIiXWF0c9abSGhYl9SPl86IHcIAIzwelJ4SKpHrVbh0/w4YHdFi5QbdAp7O5KxfxBYhQOeHyis01\r\nzkpYn6SqUFGvbK8eZ8y9Aclt8PIUftMG6q5BhdlBZkDDV3n70RlXwYvllzfZ/nV94l+hYp+GLW7j\r\nSmpxZLG/XEz4OXtTtWwLV+IkIOe/EDF79KCazW2SXOIvVInPoi1PqN4TudNv0GyBF5tRC/aBjUqp\r\nly1YYfeKwgRVs83z5kuiOicmdGZKH9SqU5bnKse7IlyfZLg6yAxYyTNe7A9acJ3/pGmCIkJ/9dfL\r\nUFc4hYb3YyIIYGmqm2/3AgMBAAGjggGtMIIBqTAdBgNVHQ4EFgQUAKuR/CFiJpeaqHkbYUGQYKli\r\nZ/0wHwYDVR0jBBgwFoAUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1Ud\r\nJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEB\r\nBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRo\r\ndHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290RzIuY3J0MHsGA1Ud\r\nHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYGZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMA0G\r\nCSqGSIb3DQEBDAUAA4IBAQAzo/KdmWPPTaYLQW7J5DqxEiBT9QyYGUfeZd7TR1837H6DSkFa/mGM\r\n1kLwi5y9miZKA9k6T9OwTx8CflcvbNO2UkFW0VCldEGHiyx5421+HpRxMQIRjligePtOtRGXwaNO\r\nQ7ySWfJhRhKcPKe2PGFHQI7/3n+T3kXQ/SLu2lk9Qs5YgSJ3VhxBUznYn1KVKJWPE07M55kuUgCq\r\nuAV0PksZj7EC4nK6e/UVbPumlj1nyjlxhvNud4WYmr4ntbBev6cSbK78dpI/3cr7P/WJPYJuL0Es\r\nO3MgjS3eDCX7NXp5ylue3TcpQfRU8BL+yZC1wqX98R4ndw7X4qfGaE7SlF7I\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDqDCCAy6gAwIBAgIQDo2+XqYQ5su1acc29tcASzAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0yMDA4MTIwMDAwMDBaFw0yNDA2MjcyMzU5\r\nNTlaMF0xCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLjAsBgNV\r\nBAMTJU1pY3Jvc29mdCBBenVyZSBFQ0MgVExTIElzc3VpbmcgQ0EgMDIwdjAQBgcqhkjOPQIBBgUr\r\ngQQAIgNiAATlxJr7ThHOTChFtITU0Taop1bFSVf3h9toLKI7bi0GVWd3a3uQVIImulk4pdVuOkoC\r\nI+wEIBkrsEnNUrH28+uUXb48SnwzdhArFcG3zygvZEnBYdcWNlOLKZ5XZhqUZKKjggGtMIIBqTAd\r\nBgNVHQ4EFgQUneUOdzdHngkz2ZC+KgnCEn9O0qMwHwYDVR0jBBgwFoAUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNV\r\nHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEBBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au\r\nZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln\r\naUNlcnRHbG9iYWxSb290RzMuY3J0MHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYG\r\nZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMAoGCCqGSM49BAMDA2gAMGUCMCIdzL1WliSNxC+uX8Iz\r\ngfyxdmELlX0I7TtWowrKUov8QSfi57irRIGpHvmxoFW7XQIxAPdJJZ/jAbKJ5lS21mLnKcdsctXO\r\ntl2eFVqGSfIFWbJUihZCKesfoSMThZ4fa/Ir8g==\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw\r\nMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k\r\naWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C\r\nAQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O\r\nYwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP\r\nBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y\r\n3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34\r\nVOKa5Vt8sycX\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDqDCCAy6gAwIBAgIQBm55zXYkxjEwx3q+tqi7lDAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0yMDA4MTIwMDAwMDBaFw0yNDA2MjcyMzU5\r\nNTlaMF0xCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLjAsBgNV\r\nBAMTJU1pY3Jvc29mdCBBenVyZSBFQ0MgVExTIElzc3VpbmcgQ0EgMDYwdjAQBgcqhkjOPQIBBgUr\r\ngQQAIgNiAARodFftKDyrox+TSSyDI1N0mihPAZTht8YaqlSbw8xGGrHBU6msYCcfjOdsbxmOyYv4\r\naF1IlXQWxionC+Z4BuqhQobPhgmB6sFxES9K441KK9QLTUWQYapoCbyfodkT/JqjggGtMIIBqTAd\r\nBgNVHQ4EFgQUH87HnWRTX7b8lQeulSYzUcEn2SYwHwYDVR0jBBgwFoAUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNV\r\nHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEBBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au\r\nZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln\r\naUNlcnRHbG9iYWxSb290RzMuY3J0MHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYG\r\nZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMAoGCCqGSM49BAMDA2gAMGUCMC6mseL4nziiCiMxO4ZV\r\nukItZ0JU3nZqpHmDkw3apBtupflaKdHeRqDc/jYXJJagnAIxAPTYJFPD55v1mmssDLRzYpB1DIJT\r\nasbhYvJr69O4PdqSjyrJzduOGHdE3+5NmWy/Ag==\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDqTCCAy6gAwIBAgIQCdxCpfV0/zo4nuBtXU3kQDAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0yMDA4MTIwMDAwMDBaFw0yNDA2MjcyMzU5\r\nNTlaMF0xCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLjAsBgNV\r\nBAMTJU1pY3Jvc29mdCBBenVyZSBFQ0MgVExTIElzc3VpbmcgQ0EgMDEwdjAQBgcqhkjOPQIBBgUr\r\ngQQAIgNiAAS2l9suuS4cCc6TIq49UKNhdFf8aqX+bCNy9qS+Z6oMvojY9juMwieyeWnamryKdYYm\r\nm/Gp7dLAJdOqbDPkpjf1hwFpXzfHvMS7dkYAOZznH9xAXB2DhYZtyhGqcyE6j5yjggGtMIIBqTAd\r\nBgNVHQ4EFgQUqv0wDdei1e+KencxqmamwmwRu28wHwYDVR0jBBgwFoAUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNV\r\nHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEBBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au\r\nZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln\r\naUNlcnRHbG9iYWxSb290RzMuY3J0MHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYG\r\nZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMAoGCCqGSM49BAMDA2kAMGYCMQDQRUmslOjL+aU3alpy\r\neQ9dwKPz1wGGCTBQqaB/99pLQQEjTd3qyc9dX2Pw8ZRnR4oCMQC+BRXUqY73PRgE7vNdX6Jwrwof\r\nyl27okJaXLVbi6O96eB3a59r8IytP2M8Pubw0hM=\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDqTCCAy6gAwIBAgIQDOWcMP16g1MuLQFGszL5ZTAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\r\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\r\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0yMDA4MTIwMDAwMDBaFw0yNDA2MjcyMzU5\r\nNTlaMF0xCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLjAsBgNV\r\nBAMTJU1pY3Jvc29mdCBBenVyZSBFQ0MgVExTIElzc3VpbmcgQ0EgMDUwdjAQBgcqhkjOPQIBBgUr\r\ngQQAIgNiAATMpLWI9tiXgEukKWh1kjMYAKbaq50AY1+CBCU/yuChcnzPTKO8Jgj00Z4y2Ic41I59\r\nkHUW7v10Ug2eFNaW6LEwnKkab33I+nswrHlTK0009agqhbSVs1LByY/g26RvTt2jggGtMIIBqTAd\r\nBgNVHQ4EFgQUVd/uHies8p4rnoA5NXlWRzrOsxAwHwYDVR0jBBgwFoAUs9tIpPmhxdiuNkHMEWNp\r\nYim8S8YwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjASBgNV\r\nHRMBAf8ECDAGAQH/AgEAMHYGCCsGAQUFBwEBBGowaDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au\r\nZGlnaWNlcnQuY29tMEAGCCsGAQUFBzAChjRodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln\r\naUNlcnRHbG9iYWxSb290RzMuY3J0MHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RHMy5jcmwwHQYDVR0gBBYwFDAIBgZngQwBAgEwCAYG\r\nZ4EMAQICMBAGCSsGAQQBgjcVAQQDAgEAMAoGCCqGSM49BAMDA2kAMGYCMQCu22LB4kPjxpFT4OeZ\r\nuLnvAnjQe7bEn4xSyqCz+N54fjhE0lWrh80BvbiKtL0RQTsCMQDvmxaAuzNlRJctCgdw8UUAS4Jg\r\nj0Z1YCj/1pNDE/Jvfb3T81ELCvjeXnMjIlgYNP8=\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEQzCCAyugAwIBAgIQCidf5wTW7ssj1c1bSxpOBDANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjMwMDAwMDBaFw0zMDA5MjIy\r\nMzU5NTlaMFYxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxMDAuBgNVBAMTJ0Rp\r\nZ2lDZXJ0IFRMUyBIeWJyaWQgRUNDIFNIQTM4NCAyMDIwIENBMTB2MBAGByqGSM49AgEGBSuBBAAi\r\nA2IABMEbxppbmNmkKaDp1AS12+umsmxVwP/tmMZJLwYnUcu/cMEFesOxnYeJuq20ExfJqLSDyLiQ\r\n0cx0NTY8g3KwtdD3ImnI8YDEe0CPz2iHJlw5ifFNkU3aiYvkA8ND5b8vc6OCAa4wggGqMB0GA1Ud\r\nDgQWBBQKvAgpF4ylOW16Ds4zxy6z7fvDejAfBgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3R\r\nVTAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB\r\n/wQIMAYBAf8CAQAwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdp\r\nY2VydC5jb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2Vy\r\ndEdsb2JhbFJvb3RDQS5jcnQwewYDVR0fBHQwcjA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA3oDWgM4YxaHR0cDovL2NybDQuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDAwBgNVHSAEKTAnMAcGBWeBDAEBMAgGBmeBDAEC\r\nATAIBgZngQwBAgIwCAYGZ4EMAQIDMA0GCSqGSIb3DQEBDAUAA4IBAQDeOpcbhb17jApY4+PwCwYA\r\neq9EYyp/3YFtERim+vc4YLGwOWK9uHsu8AjJkltz32WQt960V6zALxyZZ02LXvIBoa33llPN1d9R\r\nJzcGRvJvPDGJLEoWKRGC5+23QhST4Nlg+j8cZMsywzEXJNmvPlVv/w+AbxsBCMqkBGPI2lNM8hkm\r\nxPad31z6n58SXqJdH/bYF462YvgdgbYKOytobPAyTgr3mYI5sUjeCzqJx1+NLyc8nAK8Ib2HxnC+\r\nIrrWzfRLvVNve8KaN9EtBH7TuMwNW4SpDCmGr6fY1h3tDjHhkTb9PA36zoaJzu0cIw265vZt6hCm\r\nYWJC+/j+fgZwcPwL\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEFzCCAv+gAwIBAgIQB/LzXIeod6967+lHmTUlvTANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMTA0MTQwMDAwMDBaFw0zMTA0MTMy\r\nMzU5NTlaMFYxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxMDAuBgNVBAMTJ0Rp\r\nZ2lDZXJ0IFRMUyBIeWJyaWQgRUNDIFNIQTM4NCAyMDIwIENBMTB2MBAGByqGSM49AgEGBSuBBAAi\r\nA2IABMEbxppbmNmkKaDp1AS12+umsmxVwP/tmMZJLwYnUcu/cMEFesOxnYeJuq20ExfJqLSDyLiQ\r\n0cx0NTY8g3KwtdD3ImnI8YDEe0CPz2iHJlw5ifFNkU3aiYvkA8ND5b8vc6OCAYIwggF+MBIGA1Ud\r\nEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFAq8CCkXjKU5bXoOzjPHLrPt+8N6MB8GA1UdIwQYMBaA\r\nFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcD\r\nAQYIKwYBBQUHAwIwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdp\r\nY2VydC5jb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2Vy\r\ndEdsb2JhbFJvb3RDQS5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVn\r\ngQwBATAIBgZngQwBAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQwFAAOCAQEAR1mB\r\nf9QbH7Bx9phdGLqYR5iwfnYr6v8ai6wms0KNMeZK6BnQ79oU59cUkqGS8qcuLa/7Hfb7U7CKP/zY\r\nFgrpsC62pQsYkDUmotr2qLcy/JUjS8ZFucTP5Hzu5sn4kL1y45nDHQsFfGqXbbKrAjbYwrwsAZI/\r\nBKOLdRHHuSm8EdCGupK8JvllyDfNJvaGEwwEqonleLHBTnm8dqMLUeTF0J5q/hosVq4GNiejcxwI\r\nfZMy0MJEGdqN9A57HSgDKwmKdsp33Id6rHtSJlWncg+d0ohP/rEhxRqhqjn1VtvChMQ1H3Dau0bw\r\nhr9kAMQ+959GG50jBbl9s08PqUU643QwmA==\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFrTCCBJWgAwIBAgIQB9JqWPDx4GjFlGd8ZBuA+DANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIyMDQwNzAwMDAwMFoXDTI1MDUxMTIzNTk1OVow\r\nSjELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEbMBkGA1UEAxMS\r\nTVNGVCBCQUxUIFJTMjU2IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwTgQW2vE\r\ntqjPda6g6ZwoqAqb1mdoiFEqeYB8nex6Y0mSgW8NnF4C+MiF1MCFjSlWYgkIVycQ4E86g7znUL1u\r\nVdkEol39U6UiogypLAsQh58fDe7goJrTE36BfQBeS9qx/rvfUPv/PhR74miZsc7nOUsaoMMS76LN\r\nymDhXD+imVseHynsmN2D2AJQZ/7nompXsn/NHIdQF2hqFdLqb6tanGSZuCqCvnf9kJ7RNQipq8lo\r\nzQhWSIQu6tQh2Rs+1iv2wEH7XJgSq8rcsnk4qI9uzfcvhPUNwU14a2rtnahcfUBHrjsaCsB7Ubgj\r\nqi+s9j3POkBCcBDW4x84kAwhpGNYIp1abupXdBPPZYZ6VI3ViA9xeoql/ig8tlGLHsalfYb69Hbm\r\nMGdrwDYmf4YIuLmWSBBynmOJUcNSaDSEtKxERNwcUHzrrp9A9SaC4eg8ZK6J5R5mbVr5eegELzWT\r\nvPtXjiCXlfDvpr+PXLchwEkV3xjymdZd7eq+NmaSafY5mCm/C/KF5eQOhgaXomERa2brYyUazJPQ\r\nzoyHwFOdKpfNINqRg+TnzwXoapbZzVXdquafgUYuHOa28T8/nv85tV20kxQMUy+ICV4anHsAibEp\r\nzgLuDV1Cl9CpoDMOL7fFYOpKXn/zLAG5ZyWW6h426JHq5SKWV4z4utoSDiqMGsZpL1UCAwEAAaOC\r\nAX0wggF5MBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFEa78CwfKmRLIeiu3crbctSqIShc\r\nMB8GA1UdIwQYMBaAFOWdWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUE\r\nFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIweQYIKwYBBQUHAQEEbTBrMCQGCCsGAQUFBzABhhhodHRw\r\nOi8vb2NzcC5kaWdpY2VydC5jb20wQwYIKwYBBQUHMAKGN2h0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0\r\nLmNvbS9CYWx0aW1vcmVDeWJlclRydXN0Um9vdC5jcnQwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDov\r\nL2NybDMuZGlnaWNlcnQuY29tL09tbmlyb290MjAyNS5jcmwwPQYDVR0gBDYwNDALBglghkgBhv1s\r\nAgEwBwYFZ4EMAQEwCAYGZ4EMAQIBMAgGBmeBDAECAjAIBgZngQwBAgMwDQYJKoZIhvcNAQELBQAD\r\nggEBADOP/3F1jZdadZfbmTfTRjJXHHjisxhiFlVL87cG9PLYIgn5E3xfuGKBnaGXnfdGlPBQuwB2\r\nlKIUA1/JuE5CYF//6Kpa087EDV+Vn3pJ04VkIibNi48Efjs6ROSWPeSd/CzqXB15LbeLB8v7tm4f\r\nsD7CRhERJJUfVkGP8s9249cy7V63SovqP6EYQhFxP0lwJUbzhmMNx37mjnK9dMiKhNKhGQ2KUBdH\r\n/NuiuBL11h2mFowSiuNq6sGBNv9JwwKBHQQ05jhzxXEJiw9lcCYg+2yIk5p6IY4ArdAwi4oZ4knE\r\noyyUmOQy/MkTEdsSptaEbOoBncTBFX2YkXulNYTPyz4=\r\n-----END - CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEtjCCA56gAwIBAgIQCv1eRG9c89YADp5Gwibf9jANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMjA0MjgwMDAwMDBaFw0zMjA0Mjcy\r\nMzU5NTlaMEcxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xGDAW\r\nBgNVBAMTD01TRlQgUlMyNTYgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMiJ\r\nV34oeVNHI0mZGh1Rj9mdde3zSY7IhQNqAmRaTzOeRye8QsfhYFXSiMW25JddlcqaqGJ9GEMcJPWB\r\nIBIEdNVYl1bB5KQOl+3m68p59Pu7npC74lJRY8F+p8PLKZAJjSkDD9ExmjHBlPcRrasgflPom3D0\r\nXB++nB1y+WLn+cB7DWLoj6qZSUDyWwnEDkkjfKee6ybxSAXq7oORPe9o2BKfgi7dTKlOd7eKhotw\r\n96yIgMx7yigE3Q3ARS8m+BOFZ/mx150gdKFfMcDNvSkCpxjVWnk//icrrmmEsn2xJbEuDCvtoSNv\r\nGIuCXxqhTM352HGfO2JKAF/Kjf5OrPn2QpECAwEAAaOCAYIwggF+MBIGA1UdEwEB/wQIMAYBAf8C\r\nAQAwHQYDVR0OBBYEFAyBfpQ5X8d3on8XFnk46DWWjn+UMB8GA1UdIwQYMBaAFE4iVCAYlebjbuYP\r\n+vq5Eu0GF485MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw\r\ndgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wQAYI\r\nKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0\r\nR2xvYmFsUm9vdEcyLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVngQwBATAIBgZngQwB\r\nAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQsFAAOCAQEAdYWmf+ABklEQShTbhGPQ\r\nmH1c9BfnEgUFMJsNpzo9dvRj1Uek+L9WfI3kBQn97oUtf25BQsfckIIvTlE3WhA2Cg2yWLTVjH0N\r\ny03dGsqoFYIypnuAwhOWUPHAu++vaUMcPUTUpQCbeC1h4YW4CCSTYN37D2Q555wxnni0elPj9O0p\r\nymWS8gZnsfoKjvoYi/qDPZw1/TSRpenOgI6XjmlmPLBrk4LIw7P7PPg4uXUpCzzeybvARG/NIIkF\r\nv1eRYIbDF+bIkZbJQFdB9BjjlA4ukAg2YkOyCiB8eXTBi2APaceh3+uBLIgLk8ysy52g2U3gP7Q2\r\n6Jlgq/xKzj3O9hFh/g==\r\n-----END - CERTIFICATE-----\r\n"}],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{"ipAddress":"10.0.0.4"},"provisioningState":"Succeeded","repairEnabled":true,"seedNodes":[{"ipAddress":"10.0.0.5"},{"ipAddress":"10.0.0.6"},{"ipAddress":"10.0.0.7"}],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRAAOW3LIG6U5HK5IQEQOD5TGZKRGVKQGNIWVY3EI6GJDANY6UQFXWGWL/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLIAFSFY6W"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002","name":"cli000002","type":"Microsoft.DocumentDB/cassandraClusters","location":"East - US 2","tags":{},"systemData":{"createdBy":"ashwsing@microsoft.com","createdByType":"User","createdAt":"2022-09-20T07:28:19.6184791Z","lastModifiedBy":"ashwsing@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T07:28:19.6184791Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","externalGossipCertificates":[],"externalSeedNodes":[],"gossipCertificates":[{"pem":"-----BEGIN + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002","name":"cli000002","type":"Microsoft.DocumentDB/cassandraClusters","location":"East + US 2","tags":{},"systemData":{"createdBy":"amisi@microsoft.com","createdByType":"User","createdAt":"2022-09-29T07:08:17.6007143Z","lastModifiedBy":"amisi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-29T07:08:17.6007143Z"},"identity":{"type":"None"},"properties":{"authenticationMethod":"Cassandra","errors":[],"cassandraVersion":"3.11","clientCertificates":[],"deallocated":false,"delegatedManagementSubnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.Network/virtualNetworks/cli000005/subnets/cli000006","externalGossipCertificates":[],"externalSeedNodes":[],"gossipCertificates":[{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIElDCCA3ygAwIBAgIQAf2j627KdciIQ4tyS8+8kTANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0xMzAzMDgxMjAwMDBaFw0yMzAzMDgx\r\nMjAwMDBaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAVowggFWMBIGA1UdEwEB/wQI\r\nMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgGGMDQGCCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0\r\ncDovL29jc3AuZGlnaWNlcnQuY29tMHsGA1UdHwR0MHIwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2lj\r\nZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RDQS5jcmwwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYI\r\nKwYBBQUHAgEWHGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwHQYDVR0OBBYEFA+AYRyCMWHV\r\nLyjnjUY4tCzhxtniMB8GA1UdIwQYMBaAFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA0GCSqGSIb3DQEB\r\nCwUAA4IBAQAjPt9L0jFCpbZ+QlwaRMxp0Wi0XUvgBCFsS+JtzLHgl4+mUwnNqipl5TlPHoOlblyY\r\noiQm5vuh7ZPHLgLGTUq/sELfeNqzqPlt/yGFUzZgTHbO7Djc1lGA8MXW5dRNJ2Srm8c+cftIl7gz\r\nbckTB+6WohsYFfZcTEDts8Ls/3HB40f/1LkAtDdC2iDJ6m6K7hQGrn2iWZiIqBtvLfTyyRRfJs8s\r\njX7tN8Cp1Tm5gr8ZDOo0rwAhaPitc+LJMto4JQtV05od8GiG7S5BNO98pVAdvzr508EIDObtHopY\r\nJeS4d60tbvVS3bR0j6tJLp07kzQoH3jOlOrHvdPJbRzeXDLz\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw\r\nMDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3\r\ndy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq\r\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn\r\nTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5\r\nBmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H\r\n4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y\r\n7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB\r\no2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm\r\n8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF\r\nBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr\r\nEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt\r\ntep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886\r\nUAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\r\nCAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIE6DCCA9CgAwIBAgIQAnQuqhfKjiHHF7sf/P0MoDANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMDA5MjMwMDAwMDBaFw0zMDA5MjIy\r\nMzU5NTlaME0xCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRp\r\nZ2lDZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\r\nggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83nf36QYSv\r\nx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1\r\nm5K+wgdlTvza/P96rtxcflUxDOg5B6TXvi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatE\r\np0tYhG2SS4HD2nOLEpdIkARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJ\r\nTvOX6+guqw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAa4wggGqMB0GA1UdDgQWBBQP\r\ngGEcgjFh1S8o541GOLQs4cbZ4jAfBgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3RVTAOBgNV\r\nHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYB\r\nAf8CAQAwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5j\r\nb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2Jh\r\nbFJvb3RDQS5jcnQwewYDVR0fBHQwcjA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA3oDWgM4YxaHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0Rp\r\nZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDAwBgNVHSAEKTAnMAcGBWeBDAEBMAgGBmeBDAECATAIBgZn\r\ngQwBAgIwCAYGZ4EMAQIDMA0GCSqGSIb3DQEBCwUAA4IBAQB3MR8Il9cSm2PSEWUIpvZlubj6kgPL\r\noX7hyA2MPrQbkb4CCF6fWXF7Ef3gwOOPWdegUqHQS1TSSJZI73fpKQbLQxCgLzwWji3+HlU87MOY\r\n7hgNI+gH9bMtxKtXc1r2G1O6+x/6vYzTUVEgR17vf5irF0LKhVyfIjc0RXbyQ14AniKDrN+v0ebH\r\nExfppGlkTIBn6rakf4994VH6npdn6mkus5CkHBXIrMtPKex6XF2firjUDLuU7tC8y7WlHgjPxEED\r\nDb0Gw6D0yDdVSvG/5XlCNatBmO/8EznDu1vr72N8gJzISUZwa6CCUD7QBLbKJcXBBVVf8nwvV9Gv\r\nlW+sbXlr\r\n-----END @@ -2730,16 +2756,16 @@ interactions: CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEFzCCAv+gAwIBAgIQB/LzXIeod6967+lHmTUlvTANBgkqhkiG9w0BAQwFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0yMTA0MTQwMDAwMDBaFw0zMTA0MTMy\r\nMzU5NTlaMFYxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxMDAuBgNVBAMTJ0Rp\r\nZ2lDZXJ0IFRMUyBIeWJyaWQgRUNDIFNIQTM4NCAyMDIwIENBMTB2MBAGByqGSM49AgEGBSuBBAAi\r\nA2IABMEbxppbmNmkKaDp1AS12+umsmxVwP/tmMZJLwYnUcu/cMEFesOxnYeJuq20ExfJqLSDyLiQ\r\n0cx0NTY8g3KwtdD3ImnI8YDEe0CPz2iHJlw5ifFNkU3aiYvkA8ND5b8vc6OCAYIwggF+MBIGA1Ud\r\nEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFAq8CCkXjKU5bXoOzjPHLrPt+8N6MB8GA1UdIwQYMBaA\r\nFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcD\r\nAQYIKwYBBQUHAwIwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdp\r\nY2VydC5jb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2Vy\r\ndEdsb2JhbFJvb3RDQS5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQu\r\nY29tL0RpZ2lDZXJ0R2xvYmFsUm9vdENBLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVn\r\ngQwBATAIBgZngQwBAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQwFAAOCAQEAR1mB\r\nf9QbH7Bx9phdGLqYR5iwfnYr6v8ai6wms0KNMeZK6BnQ79oU59cUkqGS8qcuLa/7Hfb7U7CKP/zY\r\nFgrpsC62pQsYkDUmotr2qLcy/JUjS8ZFucTP5Hzu5sn4kL1y45nDHQsFfGqXbbKrAjbYwrwsAZI/\r\nBKOLdRHHuSm8EdCGupK8JvllyDfNJvaGEwwEqonleLHBTnm8dqMLUeTF0J5q/hosVq4GNiejcxwI\r\nfZMy0MJEGdqN9A57HSgDKwmKdsp33Id6rHtSJlWncg+d0ohP/rEhxRqhqjn1VtvChMQ1H3Dau0bw\r\nhr9kAMQ+959GG50jBbl9s08PqUU643QwmA==\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIFrTCCBJWgAwIBAgIQB9JqWPDx4GjFlGd8ZBuA+DANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQG\r\nEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlC\r\nYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIyMDQwNzAwMDAwMFoXDTI1MDUxMTIzNTk1OVow\r\nSjELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEbMBkGA1UEAxMS\r\nTVNGVCBCQUxUIFJTMjU2IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwTgQW2vE\r\ntqjPda6g6ZwoqAqb1mdoiFEqeYB8nex6Y0mSgW8NnF4C+MiF1MCFjSlWYgkIVycQ4E86g7znUL1u\r\nVdkEol39U6UiogypLAsQh58fDe7goJrTE36BfQBeS9qx/rvfUPv/PhR74miZsc7nOUsaoMMS76LN\r\nymDhXD+imVseHynsmN2D2AJQZ/7nompXsn/NHIdQF2hqFdLqb6tanGSZuCqCvnf9kJ7RNQipq8lo\r\nzQhWSIQu6tQh2Rs+1iv2wEH7XJgSq8rcsnk4qI9uzfcvhPUNwU14a2rtnahcfUBHrjsaCsB7Ubgj\r\nqi+s9j3POkBCcBDW4x84kAwhpGNYIp1abupXdBPPZYZ6VI3ViA9xeoql/ig8tlGLHsalfYb69Hbm\r\nMGdrwDYmf4YIuLmWSBBynmOJUcNSaDSEtKxERNwcUHzrrp9A9SaC4eg8ZK6J5R5mbVr5eegELzWT\r\nvPtXjiCXlfDvpr+PXLchwEkV3xjymdZd7eq+NmaSafY5mCm/C/KF5eQOhgaXomERa2brYyUazJPQ\r\nzoyHwFOdKpfNINqRg+TnzwXoapbZzVXdquafgUYuHOa28T8/nv85tV20kxQMUy+ICV4anHsAibEp\r\nzgLuDV1Cl9CpoDMOL7fFYOpKXn/zLAG5ZyWW6h426JHq5SKWV4z4utoSDiqMGsZpL1UCAwEAAaOC\r\nAX0wggF5MBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFEa78CwfKmRLIeiu3crbctSqIShc\r\nMB8GA1UdIwQYMBaAFOWdWTCCR1jMrPoIVDaGezq1BE3wMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUE\r\nFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIweQYIKwYBBQUHAQEEbTBrMCQGCCsGAQUFBzABhhhodHRw\r\nOi8vb2NzcC5kaWdpY2VydC5jb20wQwYIKwYBBQUHMAKGN2h0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0\r\nLmNvbS9CYWx0aW1vcmVDeWJlclRydXN0Um9vdC5jcnQwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDov\r\nL2NybDMuZGlnaWNlcnQuY29tL09tbmlyb290MjAyNS5jcmwwPQYDVR0gBDYwNDALBglghkgBhv1s\r\nAgEwBwYFZ4EMAQEwCAYGZ4EMAQIBMAgGBmeBDAECAjAIBgZngQwBAgMwDQYJKoZIhvcNAQELBQAD\r\nggEBADOP/3F1jZdadZfbmTfTRjJXHHjisxhiFlVL87cG9PLYIgn5E3xfuGKBnaGXnfdGlPBQuwB2\r\nlKIUA1/JuE5CYF//6Kpa087EDV+Vn3pJ04VkIibNi48Efjs6ROSWPeSd/CzqXB15LbeLB8v7tm4f\r\nsD7CRhERJJUfVkGP8s9249cy7V63SovqP6EYQhFxP0lwJUbzhmMNx37mjnK9dMiKhNKhGQ2KUBdH\r\n/NuiuBL11h2mFowSiuNq6sGBNv9JwwKBHQQ05jhzxXEJiw9lcCYg+2yIk5p6IY4ArdAwi4oZ4knE\r\noyyUmOQy/MkTEdsSptaEbOoBncTBFX2YkXulNYTPyz4=\r\n-----END CERTIFICATE-----\r\n"},{"pem":"-----BEGIN CERTIFICATE-----\r\nMIIEtjCCA56gAwIBAgIQCv1eRG9c89YADp5Gwibf9jANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\r\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\r\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0yMjA0MjgwMDAwMDBaFw0zMjA0Mjcy\r\nMzU5NTlaMEcxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xGDAW\r\nBgNVBAMTD01TRlQgUlMyNTYgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMiJ\r\nV34oeVNHI0mZGh1Rj9mdde3zSY7IhQNqAmRaTzOeRye8QsfhYFXSiMW25JddlcqaqGJ9GEMcJPWB\r\nIBIEdNVYl1bB5KQOl+3m68p59Pu7npC74lJRY8F+p8PLKZAJjSkDD9ExmjHBlPcRrasgflPom3D0\r\nXB++nB1y+WLn+cB7DWLoj6qZSUDyWwnEDkkjfKee6ybxSAXq7oORPe9o2BKfgi7dTKlOd7eKhotw\r\n96yIgMx7yigE3Q3ARS8m+BOFZ/mx150gdKFfMcDNvSkCpxjVWnk//icrrmmEsn2xJbEuDCvtoSNv\r\nGIuCXxqhTM352HGfO2JKAF/Kjf5OrPn2QpECAwEAAaOCAYIwggF+MBIGA1UdEwEB/wQIMAYBAf8C\r\nAQAwHQYDVR0OBBYEFAyBfpQ5X8d3on8XFnk46DWWjn+UMB8GA1UdIwQYMBaAFE4iVCAYlebjbuYP\r\n+vq5Eu0GF485MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw\r\ndgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wQAYI\r\nKwYBBQUHMAKGNGh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RH\r\nMi5jcnQwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0\r\nR2xvYmFsUm9vdEcyLmNybDA9BgNVHSAENjA0MAsGCWCGSAGG/WwCATAHBgVngQwBATAIBgZngQwB\r\nAgEwCAYGZ4EMAQICMAgGBmeBDAECAzANBgkqhkiG9w0BAQsFAAOCAQEAdYWmf+ABklEQShTbhGPQ\r\nmH1c9BfnEgUFMJsNpzo9dvRj1Uek+L9WfI3kBQn97oUtf25BQsfckIIvTlE3WhA2Cg2yWLTVjH0N\r\ny03dGsqoFYIypnuAwhOWUPHAu++vaUMcPUTUpQCbeC1h4YW4CCSTYN37D2Q555wxnni0elPj9O0p\r\nymWS8gZnsfoKjvoYi/qDPZw1/TSRpenOgI6XjmlmPLBrk4LIw7P7PPg4uXUpCzzeybvARG/NIIkF\r\nv1eRYIbDF+bIkZbJQFdB9BjjlA4ukAg2YkOyCiB8eXTBi2APaceh3+uBLIgLk8ysy52g2U3gP7Q2\r\n6Jlgq/xKzj3O9hFh/g==\r\n-----END - CERTIFICATE-----\r\n"}],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{"ipAddress":"10.0.0.4"},"provisioningState":"Succeeded","repairEnabled":true,"seedNodes":[{"ipAddress":"10.0.0.5"},{"ipAddress":"10.0.0.6"},{"ipAddress":"10.0.0.7"}],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRAJIA6MGAIYTMB42TBQHWQ7WHFCVTOSOQP4NQSR2XKZ7UWKQJ2UY72RN/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLIJDS5US5"}}]}' + CERTIFICATE-----\r\n"}],"hoursBetweenBackups":24,"backupRetentionPeriodInHours":24,"prometheusEndpoint":{"ipAddress":"10.0.0.4"},"provisioningState":"Succeeded","repairEnabled":true,"seedNodes":[{"ipAddress":"10.0.0.5"},{"ipAddress":"10.0.0.6"},{"ipAddress":"10.0.0.7"}],"cassandraAuditLoggingEnabled":false,"diagnosticSettingsId":"/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/CLI_MANAGED_CASSANDRADBQGTUAQWYQ3SD3VMVA55K5JLAFWA2C7TUKYWIIJTVYBQVLYJPX6WQ/PROVIDERS/MICROSOFT.DOCUMENTDB/CASSANDRACLUSTERS/CLINP6RKUI"}}]}' headers: cache-control: - no-store, no-cache content-length: - - '74779' + - '37339' content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:35 GMT + - Thu, 29 Sep 2022 07:28:02 GMT pragma: - no-cache server: @@ -2773,15 +2799,15 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_managed_cassandra000001/providers/Microsoft.DocumentDB/cassandraClusters/cli000002?api-version=2022-08-15-preview response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview cache-control: - no-store, no-cache content-length: @@ -2789,9 +2815,9 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:47:36 GMT + - Thu, 29 Sep 2022 07:28:03 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationResults/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationResults/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview pragma: - no-cache server: @@ -2821,9 +2847,55 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 07:28:33 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.14.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - managed-cassandra cluster delete + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2835,7 +2907,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:48:06 GMT + - Thu, 29 Sep 2022 07:29:03 GMT pragma: - no-cache server: @@ -2867,9 +2939,9 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2881,7 +2953,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:48:36 GMT + - Thu, 29 Sep 2022 07:29:33 GMT pragma: - no-cache server: @@ -2913,9 +2985,9 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2927,7 +2999,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:49:06 GMT + - Thu, 29 Sep 2022 07:30:03 GMT pragma: - no-cache server: @@ -2959,9 +3031,9 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -2973,7 +3045,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:49:36 GMT + - Thu, 29 Sep 2022 07:30:34 GMT pragma: - no-cache server: @@ -3005,9 +3077,9 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -3019,7 +3091,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:50:06 GMT + - Thu, 29 Sep 2022 07:31:04 GMT pragma: - no-cache server: @@ -3051,9 +3123,9 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -3065,7 +3137,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:50:37 GMT + - Thu, 29 Sep 2022 07:31:34 GMT pragma: - no-cache server: @@ -3097,9 +3169,9 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -3111,7 +3183,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:51:07 GMT + - Thu, 29 Sep 2022 07:32:04 GMT pragma: - no-cache server: @@ -3143,9 +3215,9 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -3157,7 +3229,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:51:37 GMT + - Thu, 29 Sep 2022 07:32:35 GMT pragma: - no-cache server: @@ -3189,9 +3261,9 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -3203,7 +3275,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:52:07 GMT + - Thu, 29 Sep 2022 07:33:05 GMT pragma: - no-cache server: @@ -3235,9 +3307,9 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -3249,7 +3321,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:52:38 GMT + - Thu, 29 Sep 2022 07:33:34 GMT pragma: - no-cache server: @@ -3281,9 +3353,9 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview response: body: string: '{"status":"Dequeued"}' @@ -3295,7 +3367,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:53:07 GMT + - Thu, 29 Sep 2022 07:34:05 GMT pragma: - no-cache server: @@ -3327,9 +3399,9 @@ interactions: ParameterSetName: - -c -g --yes User-Agent: - - AZURECLI/2.40.0 azsdk-python-mgmt-cosmosdb/7.0.0b6 Python/3.10.2 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-cosmosdb/0.7.0 Python/3.10.1 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/650abf4f-9c3f-4d1c-a9ca-3bbe3428073e?api-version=2022-02-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/eastus2/operationsStatus/925da423-20b0-4e5b-ab2b-dad6b4c74a93?api-version=2022-08-15-preview response: body: string: '{"status":"Succeeded"}' @@ -3341,7 +3413,7 @@ interactions: content-type: - application/json date: - - Tue, 20 Sep 2022 07:53:38 GMT + - Thu, 29 Sep 2022 07:34:35 GMT pragma: - no-cache server: diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb-InAccountRestore_scenario.py b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb-InAccountRestore_scenario.py new file mode 100644 index 00000000000..a561edd3567 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb-InAccountRestore_scenario.py @@ -0,0 +1,639 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import os +import unittest + +from azure.cli.testsdk.scenario_tests import AllowLargeResponse +from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer) +from datetime import datetime +import datetime + +TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + + +class Cosmosdb_previewInAccountRestoreScenarioTest(ScenarioTest): + +#sql + @AllowLargeResponse() + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_database') + def test_cosmosdb_sql_database(self, resource_group): + db_name = self.create_random_name(prefix='cli', length=15) + location = "WestUS" + + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': db_name, + 'loc': location + }) + + self.cmd('az cosmosdb create -n {acc} -g {rg} --backup-policy-type Continuous --locations regionName={loc}') + + database = self.cmd('az cosmosdb sql database create -g {rg} -a {acc} -n {db_name}').get_output_in_json() + assert database["name"] == db_name + + database_show = self.cmd('az cosmosdb sql database show -g {rg} -a {acc} -n {db_name}').get_output_in_json() + assert database_show["name"] == db_name + + assert self.cmd('az cosmosdb sql database exists -g {rg} -a {acc} -n {db_name}').get_output_in_json() + assert not self.cmd('az cosmosdb sql database exists -g {rg} -a {acc} -n invalid').get_output_in_json() + + database_list = self.cmd('az cosmosdb sql database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 1 + + self.cmd('az cosmosdb sql database delete -g {rg} -a {acc} -n {db_name} --yes') + assert not self.cmd('az cosmosdb sql database exists -g {rg} -a {acc} -n {db_name}').get_output_in_json() + + + @AllowLargeResponse() + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_container') + def test_cosmosdb_sql_container(self, resource_group): + col = self.create_random_name(prefix='cli', length=15) + location = "WestUS" + partition = "/pk" + + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': self.create_random_name(prefix='cli', length=15), + 'col': col, + 'indexing': "\"{\"indexingMode\": \"consistent\", \"includedPaths\": [{ \"path\": \"/*\", \"indexes\": [{ \"dataType\": \"String\", \"kind\": \"Range\" }] }], \"excludedPaths\": [{ \"path\": \"/headquarters/employees/?\" } ]}\"", + 'loc': location, + 'part': partition + }) + + self.cmd('az cosmosdb create -n {acc} -g {rg} --backup-policy-type Continuous --locations regionName={loc}') + + self.cmd('az cosmosdb sql database create -g {rg} -a {acc} -n {db_name}') + + collection = self.cmd('az cosmosdb sql container create -g {rg} -a {acc} -d {db_name} -n {col} -p {part}').get_output_in_json() + assert collection["name"] == col + + collection_show = self.cmd('az cosmosdb sql container show -g {rg} -a {acc} -d {db_name} -n {col}').get_output_in_json() + assert collection_show["name"] == col + + assert self.cmd('az cosmosdb sql container exists -g {rg} -a {acc} -d {db_name} -n {col}').get_output_in_json() + assert not self.cmd('az cosmosdb sql container exists -g {rg} -a {acc} -d {db_name} -n invalid').get_output_in_json() + + collection_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 1 + + self.cmd('az cosmosdb sql container delete -g {rg} -a {acc} -d {db_name} -n {col} --yes') + + + @AllowLargeResponse() + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_normal_database_restore') + def test_cosmosdb_sql_normal_database_restore(self, resource_group): + db_name = self.create_random_name(prefix='cli', length=15) + location = "WestUS" + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': db_name, + 'loc': location + }) + + self.cmd('az cosmosdb create -n {acc} -g {rg} --backup-policy-type Continuous --locations regionName={loc}') + + assert not self.cmd('az cosmosdb sql database exists -g {rg} -a {acc} -n {db_name}').get_output_in_json() + + database_create = self.cmd('az cosmosdb sql database create -g {rg} -a {acc} -n {db_name}').get_output_in_json() + assert database_create["name"] == db_name + + database_show = self.cmd('az cosmosdb sql database show -g {rg} -a {acc} -n {db_name}').get_output_in_json() + assert database_show["name"] == db_name + + database_list = self.cmd('az cosmosdb sql database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 1 + + restore_ts_string = datetime.datetime.utcnow().isoformat() + + self.kwargs.update({ + 'rts': restore_ts_string + }) + + assert self.cmd('az cosmosdb sql database exists -g {rg} -a {acc} -n {db_name}').get_output_in_json() + + self.cmd('az cosmosdb sql database delete -g {rg} -a {acc} -n {db_name} --yes') + database_list = self.cmd('az cosmosdb sql database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 0 + + self.cmd('az cosmosdb sql database restore -g {rg} -a {acc} -n {db_name} --restore-timestamp {rts}') + + database_restore = self.cmd('az cosmosdb sql database show -g {rg} -a {acc} -n {db_name}').get_output_in_json() + assert database_restore["name"] == db_name + + database_list = self.cmd('az cosmosdb sql database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 1 + + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 0 + + + @AllowLargeResponse() + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_shared_database_restore') + def test_cosmosdb_sql_shared_database_restore(self, resource_group): + db_name = self.create_random_name(prefix='cli', length=15) + ctn_name = self.create_random_name(prefix='cli', length=15) + partition_key = "/thePartitionKey" + unique_key_policy = '"{\\"uniqueKeys\\": [{\\"paths\\": [\\"/path/to/key1\\"]}, {\\"paths\\": [\\"/path/to/key2\\"]}]}"' + conflict_resolution_policy = '"{\\"mode\\": \\"lastWriterWins\\", \\"conflictResolutionPath\\": \\"/path\\"}"' + indexing = '"{\\"indexingMode\\": \\"consistent\\", \\"automatic\\": true, \\"includedPaths\\": [{\\"path\\": \\"/*\\"}], \\"excludedPaths\\": [{\\"path\\": \\"/headquarters/employees/?\\"}]}"' + location = "WestUS" + tp1 = 1000 + + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': db_name, + 'ctn_name': ctn_name, + 'part': partition_key, + 'unique_key': unique_key_policy, + "conflict_resolution": conflict_resolution_policy, + "indexing": indexing, + 'loc': location, + 'tp1': tp1 + }) + + self.cmd('az cosmosdb create -n {acc} -g {rg} --backup-policy-type Continuous --locations regionName={loc}') + self.cmd('az cosmosdb sql database create -g {rg} -a {acc} -n {db_name} --throughput {tp1}') + + assert not self.cmd('az cosmosdb sql container exists -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + + container_create = self.cmd('az cosmosdb sql container create -g {rg} -a {acc} -d {db_name} -n {ctn_name} -p {part} --unique-key-policy {unique_key} --conflict-resolution-policy {conflict_resolution} --idx {indexing}').get_output_in_json() + + assert container_create["name"] == ctn_name + assert container_create["resource"]["partitionKey"]["paths"][0] == partition_key + assert len(container_create["resource"]["uniqueKeyPolicy"]["uniqueKeys"]) == 2 + assert container_create["resource"]["conflictResolutionPolicy"]["mode"] == "lastWriterWins" + assert container_create["resource"]["indexingPolicy"]["excludedPaths"][0]["path"] == "/headquarters/employees/?" + + container_show = self.cmd('az cosmosdb sql container show -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + assert container_show["name"] == ctn_name + + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 1 + + restore_ts_string = datetime.datetime.utcnow().isoformat() + + self.kwargs.update({ + 'rts': restore_ts_string + }) + import time + time.sleep(300) + + assert self.cmd('az cosmosdb sql container exists -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + + self.cmd('az cosmosdb sql container delete -g {rg} -a {acc} -d {db_name} -n {ctn_name} --yes') + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 0 + + self.assertRaises(Exception, lambda: self.cmd('az cosmosdb sql container restore -g {rg} -a {acc} -d {db_name} -n {ctn_name} --restore-timestamp {rts}')) + #self.cmd('az cosmosdb sql container restore -g {rg} -a {acc} -d {db_name} -n {ctn_name} --restore-timestamp {rts}') + + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 0 + + self.cmd('az cosmosdb sql database delete -g {rg} -a {acc} -n {db_name} --yes') + database_list = self.cmd('az cosmosdb sql database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 0 + + import time + time.sleep(500) + + self.cmd('az cosmosdb sql database restore -g {rg} -a {acc} -n {db_name} --restore-timestamp {rts}') + + database_restore = self.cmd('az cosmosdb sql database show -g {rg} -a {acc} -n {db_name}').get_output_in_json() + assert database_restore["name"] == db_name + + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 1 + + container_show = self.cmd('az cosmosdb sql container show -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + assert container_show["name"] == ctn_name + + self.cmd('az cosmosdb sql database delete -g {rg} -a {acc} -n {db_name} --yes') + database_list = self.cmd('az cosmosdb sql database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 0 + + + @AllowLargeResponse() + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_normal_database_prov_container_restore') + def test_cosmosdb_sql_normal_database_prov_container_restore(self, resource_group): + db_name = self.create_random_name(prefix='cli', length=15) + ctn_name = self.create_random_name(prefix='cli', length=15) + partition_key = "/thePartitionKey" + unique_key_policy = '"{\\"uniqueKeys\\": [{\\"paths\\": [\\"/path/to/key1\\"]}, {\\"paths\\": [\\"/path/to/key2\\"]}]}"' + conflict_resolution_policy = '"{\\"mode\\": \\"lastWriterWins\\", \\"conflictResolutionPath\\": \\"/path\\"}"' + indexing = '"{\\"indexingMode\\": \\"consistent\\", \\"automatic\\": true, \\"includedPaths\\": [{\\"path\\": \\"/*\\"}], \\"excludedPaths\\": [{\\"path\\": \\"/headquarters/employees/?\\"}]}"' + location = "WestUS" + + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': db_name, + 'ctn_name': ctn_name, + 'part': partition_key, + 'unique_key': unique_key_policy, + "conflict_resolution": conflict_resolution_policy, + "indexing": indexing, + 'loc': location + }) + + self.cmd('az cosmosdb create -n {acc} -g {rg} --backup-policy-type Continuous --locations regionName={loc}') + self.cmd('az cosmosdb sql database create -g {rg} -a {acc} -n {db_name}') + + assert not self.cmd('az cosmosdb sql container exists -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + + container_create = self.cmd('az cosmosdb sql container create -g {rg} -a {acc} -d {db_name} -n {ctn_name} -p {part} --unique-key-policy {unique_key} --conflict-resolution-policy {conflict_resolution} --idx {indexing}').get_output_in_json() + + assert container_create["name"] == ctn_name + assert container_create["resource"]["partitionKey"]["paths"][0] == partition_key + assert len(container_create["resource"]["uniqueKeyPolicy"]["uniqueKeys"]) == 2 + assert container_create["resource"]["conflictResolutionPolicy"]["mode"] == "lastWriterWins" + assert container_create["resource"]["indexingPolicy"]["excludedPaths"][0]["path"] == "/headquarters/employees/?" + + container_update = self.cmd('az cosmosdb sql container update -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + + container_show = self.cmd('az cosmosdb sql container show -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + assert container_show["name"] == ctn_name + + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 1 + + restore_ts_string = datetime.datetime.utcnow().isoformat() + + self.kwargs.update({ + 'rts': restore_ts_string + }) + import time + time.sleep(300) + + assert self.cmd('az cosmosdb sql container exists -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + + self.cmd('az cosmosdb sql container delete -g {rg} -a {acc} -d {db_name} -n {ctn_name} --yes') + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 0 + + #self.assertRaises(Exception, lambda: self.cmd('az cosmosdb sql container restore -g {rg} -a {acc} -d {db_name} -n {ctn_name} --restore-timestamp {rts}')) + self.cmd('az cosmosdb sql container restore -g {rg} -a {acc} -d {db_name} -n {ctn_name} --restore-timestamp {rts}') + + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 1 + + self.cmd('az cosmosdb sql database delete -g {rg} -a {acc} -n {db_name} --yes') + database_list = self.cmd('az cosmosdb sql database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 0 + + self.cmd('az cosmosdb sql database restore -g {rg} -a {acc} -n {db_name} --restore-timestamp {rts}') + + database_restore = self.cmd('az cosmosdb sql database show -g {rg} -a {acc} -n {db_name}').get_output_in_json() + assert database_restore["name"] == db_name + + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 0 + + self.cmd('az cosmosdb sql container restore -g {rg} -a {acc} -d {db_name} -n {ctn_name} --restore-timestamp {rts}') + + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 1 + + container_show = self.cmd('az cosmosdb sql container show -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + assert container_show["name"] == ctn_name + + + @AllowLargeResponse() + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_shared_database_prov_container_restore') + def test_cosmosdb_sql_shared_database_prov_container_restore(self, resource_group): + db_name = self.create_random_name(prefix='cli', length=15) + ctn_name = self.create_random_name(prefix='cli', length=15) + partition_key = "/thePartitionKey" + unique_key_policy = '"{\\"uniqueKeys\\": [{\\"paths\\": [\\"/path/to/key1\\"]}, {\\"paths\\": [\\"/path/to/key2\\"]}]}"' + conflict_resolution_policy = '"{\\"mode\\": \\"lastWriterWins\\", \\"conflictResolutionPath\\": \\"/path\\"}"' + indexing = '"{\\"indexingMode\\": \\"consistent\\", \\"automatic\\": true, \\"includedPaths\\": [{\\"path\\": \\"/*\\"}], \\"excludedPaths\\": [{\\"path\\": \\"/headquarters/employees/?\\"}]}"' + location = "WestUS" + tp1 = 1000 + + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': db_name, + 'ctn_name': ctn_name, + 'part': partition_key, + 'unique_key': unique_key_policy, + "conflict_resolution": conflict_resolution_policy, + "indexing": indexing, + 'loc': location, + 'tp1': tp1 + }) + + self.cmd('az cosmosdb create -n {acc} -g {rg} --backup-policy-type Continuous --locations regionName={loc}') + self.cmd('az cosmosdb sql database create -g {rg} -a {acc} -n {db_name} --throughput {tp1}') + + assert not self.cmd('az cosmosdb sql container exists -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + + container_create = self.cmd('az cosmosdb sql container create -g {rg} -a {acc} -d {db_name} -n {ctn_name} -p {part} --unique-key-policy {unique_key} --conflict-resolution-policy {conflict_resolution} --idx {indexing} --throughput {tp1}').get_output_in_json() + + assert container_create["name"] == ctn_name + assert container_create["resource"]["partitionKey"]["paths"][0] == partition_key + assert len(container_create["resource"]["uniqueKeyPolicy"]["uniqueKeys"]) == 2 + assert container_create["resource"]["conflictResolutionPolicy"]["mode"] == "lastWriterWins" + assert container_create["resource"]["indexingPolicy"]["excludedPaths"][0]["path"] == "/headquarters/employees/?" + + container_update = self.cmd('az cosmosdb sql container update -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + + container_show = self.cmd('az cosmosdb sql container show -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + assert container_show["name"] == ctn_name + + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 1 + + restore_ts_string = datetime.datetime.utcnow().isoformat() + + self.kwargs.update({ + 'rts': restore_ts_string + }) + import time + time.sleep(300) + + assert self.cmd('az cosmosdb sql container exists -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + + self.cmd('az cosmosdb sql container delete -g {rg} -a {acc} -d {db_name} -n {ctn_name} --yes') + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 0 + + #self.assertRaises(Exception, lambda: self.cmd('az cosmosdb sql container restore -g {rg} -a {acc} -d {db_name} -n {ctn_name} --restore-timestamp {rts}')) + self.cmd('az cosmosdb sql container restore -g {rg} -a {acc} -d {db_name} -n {ctn_name} --restore-timestamp {rts}') + + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 1 + + self.cmd('az cosmosdb sql database delete -g {rg} -a {acc} -n {db_name} --yes') + database_list = self.cmd('az cosmosdb sql database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 0 + + self.cmd('az cosmosdb sql database restore -g {rg} -a {acc} -n {db_name} --restore-timestamp {rts}') + + database_restore = self.cmd('az cosmosdb sql database show -g {rg} -a {acc} -n {db_name}').get_output_in_json() + assert database_restore["name"] == db_name + + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 0 + + self.cmd('az cosmosdb sql container restore -g {rg} -a {acc} -d {db_name} -n {ctn_name} --restore-timestamp {rts}') + + container_list = self.cmd('az cosmosdb sql container list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(container_list) == 1 + + container_show = self.cmd('az cosmosdb sql container show -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json() + assert container_show["name"] == ctn_name + + +#mongo + @AllowLargeResponse() + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_mongodb_database') + def test_cosmosdb_mongodb_database(self, resource_group): + db_name = self.create_random_name(prefix='cli', length=15) + location = "WestUS" + + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': db_name, + 'loc': location + }) + + self.cmd('az cosmosdb create -n {acc} -g {rg} --kind MongoDB --server-version 3.6 --backup-policy-type Continuous --locations regionName={loc}') + + assert not self.cmd('az cosmosdb mongodb database exists -g {rg} -a {acc} -n {db_name}').get_output_in_json() + + database_create = self.cmd('az cosmosdb mongodb database create -g {rg} -a {acc} -n {db_name}').get_output_in_json() + assert database_create["name"] == db_name + + database_show = self.cmd('az cosmosdb mongodb database show -g {rg} -a {acc} -n {db_name}').get_output_in_json() + assert database_show["name"] == db_name + + database_list = self.cmd('az cosmosdb mongodb database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 1 + + assert self.cmd('az cosmosdb mongodb database exists -g {rg} -a {acc} -n {db_name}').get_output_in_json() + + self.cmd('az cosmosdb mongodb database delete -g {rg} -a {acc} -n {db_name} --yes') + database_list = self.cmd('az cosmosdb mongodb database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 0 + + + @AllowLargeResponse() + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_mongodb_collection') + def test_cosmosdb_mongodb_collection(self, resource_group): + col = self.create_random_name(prefix='cli', length=15) + partition_key = "/thePartitionKey" + location = "WestUS" + + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': self.create_random_name(prefix='cli', length=15), + 'col': col, + 'indexing': "\"{\"indexingMode\": \"consistent\", \"includedPaths\": [{ \"path\": \"/*\", \"indexes\": [{ \"dataType\": \"String\", \"kind\": \"Range\" }] }], \"excludedPaths\": [{ \"path\": \"/headquarters/employees/?\" } ]}\"", + 'part': partition_key, + 'loc': location + }) + + self.cmd('az cosmosdb create -n {acc} -g {rg} --kind MongoDB --server-version 3.6 --backup-policy-type Continuous --locations regionName={loc}') + + self.cmd('az cosmosdb mongodb database create -g {rg} -a {acc} -n {db_name}') + + collection = self.cmd('az cosmosdb mongodb collection create -g {rg} -a {acc} -d {db_name} -n {col}').get_output_in_json() + assert collection["name"] == col + + collection_show = self.cmd('az cosmosdb mongodb collection show -g {rg} -a {acc} -d {db_name} -n {col}').get_output_in_json() + assert collection_show["name"] == col + + assert self.cmd('az cosmosdb mongodb collection exists -g {rg} -a {acc} -d {db_name} -n {col}').get_output_in_json() + assert not self.cmd('az cosmosdb mongodb collection exists -g {rg} -a {acc} -d {db_name} -n invalid').get_output_in_json() + + collection_list = self.cmd('az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 1 + + self.cmd('az cosmosdb mongodb collection delete -g {rg} -a {acc} -d {db_name} -n {col} --yes') + + + @AllowLargeResponse() + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_mongodb_normal_database_prov_collection_restore') + def test_cosmosdb_mongodb_normal_database_prov_collection_restore(self, resource_group): + col_name = self.create_random_name(prefix='cli', length=15) + location = "WestUS" + + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': self.create_random_name(prefix='cli', length=15), + 'col_name': col_name, + 'shard_key': "theShardKey", + 'indexes': '"[{\\"key\\": {\\"keys\\": [\\"_ts\\"]},\\"options\\": {\\"expireAfterSeconds\\": 1000}}]"', + 'loc': location + }) + + # Create normal database + prov collection + self.cmd('az cosmosdb create -n {acc} -g {rg} --kind MongoDB --server-version 3.6 --backup-policy-type Continuous --locations regionName={loc}') + self.cmd('az cosmosdb mongodb database create -g {rg} -a {acc} -n {db_name}') + + assert not self.cmd('az cosmosdb mongodb collection exists -g {rg} -a {acc} -d {db_name} -n {col_name}').get_output_in_json() + + collection_create = self.cmd( + 'az cosmosdb mongodb collection create -g {rg} -a {acc} -d {db_name} -n {col_name} --shard {shard_key}').get_output_in_json() + assert collection_create["name"] == col_name + + indexes_size = len(collection_create["resource"]["indexes"]) + # collection_update = self.cmd( + # 'az cosmosdb mongodb collection update -g {rg} -a {acc} -d {db_name} -n {col_name} --idx {indexes}').get_output_in_json() + # assert len(collection_update["resource"]["indexes"]) == indexes_size + 1 + + collection_show = self.cmd( + 'az cosmosdb mongodb collection show -g {rg} -a {acc} -d {db_name} -n {col_name}').get_output_in_json() + assert collection_show["name"] == col_name + + collection_list = self.cmd( + 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 1 + + assert self.cmd('az cosmosdb mongodb collection exists -g {rg} -a {acc} -d {db_name} -n {col_name}').get_output_in_json() + + restore_ts_string = datetime.datetime.utcnow().isoformat() + + self.kwargs.update({ + 'rts': restore_ts_string + }) + import time + time.sleep(300) + + # Restore collection and validate collection got restored + self.cmd('az cosmosdb mongodb collection delete -g {rg} -a {acc} -d {db_name} -n {col_name} --yes') + collection_list = self.cmd( + 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 0 + + self.cmd('az cosmosdb mongodb collection restore -g {rg} -a {acc} -d {db_name} -n {col_name} --restore-timestamp {rts}').get_output_in_json() + + collection_list = self.cmd( + 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 1 + + # Restore database and validate database got restored but not collections + self.cmd('az cosmosdb mongodb database delete -g {rg} -a {acc} -n {db_name} --yes') + database_list = self.cmd('az cosmosdb mongodb database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 0 + + self.cmd('az cosmosdb mongodb database restore -g {rg} -a {acc} -n {db_name} --restore-timestamp {rts}').get_output_in_json() + + database_list = self.cmd('az cosmosdb mongodb database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 1 + + collection_list = self.cmd( + 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 0 + + # Restore collection and validate collection got restored + self.cmd('az cosmosdb mongodb collection restore -g {rg} -a {acc} -d {db_name} -n {col_name} --restore-timestamp {rts}').get_output_in_json() + + collection_list = self.cmd( + 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 1 + + # cleanup + self.cmd('az cosmosdb mongodb database delete -g {rg} -a {acc} -n {db_name} --yes') + database_list = self.cmd('az cosmosdb mongodb database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 0 + collection_list = self.cmd( + 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 0 + + + @AllowLargeResponse() + @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_mongodb_shared_database_prov_collection_restore') + def test_cosmosdb_mongodb_shared_database_prov_collection_restore(self, resource_group): + col_name = self.create_random_name(prefix='cli', length=15) + col_name2 = self.create_random_name(prefix='cli', length=15) + location = "WestUS" + tp1 = 1000 + self.kwargs.update({ + 'acc': self.create_random_name(prefix='cli', length=15), + 'db_name': self.create_random_name(prefix='cli', length=15), + 'col_name': col_name, + 'col_name2': col_name2, + 'shard_key': "theShardKey", + 'indexes': '"[{\\"key\\": {\\"keys\\": [\\"_ts\\"]},\\"options\\": {\\"expireAfterSeconds\\": 1000}}]"', + 'loc': location, + 'tp1': tp1 + }) + + # create mongodb shared database + shared collection + prov collection + self.cmd('az cosmosdb create -n {acc} -g {rg} --kind MongoDB --server-version 3.6 --backup-policy-type Continuous --locations regionName={loc}') + self.cmd('az cosmosdb mongodb database create -g {rg} -a {acc} -n {db_name} --throughput {tp1}') + + assert not self.cmd('az cosmosdb mongodb collection exists -g {rg} -a {acc} -d {db_name} -n {col_name}').get_output_in_json() + + collection_create = self.cmd( + 'az cosmosdb mongodb collection create -g {rg} -a {acc} -d {db_name} -n {col_name} --shard {shard_key}').get_output_in_json() + assert collection_create["name"] == col_name + + collection_create = self.cmd( + 'az cosmosdb mongodb collection create -g {rg} -a {acc} -d {db_name} -n {col_name2} --shard {shard_key} --throughput {tp1}').get_output_in_json() + assert collection_create["name"] == col_name2 + + indexes_size = len(collection_create["resource"]["indexes"]) + # collection_update = self.cmd( + # 'az cosmosdb mongodb collection update -g {rg} -a {acc} -d {db_name} -n {col_name} --idx {indexes}').get_output_in_json() + # assert len(collection_update["resource"]["indexes"]) == indexes_size + 1 + + collection_show = self.cmd( + 'az cosmosdb mongodb collection show -g {rg} -a {acc} -d {db_name} -n {col_name}').get_output_in_json() + assert collection_show["name"] == col_name + + collection_list = self.cmd( + 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 2 + + assert self.cmd('az cosmosdb mongodb collection exists -g {rg} -a {acc} -d {db_name} -n {col_name}').get_output_in_json() + + restore_ts_string = datetime.datetime.utcnow().isoformat() + + self.kwargs.update({ + 'rts': restore_ts_string + }) + import time + time.sleep(300) + + self.cmd('az cosmosdb mongodb collection delete -g {rg} -a {acc} -d {db_name} -n {col_name} --yes') + self.cmd('az cosmosdb mongodb collection delete -g {rg} -a {acc} -d {db_name} -n {col_name2} --yes') + + collection_list = self.cmd( + 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 0 + + self.assertRaises(Exception, lambda: self.cmd('az cosmosdb mongodb collection restore -g {rg} -a {acc} -d {db_name} -n {col_name} --restore-timestamp {rts}').get_output_in_json()) + + collection_list = self.cmd( + 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 0 + + self.cmd('az cosmosdb mongodb database delete -g {rg} -a {acc} -n {db_name} --yes') + database_list = self.cmd('az cosmosdb mongodb database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 0 + + # delete and restore shared database. that should restore only shared collection with it + self.cmd('az cosmosdb mongodb database restore -g {rg} -a {acc} -n {db_name} --restore-timestamp {rts}').get_output_in_json() + + database_list = self.cmd('az cosmosdb mongodb database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 1 + + collection_list = self.cmd( + 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 1 + + # Restore collection and validate collection got restored + self.cmd('az cosmosdb mongodb collection restore -g {rg} -a {acc} -d {db_name} -n {col_name2} --restore-timestamp {rts}').get_output_in_json() + + collection_list = self.cmd( + 'az cosmosdb mongodb collection list -g {rg} -a {acc} -d {db_name}').get_output_in_json() + assert len(collection_list) == 2 + + # cleanup + self.cmd('az cosmosdb mongodb database delete -g {rg} -a {acc} -n {db_name} --yes') + database_list = self.cmd('az cosmosdb mongodb database list -g {rg} -a {acc}').get_output_in_json() + assert len(database_list) == 0 diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb-merge-scenario.py b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb-merge-scenario.py index 6a48212e0e6..5a51a75deca 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb-merge-scenario.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb-merge-scenario.py @@ -23,11 +23,11 @@ def test_cosmosdb_sql_container_merge(self, resource_group): db_name = self.create_random_name(prefix='cli', length=15) # Assumption: There exists a canary-sdk-test rg with the account mergetest. This test only creates the database and collection self.kwargs.update({ - 'rg' : 'canary-sdk-test', - 'acc': 'mergetest', + 'rg' : 'cosmosTest', + 'acc': 'mergetest2', 'db_name': db_name, 'col': col, - 'loc': 'eastus2' + 'loc': 'westus' }) # Create database @@ -50,11 +50,11 @@ def test_cosmosdb_mongodb_collection_merge(self, resource_group): db_name = self.create_random_name(prefix='cli', length=15) self.kwargs.update({ - 'rg':'canary-sdk-test', - 'acc': 'mongomergeaccount', + 'rg':'cosmosTest', + 'acc': 'mergetest3', 'db_name': db_name, 'col': col, - 'loc': 'eastus2', + 'loc': 'westus', 'shard_key': "theShardKey", 'throughput': "20000" }) diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb-pitr_scenario.py b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb-pitr_scenario.py index 1c57ff5498d..896f6deefb3 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb-pitr_scenario.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb-pitr_scenario.py @@ -267,7 +267,7 @@ def test_cosmosdb_table_restorable_commands(self, resource_group): restorable_resources = self.cmd('az cosmosdb table restorable-resource list --restore-location {loc} -l {loc} --instance-id {ins_id} --restore-timestamp {rts}').get_output_in_json() assert len(restorable_resources) == 1 assert len(restorable_resources) == 1 - assert restorable_resources[0] == table + assert restorable_resources[0]["name"] == table @ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_container_backupinfo', location='eastus2') def test_cosmosdb_sql_container_backupinfo(self, resource_group): diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb_sql_adaptiveru_scenario.py b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb_sql_adaptiveru_scenario.py index 74333ab0a6a..effb2e414b5 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb_sql_adaptiveru_scenario.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb_sql_adaptiveru_scenario.py @@ -23,8 +23,8 @@ def test_cosmosdb_sql_container_adaptiveru(self, resource_group): db_name = self.create_random_name(prefix='cli', length=15) # Assumption: There exists a cosmosTest rg with the account adrutest2. This test only creates the database and collection self.kwargs.update({ - 'rg' : 'canary-sdk-test', - 'acc': 'sqladru2', + 'rg' : 'cosmosTest', + 'acc': 'adrutest2', 'db_name': db_name, 'col': col, 'loc': 'australiaeast', @@ -64,8 +64,8 @@ def test_cosmosdb_mongodb_collection_adaptiveru(self, resource_group): db_name = self.create_random_name(prefix='cli', length=15) self.kwargs.update({ - 'rg':'canary-sdk-test', - 'acc': 'sqladru3', + 'rg':'cosmosTest', + 'acc': 'adrutest3', 'db_name': db_name, 'col': col, 'loc': 'australiaeast', diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/__init__.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/__init__.py index 12e3ce0a66c..f87102f4f8d 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/__init__.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/__init__.py @@ -10,9 +10,15 @@ from ._version import VERSION __version__ = VERSION -__all__ = ['CosmosDBManagementClient'] -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() +try: + from ._patch import __all__ as _patch_all + from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = ["CosmosDBManagementClient"] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_configuration.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_configuration.py index 5b541c3eaa1..44664bc13ad 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_configuration.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_configuration.py @@ -25,23 +25,18 @@ class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=t Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. + :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. + :param subscription_id: The ID of the target subscription. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2022-02-15-preview". Note that overriding + :keyword api_version: Api Version. Default value is "2022-08-15-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", "2022-08-15-preview") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -51,23 +46,24 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-cosmosdb/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = ARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_cosmos_db_management_client.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_cosmos_db_management_client.py index 6999e90be6b..18bb993ec21 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_cosmos_db_management_client.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_cosmos_db_management_client.py @@ -9,20 +9,60 @@ from copy import deepcopy from typing import Any, TYPE_CHECKING -from msrest import Deserializer, Serializer - from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient from . import models from ._configuration import CosmosDBManagementClientConfiguration -from .operations import CassandraClustersOperations, CassandraDataCentersOperations, CassandraResourcesOperations, CollectionOperations, CollectionPartitionOperations, CollectionPartitionRegionOperations, CollectionRegionOperations, DataTransferJobsOperations, DatabaseAccountRegionOperations, DatabaseAccountsOperations, DatabaseOperations, GraphResourcesOperations, GremlinResourcesOperations, LocationsOperations, MongoDBResourcesOperations, NotebookWorkspacesOperations, Operations, PartitionKeyRangeIdOperations, PartitionKeyRangeIdRegionOperations, PercentileOperations, PercentileSourceTargetOperations, PercentileTargetOperations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, RestorableDatabaseAccountsOperations, RestorableGremlinDatabasesOperations, RestorableGremlinGraphsOperations, RestorableGremlinResourcesOperations, RestorableMongodbCollectionsOperations, RestorableMongodbDatabasesOperations, RestorableMongodbResourcesOperations, RestorableSqlContainersOperations, RestorableSqlDatabasesOperations, RestorableSqlResourcesOperations, RestorableTableResourcesOperations, RestorableTablesOperations, ServiceOperations, SqlResourcesOperations, TableResourcesOperations +from ._serialization import Deserializer, Serializer +from .operations import ( + CassandraClustersOperations, + CassandraDataCentersOperations, + CassandraResourcesOperations, + CollectionOperations, + CollectionPartitionOperations, + CollectionPartitionRegionOperations, + CollectionRegionOperations, + DataTransferJobsOperations, + DatabaseAccountRegionOperations, + DatabaseAccountsOperations, + DatabaseOperations, + GraphResourcesOperations, + GremlinResourcesOperations, + LocationsOperations, + MongoDBResourcesOperations, + NotebookWorkspacesOperations, + Operations, + PartitionKeyRangeIdOperations, + PartitionKeyRangeIdRegionOperations, + PercentileOperations, + PercentileSourceTargetOperations, + PercentileTargetOperations, + PrivateEndpointConnectionsOperations, + PrivateLinkResourcesOperations, + RestorableDatabaseAccountsOperations, + RestorableGremlinDatabasesOperations, + RestorableGremlinGraphsOperations, + RestorableGremlinResourcesOperations, + RestorableMongodbCollectionsOperations, + RestorableMongodbDatabasesOperations, + RestorableMongodbResourcesOperations, + RestorableSqlContainersOperations, + RestorableSqlDatabasesOperations, + RestorableSqlResourcesOperations, + RestorableTableResourcesOperations, + RestorableTablesOperations, + ServiceOperations, + SqlResourcesOperations, + TableResourcesOperations, +) if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class CosmosDBManagementClient: # pylint: disable=too-many-instance-attributes + +class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Azure Cosmos DB Database Service Resource Provider REST API. :ivar database_accounts: DatabaseAccountsOperations operations @@ -119,13 +159,13 @@ class CosmosDBManagementClient: # pylint: disable=too-many-instance-attribute azure.mgmt.cosmosdb.operations.RestorableTableResourcesOperations :ivar service: ServiceOperations operations :vartype service: azure.mgmt.cosmosdb.operations.ServiceOperations - :param credential: Credential needed for the client to connect to Azure. + :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. + :param subscription_id: The ID of the target subscription. Required. :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2022-02-15-preview". Note that overriding + :keyword api_version: Api Version. Default value is "2022-08-15-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -139,59 +179,116 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = CosmosDBManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = CosmosDBManagementClientConfiguration( + credential=credential, subscription_id=subscription_id, **kwargs + ) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - self.database_accounts = DatabaseAccountsOperations(self._client, self._config, self._serialize, self._deserialize) + self.database_accounts = DatabaseAccountsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.database = DatabaseOperations(self._client, self._config, self._serialize, self._deserialize) self.collection = CollectionOperations(self._client, self._config, self._serialize, self._deserialize) - self.collection_region = CollectionRegionOperations(self._client, self._config, self._serialize, self._deserialize) - self.database_account_region = DatabaseAccountRegionOperations(self._client, self._config, self._serialize, self._deserialize) - self.percentile_source_target = PercentileSourceTargetOperations(self._client, self._config, self._serialize, self._deserialize) - self.percentile_target = PercentileTargetOperations(self._client, self._config, self._serialize, self._deserialize) + self.collection_region = CollectionRegionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.database_account_region = DatabaseAccountRegionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.percentile_source_target = PercentileSourceTargetOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.percentile_target = PercentileTargetOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.percentile = PercentileOperations(self._client, self._config, self._serialize, self._deserialize) - self.collection_partition_region = CollectionPartitionRegionOperations(self._client, self._config, self._serialize, self._deserialize) - self.collection_partition = CollectionPartitionOperations(self._client, self._config, self._serialize, self._deserialize) - self.partition_key_range_id = PartitionKeyRangeIdOperations(self._client, self._config, self._serialize, self._deserialize) - self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations(self._client, self._config, self._serialize, self._deserialize) + self.collection_partition_region = CollectionPartitionRegionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.collection_partition = CollectionPartitionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.partition_key_range_id = PartitionKeyRangeIdOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.graph_resources = GraphResourcesOperations(self._client, self._config, self._serialize, self._deserialize) self.sql_resources = SqlResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.mongo_db_resources = MongoDBResourcesOperations(self._client, self._config, self._serialize, self._deserialize) + self.mongo_db_resources = MongoDBResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.table_resources = TableResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.cassandra_resources = CassandraResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.gremlin_resources = GremlinResourcesOperations(self._client, self._config, self._serialize, self._deserialize) + self.cassandra_resources = CassandraResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.gremlin_resources = GremlinResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.data_transfer_jobs = DataTransferJobsOperations(self._client, self._config, self._serialize, self._deserialize) - self.cassandra_clusters = CassandraClustersOperations(self._client, self._config, self._serialize, self._deserialize) - self.cassandra_data_centers = CassandraDataCentersOperations(self._client, self._config, self._serialize, self._deserialize) - self.notebook_workspaces = NotebookWorkspacesOperations(self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_database_accounts = RestorableDatabaseAccountsOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_sql_databases = RestorableSqlDatabasesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_sql_containers = RestorableSqlContainersOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_sql_resources = RestorableSqlResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_mongodb_databases = RestorableMongodbDatabasesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_mongodb_collections = RestorableMongodbCollectionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_mongodb_resources = RestorableMongodbResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_gremlin_databases = RestorableGremlinDatabasesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_gremlin_graphs = RestorableGremlinGraphsOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_gremlin_resources = RestorableGremlinResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_tables = RestorableTablesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_table_resources = RestorableTableResourcesOperations(self._client, self._config, self._serialize, self._deserialize) + self.data_transfer_jobs = DataTransferJobsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.cassandra_clusters = CassandraClustersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.cassandra_data_centers = CassandraDataCentersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.notebook_workspaces = NotebookWorkspacesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_database_accounts = RestorableDatabaseAccountsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_sql_databases = RestorableSqlDatabasesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_sql_containers = RestorableSqlContainersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_sql_resources = RestorableSqlResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_mongodb_databases = RestorableMongodbDatabasesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_mongodb_collections = RestorableMongodbCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_mongodb_resources = RestorableMongodbResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_gremlin_databases = RestorableGremlinDatabasesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_gremlin_graphs = RestorableGremlinGraphsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_gremlin_resources = RestorableGremlinResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_tables = RestorableTablesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_table_resources = RestorableTableResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.service = ServiceOperations(self._client, self._config, self._serialize, self._deserialize) - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> HttpResponse: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -200,7 +297,7 @@ def _send_request( >>> response = client._send_request(request) - For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request :param request: The network request you want to make. Required. :type request: ~azure.core.rest.HttpRequest diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_patch.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_patch.py index 74e48ecd07c..f99e77fef98 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_patch.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_patch.py @@ -28,4 +28,4 @@ # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass \ No newline at end of file + pass diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_serialization.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_serialization.py new file mode 100644 index 00000000000..7c1dedb5133 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_serialization.py @@ -0,0 +1,1970 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# pylint: skip-file + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote # type: ignore +import xml.etree.ElementTree as ET + +import isodate + +from typing import Dict, Any, cast, TYPE_CHECKING + +from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +if TYPE_CHECKING: + from typing import Optional, Union, AnyStr, IO, Mapping + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data, content_type=None): + # type: (Optional[Union[AnyStr, IO]], Optional[str]) -> Any + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise_with_traceback(DeserializationError, "XML is invalid") + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes, headers): + # type: (Optional[Union[AnyStr, IO]], Mapping) -> Any + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +try: + basestring # type: ignore + unicode_str = unicode # type: ignore +except NameError: + basestring = str # type: ignore + unicode_str = str # type: ignore + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + + +class UTC(datetime.tzinfo): + """Time Zone info for handling UTC""" + + def utcoffset(self, dt): + """UTF offset for UTC is 0.""" + return datetime.timedelta(0) + + def tzname(self, dt): + """Timestamp representation.""" + return "Z" + + def dst(self, dt): + """No daylight saving for UTC.""" + return datetime.timedelta(hours=1) + + +try: + from datetime import timezone as _FixedOffset +except ImportError: # Python 2.7 + + class _FixedOffset(datetime.tzinfo): # type: ignore + """Fixed offset in minutes east from UTC. + Copy/pasted from Python doc + :param datetime.timedelta offset: offset in timedelta format + """ + + def __init__(self, offset): + self.__offset = offset + + def utcoffset(self, dt): + return self.__offset + + def tzname(self, dt): + return str(self.__offset.total_seconds() / 3600) + + def __repr__(self): + return "".format(self.tzname(None)) + + def dst(self, dt): + return datetime.timedelta(0) + + def __getinitargs__(self): + return (self.__offset,) + + +try: + from datetime import timezone + + TZ_UTC = timezone.utc # type: ignore +except ImportError: + TZ_UTC = UTC() # type: ignore + +_FLATTEN = re.compile(r"(? y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes=None): + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize(self, target_obj, data_type=None, **kwargs): + """Serialize data into a string according to type. + + :param target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises: SerializationError if serialization fails. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() + try: + attributes = target_obj._attribute_map + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized.update(target_obj.additional_properties) + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) + continue + if xml_desc.get("text", False): + serialized.text = new_attr + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = unicode_str(new_attr) + serialized.append(local_node) + else: # JSON + for k in reversed(keys): + unflattened = {k: new_attr} + new_attr = unflattened + + _new_attr = new_attr + _serialized = serialized + for k in keys: + if k not in _serialized: + _serialized.update(_new_attr) + _new_attr = _new_attr[k] + _serialized = _serialized[k] + except ValueError: + continue + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise_with_traceback(SerializationError, msg, err) + else: + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises: SerializationError if serialization fails. + :raises: ValueError if data is None + """ + + # Just in case this is a dict + internal_data_type = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) + except DeserializationError as err: + raise_with_traceback(SerializationError, "Unable to build a model: " + str(err), err) + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] + if not kwargs.get("skip_quote", False): + data = [quote(str(d), safe="") for d in data] + return str(self.serialize_iter(data, internal_data_type, **kwargs)) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :param bool required: Whether it's essential that the data not be + empty or None + :raises: AttributeError if required data is None. + :raises: ValueError if data is None + :raises: SerializationError if serialization fails. + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + elif data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, data.__class__) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise_with_traceback(SerializationError, msg.format(data, data_type), err) + else: + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param data: Object to be serialized. + :param str data_type: Type of object in the iterable. + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + return eval(data_type)(data) # nosec + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param data: Object to be serialized. + :rtype: str + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + else: + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list attr: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param bool required: Whether the objects in the iterable must + not be None or empty. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + :rtype: list, str + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError: + serialized.append(None) + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :param bool required: Whether the objects in the dictionary must + not be None or empty. + :rtype: dict + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is unicode_str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + elif obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) + return result + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) + + @staticmethod + def serialize_bytearray(attr, **kwargs): + """Serialize bytearray into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): + """Serialize str into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): + """Serialize Decimal object to float. + + :param attr: Object to be serialized. + :rtype: float + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): + """Serialize long (Py2) or int (Py3). + + :param attr: Object to be serialized. + :rtype: int/long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: TypeError if format invalid. + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError: + raise TypeError("RFC1123 object must be valid Datetime object.") + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: SerializationError if format invalid. + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise_with_traceback(SerializationError, msg, err) + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise_with_traceback(TypeError, msg, err) + + @staticmethod + def serialize_unix(attr, **kwargs): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises: SerializationError if format invalid + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError: + raise TypeError("Unix time object must be valid Datetime object.") + + +def rest_key_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key.""" + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + else: + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + else: # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer(object): + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes=None): + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, basestring): + return self.deserialize_data(data, response) + elif isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None: + return data + try: + attributes = response._attribute_map + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name + raise_with_traceback(DeserializationError, msg, err) + else: + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deseralize. + """ + if target is None: + return None, None + + if isinstance(target, basestring): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deseralize. + :param str content_type: Swagger "produces" if available. + """ + try: + return self(target_obj, data, content_type=content_type) + except: + _LOGGER.debug( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param raw_data: Data to be processed. + :param content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (basestring, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param response: The response model class. + :param d_attrs: The deserialized response attributes. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [k for k, v in response._validation.items() if v.get("readonly")] + const = [k for k, v in response._validation.items() if v.get("constant")] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) + raise DeserializationError(msg + str(err)) + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) + + def deserialize_data(self, data, data_type): + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise_with_traceback(DeserializationError, msg, err) + else: + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :rtype: dict + :raises: TypeError if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, basestring): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + else: + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :rtype: str, int, float or bool + :raises: TypeError if string format is not valid. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + else: + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + elif isinstance(attr, basestring): + if attr.lower() in ["true", "1"]: + return True + elif attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + return eval(data_type)(attr) # nosec + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): + return data + except NameError: + return str(data) + else: + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + # https://github.com/Azure/azure-rest-api-specs/issues/141 + try: + return list(enum_obj.__members__.values())[data] + except IndexError: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) + attr = attr + padding + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :rtype: Decimal + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(attr) + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise_with_traceback(DeserializationError, msg, err) + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :rtype: long or int + :raises: ValueError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :rtype: TimeDelta + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise_with_traceback(DeserializationError, msg, err) + else: + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :rtype: Date + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :rtype: Datetime + :raises: DeserializationError if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) + try: + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_vendor.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_vendor.py index 138f663c53a..9aad73fc743 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_vendor.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_vendor.py @@ -7,6 +7,7 @@ from azure.core.pipeline.transport import HttpRequest + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -14,6 +15,7 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -21,7 +23,5 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_version.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_version.py index 0ed662c82c4..a712687790e 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_version.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "7.0.0b6" +VERSION = "0.7.0" diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/__init__.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/__init__.py index 84d58edd389..f1e67febd9c 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/__init__.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/__init__.py @@ -7,9 +7,15 @@ # -------------------------------------------------------------------------- from ._cosmos_db_management_client import CosmosDBManagementClient -__all__ = ['CosmosDBManagementClient'] -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() +try: + from ._patch import __all__ as _patch_all + from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = ["CosmosDBManagementClient"] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/_configuration.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/_configuration.py index 3eb06ac6386..f2e56d4fbdb 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/_configuration.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/_configuration.py @@ -25,23 +25,18 @@ class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=t Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. + :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. + :param subscription_id: The ID of the target subscription. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2022-02-15-preview". Note that overriding + :keyword api_version: Api Version. Default value is "2022-08-15-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", "2022-08-15-preview") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -51,22 +46,21 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-cosmosdb/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/_cosmos_db_management_client.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/_cosmos_db_management_client.py index 142ba8dd0a8..4fa2888ba9c 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/_cosmos_db_management_client.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/_cosmos_db_management_client.py @@ -9,20 +9,60 @@ from copy import deepcopy from typing import Any, Awaitable, TYPE_CHECKING -from msrest import Deserializer, Serializer - from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from .. import models +from .._serialization import Deserializer, Serializer from ._configuration import CosmosDBManagementClientConfiguration -from .operations import CassandraClustersOperations, CassandraDataCentersOperations, CassandraResourcesOperations, CollectionOperations, CollectionPartitionOperations, CollectionPartitionRegionOperations, CollectionRegionOperations, DataTransferJobsOperations, DatabaseAccountRegionOperations, DatabaseAccountsOperations, DatabaseOperations, GraphResourcesOperations, GremlinResourcesOperations, LocationsOperations, MongoDBResourcesOperations, NotebookWorkspacesOperations, Operations, PartitionKeyRangeIdOperations, PartitionKeyRangeIdRegionOperations, PercentileOperations, PercentileSourceTargetOperations, PercentileTargetOperations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, RestorableDatabaseAccountsOperations, RestorableGremlinDatabasesOperations, RestorableGremlinGraphsOperations, RestorableGremlinResourcesOperations, RestorableMongodbCollectionsOperations, RestorableMongodbDatabasesOperations, RestorableMongodbResourcesOperations, RestorableSqlContainersOperations, RestorableSqlDatabasesOperations, RestorableSqlResourcesOperations, RestorableTableResourcesOperations, RestorableTablesOperations, ServiceOperations, SqlResourcesOperations, TableResourcesOperations +from .operations import ( + CassandraClustersOperations, + CassandraDataCentersOperations, + CassandraResourcesOperations, + CollectionOperations, + CollectionPartitionOperations, + CollectionPartitionRegionOperations, + CollectionRegionOperations, + DataTransferJobsOperations, + DatabaseAccountRegionOperations, + DatabaseAccountsOperations, + DatabaseOperations, + GraphResourcesOperations, + GremlinResourcesOperations, + LocationsOperations, + MongoDBResourcesOperations, + NotebookWorkspacesOperations, + Operations, + PartitionKeyRangeIdOperations, + PartitionKeyRangeIdRegionOperations, + PercentileOperations, + PercentileSourceTargetOperations, + PercentileTargetOperations, + PrivateEndpointConnectionsOperations, + PrivateLinkResourcesOperations, + RestorableDatabaseAccountsOperations, + RestorableGremlinDatabasesOperations, + RestorableGremlinGraphsOperations, + RestorableGremlinResourcesOperations, + RestorableMongodbCollectionsOperations, + RestorableMongodbDatabasesOperations, + RestorableMongodbResourcesOperations, + RestorableSqlContainersOperations, + RestorableSqlDatabasesOperations, + RestorableSqlResourcesOperations, + RestorableTableResourcesOperations, + RestorableTablesOperations, + ServiceOperations, + SqlResourcesOperations, + TableResourcesOperations, +) if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class CosmosDBManagementClient: # pylint: disable=too-many-instance-attributes + +class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Azure Cosmos DB Database Service Resource Provider REST API. :ivar database_accounts: DatabaseAccountsOperations operations @@ -122,13 +162,13 @@ class CosmosDBManagementClient: # pylint: disable=too-many-instance-attribute azure.mgmt.cosmosdb.aio.operations.RestorableTableResourcesOperations :ivar service: ServiceOperations operations :vartype service: azure.mgmt.cosmosdb.aio.operations.ServiceOperations - :param credential: Credential needed for the client to connect to Azure. + :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. + :param subscription_id: The ID of the target subscription. Required. :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2022-02-15-preview". Note that overriding + :keyword api_version: Api Version. Default value is "2022-08-15-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -142,59 +182,116 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = CosmosDBManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = CosmosDBManagementClientConfiguration( + credential=credential, subscription_id=subscription_id, **kwargs + ) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - self.database_accounts = DatabaseAccountsOperations(self._client, self._config, self._serialize, self._deserialize) + self.database_accounts = DatabaseAccountsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.database = DatabaseOperations(self._client, self._config, self._serialize, self._deserialize) self.collection = CollectionOperations(self._client, self._config, self._serialize, self._deserialize) - self.collection_region = CollectionRegionOperations(self._client, self._config, self._serialize, self._deserialize) - self.database_account_region = DatabaseAccountRegionOperations(self._client, self._config, self._serialize, self._deserialize) - self.percentile_source_target = PercentileSourceTargetOperations(self._client, self._config, self._serialize, self._deserialize) - self.percentile_target = PercentileTargetOperations(self._client, self._config, self._serialize, self._deserialize) + self.collection_region = CollectionRegionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.database_account_region = DatabaseAccountRegionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.percentile_source_target = PercentileSourceTargetOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.percentile_target = PercentileTargetOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.percentile = PercentileOperations(self._client, self._config, self._serialize, self._deserialize) - self.collection_partition_region = CollectionPartitionRegionOperations(self._client, self._config, self._serialize, self._deserialize) - self.collection_partition = CollectionPartitionOperations(self._client, self._config, self._serialize, self._deserialize) - self.partition_key_range_id = PartitionKeyRangeIdOperations(self._client, self._config, self._serialize, self._deserialize) - self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations(self._client, self._config, self._serialize, self._deserialize) + self.collection_partition_region = CollectionPartitionRegionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.collection_partition = CollectionPartitionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.partition_key_range_id = PartitionKeyRangeIdOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.graph_resources = GraphResourcesOperations(self._client, self._config, self._serialize, self._deserialize) self.sql_resources = SqlResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.mongo_db_resources = MongoDBResourcesOperations(self._client, self._config, self._serialize, self._deserialize) + self.mongo_db_resources = MongoDBResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.table_resources = TableResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.cassandra_resources = CassandraResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.gremlin_resources = GremlinResourcesOperations(self._client, self._config, self._serialize, self._deserialize) + self.cassandra_resources = CassandraResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.gremlin_resources = GremlinResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.data_transfer_jobs = DataTransferJobsOperations(self._client, self._config, self._serialize, self._deserialize) - self.cassandra_clusters = CassandraClustersOperations(self._client, self._config, self._serialize, self._deserialize) - self.cassandra_data_centers = CassandraDataCentersOperations(self._client, self._config, self._serialize, self._deserialize) - self.notebook_workspaces = NotebookWorkspacesOperations(self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_database_accounts = RestorableDatabaseAccountsOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_sql_databases = RestorableSqlDatabasesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_sql_containers = RestorableSqlContainersOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_sql_resources = RestorableSqlResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_mongodb_databases = RestorableMongodbDatabasesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_mongodb_collections = RestorableMongodbCollectionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_mongodb_resources = RestorableMongodbResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_gremlin_databases = RestorableGremlinDatabasesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_gremlin_graphs = RestorableGremlinGraphsOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_gremlin_resources = RestorableGremlinResourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_tables = RestorableTablesOperations(self._client, self._config, self._serialize, self._deserialize) - self.restorable_table_resources = RestorableTableResourcesOperations(self._client, self._config, self._serialize, self._deserialize) + self.data_transfer_jobs = DataTransferJobsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.cassandra_clusters = CassandraClustersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.cassandra_data_centers = CassandraDataCentersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.notebook_workspaces = NotebookWorkspacesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_database_accounts = RestorableDatabaseAccountsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_sql_databases = RestorableSqlDatabasesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_sql_containers = RestorableSqlContainersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_sql_resources = RestorableSqlResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_mongodb_databases = RestorableMongodbDatabasesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_mongodb_collections = RestorableMongodbCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_mongodb_resources = RestorableMongodbResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_gremlin_databases = RestorableGremlinDatabasesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_gremlin_graphs = RestorableGremlinGraphsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_gremlin_resources = RestorableGremlinResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_tables = RestorableTablesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.restorable_table_resources = RestorableTableResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.service = ServiceOperations(self._client, self._config, self._serialize, self._deserialize) - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -203,7 +300,7 @@ def _send_request( >>> response = await client._send_request(request) - For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request :param request: The network request you want to make. Required. :type request: ~azure.core.rest.HttpRequest diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/_patch.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/_patch.py index 74e48ecd07c..f99e77fef98 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/_patch.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/_patch.py @@ -28,4 +28,4 @@ # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass \ No newline at end of file + pass diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/__init__.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/__init__.py index 5839e943283..b9aee75bbc6 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/__init__.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/__init__.py @@ -46,44 +46,50 @@ from ._restorable_table_resources_operations import RestorableTableResourcesOperations from ._service_operations import ServiceOperations +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'DatabaseAccountsOperations', - 'Operations', - 'DatabaseOperations', - 'CollectionOperations', - 'CollectionRegionOperations', - 'DatabaseAccountRegionOperations', - 'PercentileSourceTargetOperations', - 'PercentileTargetOperations', - 'PercentileOperations', - 'CollectionPartitionRegionOperations', - 'CollectionPartitionOperations', - 'PartitionKeyRangeIdOperations', - 'PartitionKeyRangeIdRegionOperations', - 'GraphResourcesOperations', - 'SqlResourcesOperations', - 'MongoDBResourcesOperations', - 'TableResourcesOperations', - 'CassandraResourcesOperations', - 'GremlinResourcesOperations', - 'LocationsOperations', - 'DataTransferJobsOperations', - 'CassandraClustersOperations', - 'CassandraDataCentersOperations', - 'NotebookWorkspacesOperations', - 'PrivateEndpointConnectionsOperations', - 'PrivateLinkResourcesOperations', - 'RestorableDatabaseAccountsOperations', - 'RestorableSqlDatabasesOperations', - 'RestorableSqlContainersOperations', - 'RestorableSqlResourcesOperations', - 'RestorableMongodbDatabasesOperations', - 'RestorableMongodbCollectionsOperations', - 'RestorableMongodbResourcesOperations', - 'RestorableGremlinDatabasesOperations', - 'RestorableGremlinGraphsOperations', - 'RestorableGremlinResourcesOperations', - 'RestorableTablesOperations', - 'RestorableTableResourcesOperations', - 'ServiceOperations', + "DatabaseAccountsOperations", + "Operations", + "DatabaseOperations", + "CollectionOperations", + "CollectionRegionOperations", + "DatabaseAccountRegionOperations", + "PercentileSourceTargetOperations", + "PercentileTargetOperations", + "PercentileOperations", + "CollectionPartitionRegionOperations", + "CollectionPartitionOperations", + "PartitionKeyRangeIdOperations", + "PartitionKeyRangeIdRegionOperations", + "GraphResourcesOperations", + "SqlResourcesOperations", + "MongoDBResourcesOperations", + "TableResourcesOperations", + "CassandraResourcesOperations", + "GremlinResourcesOperations", + "LocationsOperations", + "DataTransferJobsOperations", + "CassandraClustersOperations", + "CassandraDataCentersOperations", + "NotebookWorkspacesOperations", + "PrivateEndpointConnectionsOperations", + "PrivateLinkResourcesOperations", + "RestorableDatabaseAccountsOperations", + "RestorableSqlDatabasesOperations", + "RestorableSqlContainersOperations", + "RestorableSqlResourcesOperations", + "RestorableMongodbDatabasesOperations", + "RestorableMongodbCollectionsOperations", + "RestorableMongodbResourcesOperations", + "RestorableGremlinDatabasesOperations", + "RestorableGremlinGraphsOperations", + "RestorableGremlinResourcesOperations", + "RestorableTablesOperations", + "RestorableTableResourcesOperations", + "ServiceOperations", ] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_cassandra_clusters_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_cassandra_clusters_operations.py index e8496e939e1..30f4c51a387 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_cassandra_clusters_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_cassandra_clusters_operations.py @@ -6,86 +6,112 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._vendor import _convert_request -from ...operations._cassandra_clusters_operations import build_create_update_request_initial, build_deallocate_request_initial, build_delete_request_initial, build_get_backup_request, build_get_request, build_invoke_command_request_initial, build_list_backups_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_start_request_initial, build_status_request, build_update_request_initial -T = TypeVar('T') +from ...operations._cassandra_clusters_operations import ( + build_create_update_request, + build_deallocate_request, + build_delete_request, + build_get_backup_request, + build_get_request, + build_invoke_command_request, + build_list_backups_request, + build_list_by_resource_group_request, + build_list_by_subscription_request, + build_start_request, + build_status_request, + build_update_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class CassandraClustersOperations: - """CassandraClustersOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class CassandraClustersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`cassandra_clusters` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list_by_subscription( - self, - **kwargs: Any - ) -> AsyncIterable["_models.ListClusters"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.ClusterResource"]: """List all managed Cassandra clusters in this subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListClusters or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.ListClusters] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either ClusterResource or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.ClusterResource] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ListClusters] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListClusters"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata['url'], + template_url=self.list_by_subscription.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -99,10 +125,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -112,56 +136,60 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/cassandraClusters"} # type: ignore + list_by_subscription.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/cassandraClusters"} # type: ignore @distributed_trace def list_by_resource_group( - self, - resource_group_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ListClusters"]: + self, resource_group_name: str, **kwargs: Any + ) -> AsyncIterable["_models.ClusterResource"]: """List all managed Cassandra clusters in this resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListClusters or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.ListClusters] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either ClusterResource or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.ClusterResource] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ListClusters] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListClusters"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata['url'], + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -175,10 +203,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -188,100 +214,102 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters"} # type: ignore + list_by_resource_group.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters"} # type: ignore @distributed_trace_async - async def get( - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> "_models.ClusterResource": + async def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _models.ClusterResource: """Get the properties of a managed Cassandra cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterResource, or the result of cls(response) + :return: ClusterResource or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ClusterResource - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterResource"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClusterResource] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore async def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any + self, resource_group_name: str, cluster_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_request( resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -291,21 +319,16 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: + async def begin_delete(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncLROPoller[None]: """Deletes a managed Cassandra cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -317,80 +340,94 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._delete_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore async def _create_update_initial( - self, - resource_group_name: str, - cluster_name: str, - body: "_models.ClusterResource", - **kwargs: Any - ) -> "_models.ClusterResource": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterResource"] + self, resource_group_name: str, cluster_name: str, body: Union[_models.ClusterResource, IO], **kwargs: Any + ) -> _models.ClusterResource: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(body, 'ClusterResource') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClusterResource] - request = build_create_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "ClusterResource") + + request = build_create_update_request( resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_initial.metadata['url'], + content=_content, + template_url=self._create_update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -398,36 +435,42 @@ async def _create_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore + _create_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore - - @distributed_trace_async + @overload async def begin_create_update( self, resource_group_name: str, cluster_name: str, - body: "_models.ClusterResource", + body: _models.ClusterResource, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller["_models.ClusterResource"]: + ) -> AsyncLROPoller[_models.ClusterResource]: """Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :param body: The properties specifying the desired state of the managed Cassandra cluster. + Required. :type body: ~azure.mgmt.cosmosdb.models.ClusterResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -439,86 +482,169 @@ async def begin_create_update( :return: An instance of AsyncLROPoller that returns either ClusterResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ClusterResource] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterResource"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + async def begin_create_update( + self, + resource_group_name: str, + cluster_name: str, + body: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ClusterResource]: + """Create or update a managed Cassandra cluster. When updating, you must specify all writable + properties. To update only some properties, use PATCH. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param body: The properties specifying the desired state of the managed Cassandra cluster. + Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ClusterResource or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ClusterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_update( + self, resource_group_name: str, cluster_name: str, body: Union[_models.ClusterResource, IO], **kwargs: Any + ) -> AsyncLROPoller[_models.ClusterResource]: + """Create or update a managed Cassandra cluster. When updating, you must specify all writable + properties. To update only some properties, use PATCH. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param body: The properties specifying the desired state of the managed Cassandra cluster. Is + either a model type or a IO type. Required. + :type body: ~azure.mgmt.cosmosdb.models.ClusterResource or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ClusterResource or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ClusterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClusterResource] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_initial( + raw_result = await self._create_update_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore + begin_create_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore async def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - body: "_models.ClusterResource", - **kwargs: Any - ) -> "_models.ClusterResource": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterResource"] + self, resource_group_name: str, cluster_name: str, body: Union[_models.ClusterResource, IO], **kwargs: Any + ) -> _models.ClusterResource: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(body, 'ClusterResource') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClusterResource] - request = build_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "ClusterResource") + + request = build_update_request( resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_initial.metadata['url'], + content=_content, + template_url=self._update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -526,35 +652,40 @@ async def _update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if response.status_code == 202: - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore - + _update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore - @distributed_trace_async + @overload async def begin_update( self, resource_group_name: str, cluster_name: str, - body: "_models.ClusterResource", + body: _models.ClusterResource, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller["_models.ClusterResource"]: + ) -> AsyncLROPoller[_models.ClusterResource]: """Updates some of the properties of a managed Cassandra cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param body: Parameters to provide for specifying the managed Cassandra cluster. + :param body: Parameters to provide for specifying the managed Cassandra cluster. Required. :type body: ~azure.mgmt.cosmosdb.models.ClusterResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -566,118 +697,203 @@ async def begin_update( :return: An instance of AsyncLROPoller that returns either ClusterResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ClusterResource] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterResource"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + body: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ClusterResource]: + """Updates some of the properties of a managed Cassandra cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param body: Parameters to provide for specifying the managed Cassandra cluster. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ClusterResource or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ClusterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, resource_group_name: str, cluster_name: str, body: Union[_models.ClusterResource, IO], **kwargs: Any + ) -> AsyncLROPoller[_models.ClusterResource]: + """Updates some of the properties of a managed Cassandra cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param body: Parameters to provide for specifying the managed Cassandra cluster. Is either a + model type or a IO type. Required. + :type body: ~azure.mgmt.cosmosdb.models.ClusterResource or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ClusterResource or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ClusterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClusterResource] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_initial( + raw_result = await self._update_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore + begin_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore async def _invoke_command_initial( - self, - resource_group_name: str, - cluster_name: str, - body: "_models.CommandPostBody", - **kwargs: Any - ) -> "_models.CommandOutput": - cls = kwargs.pop('cls', None) # type: ClsType["_models.CommandOutput"] + self, resource_group_name: str, cluster_name: str, body: Union[_models.CommandPostBody, IO], **kwargs: Any + ) -> _models.CommandOutput: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(body, 'CommandPostBody') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CommandOutput] - request = build_invoke_command_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "CommandPostBody") + + request = build_invoke_command_request( resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._invoke_command_initial.metadata['url'], + content=_content, + template_url=self._invoke_command_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('CommandOutput', pipeline_response) + deserialized = self._deserialize("CommandOutput", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _invoke_command_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand"} # type: ignore + _invoke_command_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand"} # type: ignore - - @distributed_trace_async + @overload async def begin_invoke_command( self, resource_group_name: str, cluster_name: str, - body: "_models.CommandPostBody", + body: _models.CommandPostBody, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller["_models.CommandOutput"]: + ) -> AsyncLROPoller[_models.CommandOutput]: """Invoke a command like nodetool for cassandra maintenance. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param body: Specification which command to run where. + :param body: Specification which command to run where. Required. :type body: ~azure.mgmt.cosmosdb.models.CommandPostBody + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -689,100 +905,174 @@ async def begin_invoke_command( :return: An instance of AsyncLROPoller that returns either CommandOutput or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CommandOutput] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CommandOutput"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + async def begin_invoke_command( + self, + resource_group_name: str, + cluster_name: str, + body: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommandOutput]: + """Invoke a command like nodetool for cassandra maintenance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param body: Specification which command to run where. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CommandOutput or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CommandOutput] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_invoke_command( + self, resource_group_name: str, cluster_name: str, body: Union[_models.CommandPostBody, IO], **kwargs: Any + ) -> AsyncLROPoller[_models.CommandOutput]: + """Invoke a command like nodetool for cassandra maintenance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param body: Specification which command to run where. Is either a model type or a IO type. + Required. + :type body: ~azure.mgmt.cosmosdb.models.CommandPostBody or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CommandOutput or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CommandOutput] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CommandOutput] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._invoke_command_initial( + raw_result = await self._invoke_command_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('CommandOutput', pipeline_response) + deserialized = self._deserialize("CommandOutput", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_invoke_command.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand"} # type: ignore + begin_invoke_command.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand"} # type: ignore @distributed_trace def list_backups( - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ListBackups"]: + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncIterable["_models.BackupResource"]: """List the backups of this cluster that are available to restore. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListBackups or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.ListBackups] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either BackupResource or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.BackupResource] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ListBackups] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListBackups"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_backups_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_backups.metadata['url'], + template_url=self.list_backups.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_backups_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -796,10 +1086,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -809,104 +1097,107 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups"} # type: ignore + list_backups.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups"} # type: ignore @distributed_trace_async async def get_backup( - self, - resource_group_name: str, - cluster_name: str, - backup_id: str, - **kwargs: Any - ) -> "_models.BackupResource": + self, resource_group_name: str, cluster_name: str, backup_id: str, **kwargs: Any + ) -> _models.BackupResource: """Get the properties of an individual backup of this cluster that is available to restore. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param backup_id: Id of a restorable backup of a Cassandra cluster. + :param backup_id: Id of a restorable backup of a Cassandra cluster. Required. :type backup_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResource, or the result of cls(response) + :return: BackupResource or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.BackupResource - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResource"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupResource] - request = build_get_backup_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, cluster_name=cluster_name, backup_id=backup_id, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_backup.metadata['url'], + template_url=self.get_backup.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackupResource', pipeline_response) + deserialized = self._deserialize("BackupResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}"} # type: ignore - + get_backup.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}"} # type: ignore async def _deallocate_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any + self, resource_group_name: str, cluster_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_deallocate_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_deallocate_request( resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._deallocate_initial.metadata['url'], + template_url=self._deallocate_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202]: @@ -916,23 +1207,20 @@ async def _deallocate_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _deallocate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate"} # type: ignore - + _deallocate_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate"} # type: ignore @distributed_trace_async - async def begin_deallocate( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any + async def begin_deallocate( + self, resource_group_name: str, cluster_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -944,75 +1232,82 @@ async def begin_deallocate( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._deallocate_initial( + raw_result = await self._deallocate_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_deallocate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate"} # type: ignore + begin_deallocate.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate"} # type: ignore async def _start_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any + self, resource_group_name: str, cluster_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_start_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_start_request( resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._start_initial.metadata['url'], + template_url=self._start_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202]: @@ -1022,23 +1317,18 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _start_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start"} # type: ignore - + _start_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start"} # type: ignore @distributed_trace_async - async def begin_start( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: + async def begin_start(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncLROPoller[None]: """Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1050,99 +1340,106 @@ async def begin_start( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._start_initial( + raw_result = await self._start_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start"} # type: ignore + begin_start.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start"} # type: ignore @distributed_trace_async async def status( - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> "_models.CassandraClusterPublicStatus": + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> _models.CassandraClusterPublicStatus: """Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: CassandraClusterPublicStatus, or the result of cls(response) + :return: CassandraClusterPublicStatus or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatus - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraClusterPublicStatus"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraClusterPublicStatus] - request = build_status_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.status.metadata['url'], + template_url=self.status.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('CassandraClusterPublicStatus', pipeline_response) + deserialized = self._deserialize("CassandraClusterPublicStatus", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/status"} # type: ignore - + status.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/status"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_cassandra_data_centers_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_cassandra_data_centers_operations.py index e1c8bedf7b2..232ddb786b3 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_cassandra_data_centers_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_cassandra_data_centers_operations.py @@ -6,96 +6,114 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._vendor import _convert_request -from ...operations._cassandra_data_centers_operations import build_create_update_request_initial, build_delete_request_initial, build_get_request, build_list_request, build_update_request_initial -T = TypeVar('T') +from ...operations._cassandra_data_centers_operations import ( + build_create_update_request, + build_delete_request, + build_get_request, + build_list_request, + build_update_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class CassandraDataCentersOperations: - """CassandraDataCentersOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class CassandraDataCentersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`cassandra_data_centers` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ListDataCenters"]: + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncIterable["_models.DataCenterResource"]: """List all data centers in a particular managed Cassandra cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListDataCenters or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.ListDataCenters] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either DataCenterResource or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.DataCenterResource] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ListDataCenters] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListDataCenters"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -109,10 +127,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -122,106 +138,108 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters"} # type: ignore @distributed_trace_async async def get( - self, - resource_group_name: str, - cluster_name: str, - data_center_name: str, - **kwargs: Any - ) -> "_models.DataCenterResource": + self, resource_group_name: str, cluster_name: str, data_center_name: str, **kwargs: Any + ) -> _models.DataCenterResource: """Get the properties of a managed Cassandra data center. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param data_center_name: Data center name in a managed Cassandra cluster. + :param data_center_name: Data center name in a managed Cassandra cluster. Required. :type data_center_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DataCenterResource, or the result of cls(response) + :return: DataCenterResource or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DataCenterResource - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCenterResource"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataCenterResource] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore async def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - data_center_name: str, - **kwargs: Any + self, resource_group_name: str, cluster_name: str, data_center_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_request( resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -231,24 +249,20 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - data_center_name: str, - **kwargs: Any + async def begin_delete( + self, resource_group_name: str, cluster_name: str, data_center_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a managed Cassandra data center. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param data_center_name: Data center name in a managed Cassandra cluster. + :param data_center_name: Data center name in a managed Cassandra cluster. Required. :type data_center_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -260,83 +274,101 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._delete_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore async def _create_update_initial( self, resource_group_name: str, cluster_name: str, data_center_name: str, - body: "_models.DataCenterResource", + body: Union[_models.DataCenterResource, IO], **kwargs: Any - ) -> "_models.DataCenterResource": - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCenterResource"] + ) -> _models.DataCenterResource: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(body, 'DataCenterResource') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataCenterResource] - request = build_create_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "DataCenterResource") + + request = build_create_update_request( resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_initial.metadata['url'], + content=_content, + template_url=self._create_update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -344,18 +376,97 @@ async def _create_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + _create_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + + @overload + async def begin_create_update( + self, + resource_group_name: str, + cluster_name: str, + data_center_name: str, + body: _models.DataCenterResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataCenterResource]: + """Create or update a managed Cassandra data center. When updating, overwrite all properties. To + update only some properties, use PATCH. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param data_center_name: Data center name in a managed Cassandra cluster. Required. + :type data_center_name: str + :param body: Parameters specifying the managed Cassandra data center. Required. + :type body: ~azure.mgmt.cosmosdb.models.DataCenterResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DataCenterResource or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update( + self, + resource_group_name: str, + cluster_name: str, + data_center_name: str, + body: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataCenterResource]: + """Create or update a managed Cassandra data center. When updating, overwrite all properties. To + update only some properties, use PATCH. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param data_center_name: Data center name in a managed Cassandra cluster. Required. + :type data_center_name: str + :param body: Parameters specifying the managed Cassandra data center. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DataCenterResource or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update( @@ -363,20 +474,25 @@ async def begin_create_update( resource_group_name: str, cluster_name: str, data_center_name: str, - body: "_models.DataCenterResource", + body: Union[_models.DataCenterResource, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.DataCenterResource"]: + ) -> AsyncLROPoller[_models.DataCenterResource]: """Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param data_center_name: Data center name in a managed Cassandra cluster. + :param data_center_name: Data center name in a managed Cassandra cluster. Required. :type data_center_name: str - :param body: Parameters specifying the managed Cassandra data center. - :type body: ~azure.mgmt.cosmosdb.models.DataCenterResource + :param body: Parameters specifying the managed Cassandra data center. Is either a model type or + a IO type. Required. + :type body: ~azure.mgmt.cosmosdb.models.DataCenterResource or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -388,89 +504,106 @@ async def begin_create_update( :return: An instance of AsyncLROPoller that returns either DataCenterResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCenterResource"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataCenterResource] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_initial( + raw_result = await self._create_update_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + begin_create_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore async def _update_initial( self, resource_group_name: str, cluster_name: str, data_center_name: str, - body: "_models.DataCenterResource", + body: Union[_models.DataCenterResource, IO], **kwargs: Any - ) -> "_models.DataCenterResource": - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCenterResource"] + ) -> _models.DataCenterResource: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(body, 'DataCenterResource') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataCenterResource] - request = build_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "DataCenterResource") + + request = build_update_request( resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_initial.metadata['url'], + content=_content, + template_url=self._update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -478,18 +611,95 @@ async def _update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if response.status_code == 202: - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + _update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + data_center_name: str, + body: _models.DataCenterResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataCenterResource]: + """Update some of the properties of a managed Cassandra data center. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param data_center_name: Data center name in a managed Cassandra cluster. Required. + :type data_center_name: str + :param body: Parameters to provide for specifying the managed Cassandra data center. Required. + :type body: ~azure.mgmt.cosmosdb.models.DataCenterResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DataCenterResource or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + data_center_name: str, + body: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataCenterResource]: + """Update some of the properties of a managed Cassandra data center. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param data_center_name: Data center name in a managed Cassandra cluster. Required. + :type data_center_name: str + :param body: Parameters to provide for specifying the managed Cassandra data center. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DataCenterResource or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_update( @@ -497,19 +707,24 @@ async def begin_update( resource_group_name: str, cluster_name: str, data_center_name: str, - body: "_models.DataCenterResource", + body: Union[_models.DataCenterResource, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.DataCenterResource"]: + ) -> AsyncLROPoller[_models.DataCenterResource]: """Update some of the properties of a managed Cassandra data center. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param data_center_name: Data center name in a managed Cassandra cluster. + :param data_center_name: Data center name in a managed Cassandra cluster. Required. :type data_center_name: str - :param body: Parameters to provide for specifying the managed Cassandra data center. - :type body: ~azure.mgmt.cosmosdb.models.DataCenterResource + :param body: Parameters to provide for specifying the managed Cassandra data center. Is either + a model type or a IO type. Required. + :type body: ~azure.mgmt.cosmosdb.models.DataCenterResource or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -521,48 +736,51 @@ async def begin_update( :return: An instance of AsyncLROPoller that returns either DataCenterResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCenterResource"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataCenterResource] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_initial( + raw_result = await self._update_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + begin_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_cassandra_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_cassandra_resources_operations.py index fd03d9a197a..9e21e6b6d9a 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_cassandra_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_cassandra_resources_operations.py @@ -6,98 +6,135 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._vendor import _convert_request -from ...operations._cassandra_resources_operations import build_create_update_cassandra_keyspace_request_initial, build_create_update_cassandra_table_request_initial, build_create_update_cassandra_view_request_initial, build_delete_cassandra_keyspace_request_initial, build_delete_cassandra_table_request_initial, build_delete_cassandra_view_request_initial, build_get_cassandra_keyspace_request, build_get_cassandra_keyspace_throughput_request, build_get_cassandra_table_request, build_get_cassandra_table_throughput_request, build_get_cassandra_view_request, build_get_cassandra_view_throughput_request, build_list_cassandra_keyspaces_request, build_list_cassandra_tables_request, build_list_cassandra_views_request, build_migrate_cassandra_keyspace_to_autoscale_request_initial, build_migrate_cassandra_keyspace_to_manual_throughput_request_initial, build_migrate_cassandra_table_to_autoscale_request_initial, build_migrate_cassandra_table_to_manual_throughput_request_initial, build_migrate_cassandra_view_to_autoscale_request_initial, build_migrate_cassandra_view_to_manual_throughput_request_initial, build_update_cassandra_keyspace_throughput_request_initial, build_update_cassandra_table_throughput_request_initial, build_update_cassandra_view_throughput_request_initial -T = TypeVar('T') +from ...operations._cassandra_resources_operations import ( + build_create_update_cassandra_keyspace_request, + build_create_update_cassandra_table_request, + build_create_update_cassandra_view_request, + build_delete_cassandra_keyspace_request, + build_delete_cassandra_table_request, + build_delete_cassandra_view_request, + build_get_cassandra_keyspace_request, + build_get_cassandra_keyspace_throughput_request, + build_get_cassandra_table_request, + build_get_cassandra_table_throughput_request, + build_get_cassandra_view_request, + build_get_cassandra_view_throughput_request, + build_list_cassandra_keyspaces_request, + build_list_cassandra_tables_request, + build_list_cassandra_views_request, + build_migrate_cassandra_keyspace_to_autoscale_request, + build_migrate_cassandra_keyspace_to_manual_throughput_request, + build_migrate_cassandra_table_to_autoscale_request, + build_migrate_cassandra_table_to_manual_throughput_request, + build_migrate_cassandra_view_to_autoscale_request, + build_migrate_cassandra_view_to_manual_throughput_request, + build_update_cassandra_keyspace_throughput_request, + build_update_cassandra_table_throughput_request, + build_update_cassandra_view_throughput_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class CassandraResourcesOperations: # pylint: disable=too-many-public-methods - """CassandraResourcesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class CassandraResourcesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`cassandra_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_cassandra_keyspaces( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.CassandraKeyspaceListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.CassandraKeyspaceGetResults"]: """Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either CassandraKeyspaceListResult or the result of + :return: An iterator like instance of either CassandraKeyspaceGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.CassandraKeyspaceListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraKeyspaceListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraKeyspaceListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_cassandra_keyspaces_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_cassandra_keyspaces.metadata['url'], + template_url=self.list_cassandra_keyspaces.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_cassandra_keyspaces_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -111,10 +148,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -124,112 +159,128 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_cassandra_keyspaces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces"} # type: ignore + list_cassandra_keyspaces.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces"} # type: ignore @distributed_trace_async async def get_cassandra_keyspace( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> "_models.CassandraKeyspaceGetResults": + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> _models.CassandraKeyspaceGetResults: """Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: CassandraKeyspaceGetResults, or the result of cls(response) + :return: CassandraKeyspaceGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraKeyspaceGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraKeyspaceGetResults] - request = build_get_cassandra_keyspace_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_cassandra_keyspace.metadata['url'], + template_url=self.get_cassandra_keyspace.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('CassandraKeyspaceGetResults', pipeline_response) + deserialized = self._deserialize("CassandraKeyspaceGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_cassandra_keyspace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore - + get_cassandra_keyspace.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore async def _create_update_cassandra_keyspace_initial( self, resource_group_name: str, account_name: str, keyspace_name: str, - create_update_cassandra_keyspace_parameters: "_models.CassandraKeyspaceCreateUpdateParameters", + create_update_cassandra_keyspace_parameters: Union[_models.CassandraKeyspaceCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.CassandraKeyspaceGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CassandraKeyspaceGetResults"]] + ) -> Optional[_models.CassandraKeyspaceGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_cassandra_keyspace_parameters, 'CassandraKeyspaceCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.CassandraKeyspaceGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_cassandra_keyspace_parameters, (IO, bytes)): + _content = create_update_cassandra_keyspace_parameters + else: + _json = self._serialize.body( + create_update_cassandra_keyspace_parameters, "CassandraKeyspaceCreateUpdateParameters" + ) - request = build_create_update_cassandra_keyspace_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_cassandra_keyspace_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_cassandra_keyspace_initial.metadata['url'], + content=_content, + template_url=self._create_update_cassandra_keyspace_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -238,15 +289,97 @@ async def _create_update_cassandra_keyspace_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('CassandraKeyspaceGetResults', pipeline_response) + deserialized = self._deserialize("CassandraKeyspaceGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_cassandra_keyspace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore + _create_update_cassandra_keyspace_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore + @overload + async def begin_create_update_cassandra_keyspace( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + create_update_cassandra_keyspace_parameters: _models.CassandraKeyspaceCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CassandraKeyspaceGetResults]: + """Create or update an Azure Cosmos DB Cassandra keyspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param create_update_cassandra_keyspace_parameters: The parameters to provide for the current + Cassandra keyspace. Required. + :type create_update_cassandra_keyspace_parameters: + ~azure.mgmt.cosmosdb.models.CassandraKeyspaceCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CassandraKeyspaceGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_cassandra_keyspace( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + create_update_cassandra_keyspace_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CassandraKeyspaceGetResults]: + """Create or update an Azure Cosmos DB Cassandra keyspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param create_update_cassandra_keyspace_parameters: The parameters to provide for the current + Cassandra keyspace. Required. + :type create_update_cassandra_keyspace_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CassandraKeyspaceGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_cassandra_keyspace( @@ -254,21 +387,25 @@ async def begin_create_update_cassandra_keyspace( resource_group_name: str, account_name: str, keyspace_name: str, - create_update_cassandra_keyspace_parameters: "_models.CassandraKeyspaceCreateUpdateParameters", + create_update_cassandra_keyspace_parameters: Union[_models.CassandraKeyspaceCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.CassandraKeyspaceGetResults"]: + ) -> AsyncLROPoller[_models.CassandraKeyspaceGetResults]: """Create or update an Azure Cosmos DB Cassandra keyspace. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :param create_update_cassandra_keyspace_parameters: The parameters to provide for the current - Cassandra keyspace. + Cassandra keyspace. Is either a model type or a IO type. Required. :type create_update_cassandra_keyspace_parameters: - ~azure.mgmt.cosmosdb.models.CassandraKeyspaceCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.CassandraKeyspaceCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -281,84 +418,89 @@ async def begin_create_update_cassandra_keyspace( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraKeyspaceGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraKeyspaceGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_cassandra_keyspace_initial( + raw_result = await self._create_update_cassandra_keyspace_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, create_update_cassandra_keyspace_parameters=create_update_cassandra_keyspace_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('CassandraKeyspaceGetResults', pipeline_response) + deserialized = self._deserialize("CassandraKeyspaceGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_cassandra_keyspace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore + begin_create_update_cassandra_keyspace.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore async def _delete_cassandra_keyspace_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_cassandra_keyspace_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_cassandra_keyspace_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_cassandra_keyspace_initial.metadata['url'], + template_url=self._delete_cassandra_keyspace_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -368,24 +510,20 @@ async def _delete_cassandra_keyspace_initial( # pylint: disable=inconsistent-re if cls: return cls(pipeline_response, None, {}) - _delete_cassandra_keyspace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore - + _delete_cassandra_keyspace_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore @distributed_trace_async - async def begin_delete_cassandra_keyspace( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any + async def begin_delete_cassandra_keyspace( + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB Cassandra keyspace. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -397,146 +535,166 @@ async def begin_delete_cassandra_keyspace( # pylint: disable=inconsistent-retur Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_cassandra_keyspace_initial( + raw_result = await self._delete_cassandra_keyspace_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_cassandra_keyspace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore + begin_delete_cassandra_keyspace.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore @distributed_trace_async async def get_cassandra_keyspace_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_cassandra_keyspace_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_cassandra_keyspace_throughput.metadata['url'], + template_url=self.get_cassandra_keyspace_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_cassandra_keyspace_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default"} # type: ignore - + get_cassandra_keyspace_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default"} # type: ignore async def _update_cassandra_keyspace_throughput_initial( self, resource_group_name: str, account_name: str, keyspace_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_cassandra_keyspace_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_cassandra_keyspace_throughput_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_cassandra_keyspace_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_cassandra_keyspace_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -545,15 +703,97 @@ async def _update_cassandra_keyspace_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_cassandra_keyspace_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default"} # type: ignore + _update_cassandra_keyspace_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default"} # type: ignore + @overload + async def begin_update_cassandra_keyspace_throughput( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Cassandra Keyspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Cassandra Keyspace. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_cassandra_keyspace_throughput( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Cassandra Keyspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Cassandra Keyspace. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_update_cassandra_keyspace_throughput( @@ -561,21 +801,25 @@ async def begin_update_cassandra_keyspace_throughput( resource_group_name: str, account_name: str, keyspace_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB Cassandra Keyspace. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current Cassandra Keyspace. + current Cassandra Keyspace. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -588,84 +832,89 @@ async def begin_update_cassandra_keyspace_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_cassandra_keyspace_throughput_initial( + raw_result = await self._update_cassandra_keyspace_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_cassandra_keyspace_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default"} # type: ignore + begin_update_cassandra_keyspace_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default"} # type: ignore async def _migrate_cassandra_keyspace_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_cassandra_keyspace_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_cassandra_keyspace_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_cassandra_keyspace_to_autoscale_initial.metadata['url'], + template_url=self._migrate_cassandra_keyspace_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -674,31 +923,27 @@ async def _migrate_cassandra_keyspace_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_cassandra_keyspace_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_cassandra_keyspace_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace_async async def begin_migrate_cassandra_keyspace_to_autoscale( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -712,81 +957,86 @@ async def begin_migrate_cassandra_keyspace_to_autoscale( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_cassandra_keyspace_to_autoscale_initial( + raw_result = await self._migrate_cassandra_keyspace_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_cassandra_keyspace_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_cassandra_keyspace_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale"} # type: ignore async def _migrate_cassandra_keyspace_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_cassandra_keyspace_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_cassandra_keyspace_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_cassandra_keyspace_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_cassandra_keyspace_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -795,31 +1045,27 @@ async def _migrate_cassandra_keyspace_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_cassandra_keyspace_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_cassandra_keyspace_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace_async async def begin_migrate_cassandra_keyspace_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -833,105 +1079,110 @@ async def begin_migrate_cassandra_keyspace_to_manual_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_cassandra_keyspace_to_manual_throughput_initial( + raw_result = await self._migrate_cassandra_keyspace_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_cassandra_keyspace_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_cassandra_keyspace_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def list_cassandra_tables( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.CassandraTableListResult"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> AsyncIterable["_models.CassandraTableGetResults"]: """Lists the Cassandra table under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either CassandraTableListResult or the result of + :return: An iterator like instance of either CassandraTableGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.CassandraTableListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.CassandraTableGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraTableListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraTableListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_cassandra_tables_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_cassandra_tables.metadata['url'], + template_url=self.list_cassandra_tables.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_cassandra_tables_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -945,10 +1196,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -958,77 +1207,76 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_cassandra_tables.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables"} # type: ignore + list_cassandra_tables.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables"} # type: ignore @distributed_trace_async async def get_cassandra_table( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any - ) -> "_models.CassandraTableGetResults": + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any + ) -> _models.CassandraTableGetResults: """Gets the Cassandra table under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: CassandraTableGetResults, or the result of cls(response) + :return: CassandraTableGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.CassandraTableGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraTableGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraTableGetResults] - request = build_get_cassandra_table_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_cassandra_table.metadata['url'], + template_url=self.get_cassandra_table.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('CassandraTableGetResults', pipeline_response) + deserialized = self._deserialize("CassandraTableGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_cassandra_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore - + get_cassandra_table.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore async def _create_update_cassandra_table_initial( self, @@ -1036,39 +1284,55 @@ async def _create_update_cassandra_table_initial( account_name: str, keyspace_name: str, table_name: str, - create_update_cassandra_table_parameters: "_models.CassandraTableCreateUpdateParameters", + create_update_cassandra_table_parameters: Union[_models.CassandraTableCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.CassandraTableGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CassandraTableGetResults"]] + ) -> Optional[_models.CassandraTableGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_cassandra_table_parameters, 'CassandraTableCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.CassandraTableGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_cassandra_table_parameters, (IO, bytes)): + _content = create_update_cassandra_table_parameters + else: + _json = self._serialize.body( + create_update_cassandra_table_parameters, "CassandraTableCreateUpdateParameters" + ) - request = build_create_update_cassandra_table_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_cassandra_table_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_cassandra_table_initial.metadata['url'], + content=_content, + template_url=self._create_update_cassandra_table_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1077,15 +1341,103 @@ async def _create_update_cassandra_table_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('CassandraTableGetResults', pipeline_response) + deserialized = self._deserialize("CassandraTableGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_cassandra_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore + _create_update_cassandra_table_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore + @overload + async def begin_create_update_cassandra_table( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + table_name: str, + create_update_cassandra_table_parameters: _models.CassandraTableCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CassandraTableGetResults]: + """Create or update an Azure Cosmos DB Cassandra Table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param create_update_cassandra_table_parameters: The parameters to provide for the current + Cassandra Table. Required. + :type create_update_cassandra_table_parameters: + ~azure.mgmt.cosmosdb.models.CassandraTableCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CassandraTableGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CassandraTableGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_cassandra_table( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + table_name: str, + create_update_cassandra_table_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CassandraTableGetResults]: + """Create or update an Azure Cosmos DB Cassandra Table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param create_update_cassandra_table_parameters: The parameters to provide for the current + Cassandra Table. Required. + :type create_update_cassandra_table_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CassandraTableGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CassandraTableGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_cassandra_table( @@ -1094,23 +1446,27 @@ async def begin_create_update_cassandra_table( account_name: str, keyspace_name: str, table_name: str, - create_update_cassandra_table_parameters: "_models.CassandraTableCreateUpdateParameters", + create_update_cassandra_table_parameters: Union[_models.CassandraTableCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.CassandraTableGetResults"]: + ) -> AsyncLROPoller[_models.CassandraTableGetResults]: """Create or update an Azure Cosmos DB Cassandra Table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :param create_update_cassandra_table_parameters: The parameters to provide for the current - Cassandra Table. + Cassandra Table. Is either a model type or a IO type. Required. :type create_update_cassandra_table_parameters: - ~azure.mgmt.cosmosdb.models.CassandraTableCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.CassandraTableCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1123,19 +1479,19 @@ async def begin_create_update_cassandra_table( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CassandraTableGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraTableGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraTableGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_cassandra_table_initial( + raw_result = await self._create_update_cassandra_table_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, @@ -1143,67 +1499,71 @@ async def begin_create_update_cassandra_table( create_update_cassandra_table_parameters=create_update_cassandra_table_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('CassandraTableGetResults', pipeline_response) + deserialized = self._deserialize("CassandraTableGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_cassandra_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore + begin_create_update_cassandra_table.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore async def _delete_cassandra_table_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_cassandra_table_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_cassandra_table_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_cassandra_table_initial.metadata['url'], + template_url=self._delete_cassandra_table_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1213,27 +1573,22 @@ async def _delete_cassandra_table_initial( # pylint: disable=inconsistent-retur if cls: return cls(pipeline_response, None, {}) - _delete_cassandra_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore - + _delete_cassandra_table_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore @distributed_trace_async - async def begin_delete_cassandra_table( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any + async def begin_delete_cassandra_table( + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB Cassandra table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1245,113 +1600,118 @@ async def begin_delete_cassandra_table( # pylint: disable=inconsistent-return-s Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_cassandra_table_initial( + raw_result = await self._delete_cassandra_table_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_cassandra_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore + begin_delete_cassandra_table.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore @distributed_trace_async async def get_cassandra_table_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_cassandra_table_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_cassandra_table_throughput.metadata['url'], + template_url=self.get_cassandra_table_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_cassandra_table_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default"} # type: ignore - + get_cassandra_table_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default"} # type: ignore async def _update_cassandra_table_throughput_initial( self, @@ -1359,39 +1719,53 @@ async def _update_cassandra_table_throughput_initial( account_name: str, keyspace_name: str, table_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_cassandra_table_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_cassandra_table_throughput_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_cassandra_table_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_cassandra_table_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1400,15 +1774,103 @@ async def _update_cassandra_table_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_cassandra_table_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default"} # type: ignore + _update_cassandra_table_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default"} # type: ignore + @overload + async def begin_update_cassandra_table_throughput( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + table_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Cassandra table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Cassandra table. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_cassandra_table_throughput( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + table_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Cassandra table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Cassandra table. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_update_cassandra_table_throughput( @@ -1417,23 +1879,27 @@ async def begin_update_cassandra_table_throughput( account_name: str, keyspace_name: str, table_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB Cassandra table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current Cassandra table. + current Cassandra table. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1446,19 +1912,19 @@ async def begin_update_cassandra_table_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_cassandra_table_throughput_initial( + raw_result = await self._update_cassandra_table_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, @@ -1466,67 +1932,71 @@ async def begin_update_cassandra_table_throughput( update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_cassandra_table_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default"} # type: ignore + begin_update_cassandra_table_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default"} # type: ignore async def _migrate_cassandra_table_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_cassandra_table_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_cassandra_table_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_cassandra_table_to_autoscale_initial.metadata['url'], + template_url=self._migrate_cassandra_table_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1535,34 +2005,29 @@ async def _migrate_cassandra_table_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_cassandra_table_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_cassandra_table_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace_async async def begin_migrate_cassandra_table_to_autoscale( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1576,84 +2041,88 @@ async def begin_migrate_cassandra_table_to_autoscale( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_cassandra_table_to_autoscale_initial( + raw_result = await self._migrate_cassandra_table_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_cassandra_table_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_cassandra_table_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore async def _migrate_cassandra_table_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_cassandra_table_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_cassandra_table_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_cassandra_table_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_cassandra_table_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1662,34 +2131,29 @@ async def _migrate_cassandra_table_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_cassandra_table_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_cassandra_table_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace_async async def begin_migrate_cassandra_table_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1703,106 +2167,111 @@ async def begin_migrate_cassandra_table_to_manual_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_cassandra_table_to_manual_throughput_initial( + raw_result = await self._migrate_cassandra_table_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_cassandra_table_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_cassandra_table_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def list_cassandra_views( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.CassandraViewListResult"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> AsyncIterable["_models.CassandraViewGetResults"]: """Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either CassandraViewListResult or the result of + :return: An iterator like instance of either CassandraViewGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.CassandraViewListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraViewListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraViewListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_cassandra_views_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_cassandra_views.metadata['url'], + template_url=self.list_cassandra_views.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_cassandra_views_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1816,10 +2285,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1829,77 +2296,76 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_cassandra_views.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views"} # type: ignore + list_cassandra_views.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views"} # type: ignore @distributed_trace_async async def get_cassandra_view( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> "_models.CassandraViewGetResults": + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any + ) -> _models.CassandraViewGetResults: """Gets the Cassandra view under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: CassandraViewGetResults, or the result of cls(response) + :return: CassandraViewGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.CassandraViewGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraViewGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraViewGetResults] - request = build_get_cassandra_view_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_cassandra_view.metadata['url'], + template_url=self.get_cassandra_view.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('CassandraViewGetResults', pipeline_response) + deserialized = self._deserialize("CassandraViewGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_cassandra_view.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore - + get_cassandra_view.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore async def _create_update_cassandra_view_initial( self, @@ -1907,39 +2373,53 @@ async def _create_update_cassandra_view_initial( account_name: str, keyspace_name: str, view_name: str, - create_update_cassandra_view_parameters: "_models.CassandraViewCreateUpdateParameters", + create_update_cassandra_view_parameters: Union[_models.CassandraViewCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.CassandraViewGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CassandraViewGetResults"]] + ) -> Optional[_models.CassandraViewGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_cassandra_view_parameters, 'CassandraViewCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.CassandraViewGetResults]] - request = build_create_update_cassandra_view_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_cassandra_view_parameters, (IO, bytes)): + _content = create_update_cassandra_view_parameters + else: + _json = self._serialize.body(create_update_cassandra_view_parameters, "CassandraViewCreateUpdateParameters") + + request = build_create_update_cassandra_view_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_cassandra_view_initial.metadata['url'], + content=_content, + template_url=self._create_update_cassandra_view_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1948,15 +2428,101 @@ async def _create_update_cassandra_view_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('CassandraViewGetResults', pipeline_response) + deserialized = self._deserialize("CassandraViewGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_cassandra_view_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore + _create_update_cassandra_view_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore + + @overload + async def begin_create_update_cassandra_view( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + view_name: str, + create_update_cassandra_view_parameters: _models.CassandraViewCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CassandraViewGetResults]: + """Create or update an Azure Cosmos DB Cassandra View. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param view_name: Cosmos DB view name. Required. + :type view_name: str + :param create_update_cassandra_view_parameters: The parameters to provide for the current + Cassandra View. Required. + :type create_update_cassandra_view_parameters: + ~azure.mgmt.cosmosdb.models.CassandraViewCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CassandraViewGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_cassandra_view( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + view_name: str, + create_update_cassandra_view_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CassandraViewGetResults]: + """Create or update an Azure Cosmos DB Cassandra View. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param view_name: Cosmos DB view name. Required. + :type view_name: str + :param create_update_cassandra_view_parameters: The parameters to provide for the current + Cassandra View. Required. + :type create_update_cassandra_view_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CassandraViewGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_cassandra_view( @@ -1965,23 +2531,27 @@ async def begin_create_update_cassandra_view( account_name: str, keyspace_name: str, view_name: str, - create_update_cassandra_view_parameters: "_models.CassandraViewCreateUpdateParameters", + create_update_cassandra_view_parameters: Union[_models.CassandraViewCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.CassandraViewGetResults"]: + ) -> AsyncLROPoller[_models.CassandraViewGetResults]: """Create or update an Azure Cosmos DB Cassandra View. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :param create_update_cassandra_view_parameters: The parameters to provide for the current - Cassandra View. + Cassandra View. Is either a model type or a IO type. Required. :type create_update_cassandra_view_parameters: - ~azure.mgmt.cosmosdb.models.CassandraViewCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.CassandraViewCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1993,19 +2563,19 @@ async def begin_create_update_cassandra_view( :return: An instance of AsyncLROPoller that returns either CassandraViewGetResults or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraViewGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraViewGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_cassandra_view_initial( + raw_result = await self._create_update_cassandra_view_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, @@ -2013,67 +2583,71 @@ async def begin_create_update_cassandra_view( create_update_cassandra_view_parameters=create_update_cassandra_view_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('CassandraViewGetResults', pipeline_response) + deserialized = self._deserialize("CassandraViewGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_cassandra_view.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore + begin_create_update_cassandra_view.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore async def _delete_cassandra_view_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_cassandra_view_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_cassandra_view_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_cassandra_view_initial.metadata['url'], + template_url=self._delete_cassandra_view_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -2083,27 +2657,22 @@ async def _delete_cassandra_view_initial( # pylint: disable=inconsistent-return if cls: return cls(pipeline_response, None, {}) - _delete_cassandra_view_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore - + _delete_cassandra_view_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore @distributed_trace_async - async def begin_delete_cassandra_view( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any + async def begin_delete_cassandra_view( + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB Cassandra view. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2115,113 +2684,118 @@ async def begin_delete_cassandra_view( # pylint: disable=inconsistent-return-st Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_cassandra_view_initial( + raw_result = await self._delete_cassandra_view_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_cassandra_view.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore + begin_delete_cassandra_view.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore @distributed_trace_async async def get_cassandra_view_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_cassandra_view_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_cassandra_view_throughput.metadata['url'], + template_url=self.get_cassandra_view_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_cassandra_view_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"} # type: ignore - + get_cassandra_view_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"} # type: ignore async def _update_cassandra_view_throughput_initial( self, @@ -2229,39 +2803,53 @@ async def _update_cassandra_view_throughput_initial( account_name: str, keyspace_name: str, view_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_cassandra_view_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_cassandra_view_throughput_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_cassandra_view_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_cassandra_view_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2270,15 +2858,103 @@ async def _update_cassandra_view_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_cassandra_view_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"} # type: ignore + _update_cassandra_view_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"} # type: ignore + + @overload + async def begin_update_cassandra_view_throughput( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + view_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Cassandra view. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param view_name: Cosmos DB view name. Required. + :type view_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Cassandra view. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_cassandra_view_throughput( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + view_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Cassandra view. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param view_name: Cosmos DB view name. Required. + :type view_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Cassandra view. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_update_cassandra_view_throughput( @@ -2287,23 +2963,27 @@ async def begin_update_cassandra_view_throughput( account_name: str, keyspace_name: str, view_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB Cassandra view. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current Cassandra view. + current Cassandra view. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -2316,19 +2996,19 @@ async def begin_update_cassandra_view_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_cassandra_view_throughput_initial( + raw_result = await self._update_cassandra_view_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, @@ -2336,67 +3016,71 @@ async def begin_update_cassandra_view_throughput( update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_cassandra_view_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"} # type: ignore + begin_update_cassandra_view_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"} # type: ignore async def _migrate_cassandra_view_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_cassandra_view_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_cassandra_view_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_cassandra_view_to_autoscale_initial.metadata['url'], + template_url=self._migrate_cassandra_view_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2405,34 +3089,29 @@ async def _migrate_cassandra_view_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_cassandra_view_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_cassandra_view_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace_async async def begin_migrate_cassandra_view_to_autoscale( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2446,84 +3125,88 @@ async def begin_migrate_cassandra_view_to_autoscale( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_cassandra_view_to_autoscale_initial( + raw_result = await self._migrate_cassandra_view_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_cassandra_view_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_cassandra_view_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale"} # type: ignore async def _migrate_cassandra_view_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_cassandra_view_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_cassandra_view_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_cassandra_view_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_cassandra_view_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2532,34 +3215,29 @@ async def _migrate_cassandra_view_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_cassandra_view_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_cassandra_view_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace_async async def begin_migrate_cassandra_view_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2573,46 +3251,49 @@ async def begin_migrate_cassandra_view_to_manual_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_cassandra_view_to_manual_throughput_initial( + raw_result = await self._migrate_cassandra_view_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_cassandra_view_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_cassandra_view_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_operations.py index be651514eff..3310dc77f42 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_operations.py @@ -7,42 +7,54 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request -from ...operations._collection_operations import build_list_metric_definitions_request, build_list_metrics_request, build_list_usages_request -T = TypeVar('T') +from ...operations._collection_operations import ( + build_list_metric_definitions_request, + build_list_metrics_request, + build_list_usages_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class CollectionOperations: - """CollectionOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class CollectionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`collection` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -53,64 +65,68 @@ def list_metrics( collection_rid: str, filter: str, **kwargs: Any - ) -> AsyncIterable["_models.MetricListResult"]: + ) -> AsyncIterable["_models.Metric"]: """Retrieves the metrics determined by the given filter for the given database account and collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Metric or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.Metric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, collection_rid=collection_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -124,10 +140,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -137,11 +151,9 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metrics"} # type: ignore @distributed_trace def list_usages( @@ -152,63 +164,67 @@ def list_usages( collection_rid: str, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.UsagesResult"]: + ) -> AsyncIterable["_models.Usage"]: """Retrieves the usages (most recent storage data) for the given collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :param filter: An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either UsagesResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.UsagesResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Usage or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.UsagesResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_usages_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, collection_rid=collection_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_usages.metadata['url'], + api_version=api_version, + template_url=self.list_usages.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_usages_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -222,10 +238,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -235,73 +249,69 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/usages"} # type: ignore + list_usages.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/usages"} # type: ignore @distributed_trace def list_metric_definitions( - self, - resource_group_name: str, - account_name: str, - database_rid: str, - collection_rid: str, - **kwargs: Any - ) -> AsyncIterable["_models.MetricDefinitionsListResult"]: + self, resource_group_name: str, account_name: str, database_rid: str, collection_rid: str, **kwargs: Any + ) -> AsyncIterable["_models.MetricDefinition"]: """Retrieves metric definitions for the given collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricDefinitionsListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MetricDefinitionsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either MetricDefinition or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MetricDefinition] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricDefinitionsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricDefinitionsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metric_definitions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, collection_rid=collection_rid, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_metric_definitions.metadata['url'], + template_url=self.list_metric_definitions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metric_definitions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -315,10 +325,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -328,8 +336,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metricDefinitions"} # type: ignore + list_metric_definitions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metricDefinitions"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_partition_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_partition_operations.py index 4565f338b7a..232379b2a8a 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_partition_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_partition_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._collection_partition_operations import build_list_metrics_request, build_list_usages_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class CollectionPartitionOperations: - """CollectionPartitionOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class CollectionPartitionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`collection_partition` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -53,66 +61,68 @@ def list_metrics( collection_rid: str, filter: str, **kwargs: Any - ) -> AsyncIterable["_models.PartitionMetricListResult"]: + ) -> AsyncIterable["_models.PartitionMetric"]: """Retrieves the metrics determined by the given filter for the given collection, split by partition. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartitionMetricListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PartitionMetric or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PartitionMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, collection_rid=collection_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -126,10 +136,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -139,11 +147,9 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics"} # type: ignore @distributed_trace def list_usages( @@ -154,65 +160,67 @@ def list_usages( collection_rid: str, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.PartitionUsagesResult"]: + ) -> AsyncIterable["_models.PartitionUsage"]: """Retrieves the usages (most recent storage data) for the given collection, split by partition. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :param filter: An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartitionUsagesResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PartitionUsagesResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PartitionUsage or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PartitionUsage] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PartitionUsagesResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionUsagesResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_usages_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, collection_rid=collection_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_usages.metadata['url'], + api_version=api_version, + template_url=self.list_usages.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_usages_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -226,10 +234,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -239,8 +245,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/usages"} # type: ignore + list_usages.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/usages"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_partition_region_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_partition_region_operations.py index c305bed7859..28dd8be3340 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_partition_region_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_partition_region_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._collection_partition_region_operations import build_list_metrics_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class CollectionPartitionRegionOperations: - """CollectionPartitionRegionOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class CollectionPartitionRegionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`collection_partition_region` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -54,70 +62,71 @@ def list_metrics( collection_rid: str, filter: str, **kwargs: Any - ) -> AsyncIterable["_models.PartitionMetricListResult"]: + ) -> AsyncIterable["_models.PartitionMetric"]: """Retrieves the metrics determined by the given filter for the given collection and region, split by partition. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param region: Cosmos DB region, with spaces between words and each word capitalized. + :param region: Cosmos DB region, with spaces between words and each word capitalized. Required. :type region: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartitionMetricListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PartitionMetric or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PartitionMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, region=region, database_rid=database_rid, collection_rid=collection_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - region=region, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -131,10 +140,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -144,8 +151,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_region_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_region_operations.py index 701766c18ef..3dff52bd133 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_region_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_collection_region_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._collection_region_operations import build_list_metrics_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class CollectionRegionOperations: - """CollectionRegionOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class CollectionRegionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`collection_region` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -54,68 +62,71 @@ def list_metrics( collection_rid: str, filter: str, **kwargs: Any - ) -> AsyncIterable["_models.MetricListResult"]: + ) -> AsyncIterable["_models.Metric"]: """Retrieves the metrics determined by the given filter for the given database account, collection and region. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param region: Cosmos DB region, with spaces between words and each word capitalized. + :param region: Cosmos DB region, with spaces between words and each word capitalized. Required. :type region: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Metric or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.Metric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, region=region, database_rid=database_rid, collection_rid=collection_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - region=region, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -129,10 +140,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -142,8 +151,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_data_transfer_jobs_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_data_transfer_jobs_operations.py index d34d5e05586..3172df6e043 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_data_transfer_jobs_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_data_transfer_jobs_operations.py @@ -6,413 +6,519 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request -from ...operations._data_transfer_jobs_operations import build_cancel_request, build_create_request, build_get_request, build_list_by_database_account_request, build_pause_request, build_resume_request -T = TypeVar('T') +from ...operations._data_transfer_jobs_operations import ( + build_cancel_request, + build_create_request, + build_get_request, + build_list_by_database_account_request, + build_pause_request, + build_resume_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DataTransferJobsOperations: - """DataTransferJobsOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class DataTransferJobsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`data_transfer_jobs` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace_async + @overload async def create( self, resource_group_name: str, account_name: str, job_name: str, - job_create_parameters: "_models.CreateJobRequest", + job_create_parameters: _models.CreateJobRequest, + *, + content_type: str = "application/json", **kwargs: Any - ) -> "_models.DataTransferJobGetResults": + ) -> _models.DataTransferJobGetResults: """Creates a Data Transfer Job. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param job_name: Name of the Data Transfer Job. + :param job_name: Name of the Data Transfer Job. Required. :type job_name: str - :param job_create_parameters: + :param job_create_parameters: Required. :type job_create_parameters: ~azure.mgmt.cosmosdb.models.CreateJobRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DataTransferJobGetResults, or the result of cls(response) + :return: DataTransferJobGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create( + self, + resource_group_name: str, + account_name: str, + job_name: str, + job_create_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataTransferJobGetResults: + """Creates a Data Transfer Job. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param job_name: Name of the Data Transfer Job. Required. + :type job_name: str + :param job_create_parameters: Required. + :type job_create_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataTransferJobGetResults or the result of cls(response) + :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create( + self, + resource_group_name: str, + account_name: str, + job_name: str, + job_create_parameters: Union[_models.CreateJobRequest, IO], + **kwargs: Any + ) -> _models.DataTransferJobGetResults: + """Creates a Data Transfer Job. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param job_name: Name of the Data Transfer Job. Required. + :type job_name: str + :param job_create_parameters: Is either a model type or a IO type. Required. + :type job_create_parameters: ~azure.mgmt.cosmosdb.models.CreateJobRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataTransferJobGetResults or the result of cls(response) + :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataTransferJobGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(job_create_parameters, 'CreateJobRequest') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataTransferJobGetResults] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(job_create_parameters, (IO, bytes)): + _content = job_create_parameters + else: + _json = self._serialize.body(job_create_parameters, "CreateJobRequest") request = build_create_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, job_name=job_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self.create.metadata['url'], + content=_content, + template_url=self.create.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DataTransferJobGetResults', pipeline_response) + deserialized = self._deserialize("DataTransferJobGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}"} # type: ignore - + create.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}"} # type: ignore @distributed_trace_async async def get( - self, - resource_group_name: str, - account_name: str, - job_name: str, - **kwargs: Any - ) -> "_models.DataTransferJobGetResults": + self, resource_group_name: str, account_name: str, job_name: str, **kwargs: Any + ) -> _models.DataTransferJobGetResults: """Get a Data Transfer Job. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param job_name: Name of the Data Transfer Job. + :param job_name: Name of the Data Transfer Job. Required. :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DataTransferJobGetResults, or the result of cls(response) + :return: DataTransferJobGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataTransferJobGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataTransferJobGetResults] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, job_name=job_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DataTransferJobGetResults', pipeline_response) + deserialized = self._deserialize("DataTransferJobGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}"} # type: ignore @distributed_trace_async async def pause( - self, - resource_group_name: str, - account_name: str, - job_name: str, - **kwargs: Any - ) -> "_models.DataTransferJobGetResults": + self, resource_group_name: str, account_name: str, job_name: str, **kwargs: Any + ) -> _models.DataTransferJobGetResults: """Pause a Data Transfer Job. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param job_name: Name of the Data Transfer Job. + :param job_name: Name of the Data Transfer Job. Required. :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DataTransferJobGetResults, or the result of cls(response) + :return: DataTransferJobGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataTransferJobGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataTransferJobGetResults] - request = build_pause_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, job_name=job_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.pause.metadata['url'], + template_url=self.pause.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DataTransferJobGetResults', pipeline_response) + deserialized = self._deserialize("DataTransferJobGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - pause.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/pause"} # type: ignore - + pause.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/pause"} # type: ignore @distributed_trace_async async def resume( - self, - resource_group_name: str, - account_name: str, - job_name: str, - **kwargs: Any - ) -> "_models.DataTransferJobGetResults": + self, resource_group_name: str, account_name: str, job_name: str, **kwargs: Any + ) -> _models.DataTransferJobGetResults: """Resumes a Data Transfer Job. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param job_name: Name of the Data Transfer Job. + :param job_name: Name of the Data Transfer Job. Required. :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DataTransferJobGetResults, or the result of cls(response) + :return: DataTransferJobGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataTransferJobGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataTransferJobGetResults] - request = build_resume_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, job_name=job_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.resume.metadata['url'], + template_url=self.resume.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DataTransferJobGetResults', pipeline_response) + deserialized = self._deserialize("DataTransferJobGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/resume"} # type: ignore - + resume.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/resume"} # type: ignore @distributed_trace_async async def cancel( - self, - resource_group_name: str, - account_name: str, - job_name: str, - **kwargs: Any - ) -> "_models.DataTransferJobGetResults": + self, resource_group_name: str, account_name: str, job_name: str, **kwargs: Any + ) -> _models.DataTransferJobGetResults: """Cancels a Data Transfer Job. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param job_name: Name of the Data Transfer Job. + :param job_name: Name of the Data Transfer Job. Required. :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DataTransferJobGetResults, or the result of cls(response) + :return: DataTransferJobGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataTransferJobGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataTransferJobGetResults] - request = build_cancel_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, job_name=job_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.cancel.metadata['url'], + template_url=self.cancel.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DataTransferJobGetResults', pipeline_response) + deserialized = self._deserialize("DataTransferJobGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - cancel.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/cancel"} # type: ignore - + cancel.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/cancel"} # type: ignore @distributed_trace def list_by_database_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.DataTransferJobFeedResults"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.DataTransferJobGetResults"]: """Get a list of Data Transfer jobs. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either DataTransferJobFeedResults or the result of + :return: An iterator like instance of either DataTransferJobGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.DataTransferJobFeedResults] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.DataTransferJobGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataTransferJobFeedResults] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataTransferJobFeedResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_database_account.metadata['url'], + template_url=self.list_by_database_account.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -426,10 +532,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -439,8 +543,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_database_account.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs"} # type: ignore + list_by_database_account.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_database_account_region_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_database_account_region_operations.py index 76da679520d..ba89e26df4c 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_database_account_region_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_database_account_region_operations.py @@ -7,104 +7,112 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._database_account_region_operations import build_list_metrics_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DatabaseAccountRegionOperations: - """DatabaseAccountRegionOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class DatabaseAccountRegionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`database_account_region` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( - self, - resource_group_name: str, - account_name: str, - region: str, - filter: str, - **kwargs: Any - ) -> AsyncIterable["_models.MetricListResult"]: + self, resource_group_name: str, account_name: str, region: str, filter: str, **kwargs: Any + ) -> AsyncIterable["_models.Metric"]: """Retrieves the metrics determined by the given filter for the given database account and region. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param region: Cosmos DB region, with spaces between words and each word capitalized. + :param region: Cosmos DB region, with spaces between words and each word capitalized. Required. :type region: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Metric or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.Metric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, region=region, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - region=region, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -118,10 +126,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -131,8 +137,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_database_accounts_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_database_accounts_operations.py index ab5002e2638..4d3f6fa7272 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_database_accounts_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_database_accounts_operations.py @@ -6,172 +6,294 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._vendor import _convert_request -from ...operations._database_accounts_operations import build_check_name_exists_request, build_create_or_update_request_initial, build_delete_request_initial, build_failover_priority_change_request_initial, build_get_read_only_keys_request, build_get_request, build_list_by_resource_group_request, build_list_connection_strings_request, build_list_keys_request, build_list_metric_definitions_request, build_list_metrics_request, build_list_read_only_keys_request, build_list_request, build_list_usages_request, build_offline_region_request_initial, build_online_region_request_initial, build_regenerate_key_request_initial, build_update_request_initial -T = TypeVar('T') +from ...operations._database_accounts_operations import ( + build_check_name_exists_request, + build_create_or_update_request, + build_delete_request, + build_failover_priority_change_request, + build_get_read_only_keys_request, + build_get_request, + build_list_by_resource_group_request, + build_list_connection_strings_request, + build_list_keys_request, + build_list_metric_definitions_request, + build_list_metrics_request, + build_list_read_only_keys_request, + build_list_request, + build_list_usages_request, + build_offline_region_request, + build_online_region_request, + build_regenerate_key_request, + build_update_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DatabaseAccountsOperations: # pylint: disable=too-many-public-methods - """DatabaseAccountsOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class DatabaseAccountsOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`database_accounts` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.DatabaseAccountGetResults": + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.DatabaseAccountGetResults: """Retrieves the properties of an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DatabaseAccountGetResults, or the result of cls(response) + :return: DatabaseAccountGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountGetResults] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountGetResults', pipeline_response) + deserialized = self._deserialize("DatabaseAccountGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore async def _update_initial( self, resource_group_name: str, account_name: str, - update_parameters: "_models.DatabaseAccountUpdateParameters", + update_parameters: Union[_models.DatabaseAccountUpdateParameters, IO], **kwargs: Any - ) -> "_models.DatabaseAccountGetResults": - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountGetResults"] + ) -> _models.DatabaseAccountGetResults: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_parameters, 'DatabaseAccountUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountGetResults] - request = build_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_parameters, (IO, bytes)): + _content = update_parameters + else: + _json = self._serialize.body(update_parameters, "DatabaseAccountUpdateParameters") + + request = build_update_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_initial.metadata['url'], + content=_content, + template_url=self._update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountGetResults', pipeline_response) + deserialized = self._deserialize("DatabaseAccountGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore + _update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore + @overload + async def begin_update( + self, + resource_group_name: str, + account_name: str, + update_parameters: _models.DatabaseAccountUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DatabaseAccountGetResults]: + """Updates the properties of an existing Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param update_parameters: The parameters to provide for the current database account. Required. + :type update_parameters: ~azure.mgmt.cosmosdb.models.DatabaseAccountUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DatabaseAccountGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + account_name: str, + update_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DatabaseAccountGetResults]: + """Updates the properties of an existing Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param update_parameters: The parameters to provide for the current database account. Required. + :type update_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DatabaseAccountGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_update( self, resource_group_name: str, account_name: str, - update_parameters: "_models.DatabaseAccountUpdateParameters", + update_parameters: Union[_models.DatabaseAccountUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.DatabaseAccountGetResults"]: + ) -> AsyncLROPoller[_models.DatabaseAccountGetResults]: """Updates the properties of an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param update_parameters: The parameters to provide for the current database account. - :type update_parameters: ~azure.mgmt.cosmosdb.models.DatabaseAccountUpdateParameters + :param update_parameters: The parameters to provide for the current database account. Is either + a model type or a IO type. Required. + :type update_parameters: ~azure.mgmt.cosmosdb.models.DatabaseAccountUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -184,120 +306,143 @@ async def begin_update( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_initial( + raw_result = await self._update_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, update_parameters=update_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('DatabaseAccountGetResults', pipeline_response) + deserialized = self._deserialize("DatabaseAccountGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore + begin_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, account_name: str, - create_update_parameters: "_models.DatabaseAccountCreateUpdateParameters", + create_update_parameters: Union[_models.DatabaseAccountCreateUpdateParameters, IO], **kwargs: Any - ) -> "_models.DatabaseAccountGetResults": - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountGetResults"] + ) -> _models.DatabaseAccountGetResults: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountGetResults] - request = build_create_or_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_parameters, (IO, bytes)): + _content = create_update_parameters + else: + _json = self._serialize.body(create_update_parameters, "DatabaseAccountCreateUpdateParameters") + + request = build_create_or_update_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_or_update_initial.metadata['url'], + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountGetResults', pipeline_response) + deserialized = self._deserialize("DatabaseAccountGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore - - @distributed_trace_async + @overload async def begin_create_or_update( self, resource_group_name: str, account_name: str, - create_update_parameters: "_models.DatabaseAccountCreateUpdateParameters", + create_update_parameters: _models.DatabaseAccountCreateUpdateParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller["_models.DatabaseAccountGetResults"]: + ) -> AsyncLROPoller[_models.DatabaseAccountGetResults]: """Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param create_update_parameters: The parameters to provide for the current database account. + Required. :type create_update_parameters: ~azure.mgmt.cosmosdb.models.DatabaseAccountCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -310,81 +455,164 @@ async def begin_create_or_update( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + create_update_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DatabaseAccountGetResults]: + """Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when + performing updates on an account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_parameters: The parameters to provide for the current database account. + Required. + :type create_update_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DatabaseAccountGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + create_update_parameters: Union[_models.DatabaseAccountCreateUpdateParameters, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.DatabaseAccountGetResults]: + """Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when + performing updates on an account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_parameters: The parameters to provide for the current database account. Is + either a model type or a IO type. Required. + :type create_update_parameters: + ~azure.mgmt.cosmosdb.models.DatabaseAccountCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DatabaseAccountGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._create_or_update_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, create_update_parameters=create_update_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('DatabaseAccountGetResults', pipeline_response) + deserialized = self._deserialize("DatabaseAccountGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore async def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -394,21 +622,16 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: + async def begin_delete(self, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -420,80 +643,98 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._delete_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore async def _failover_priority_change_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, account_name: str, - failover_parameters: "_models.FailoverPolicies", + failover_parameters: Union[_models.FailoverPolicies, IO], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(failover_parameters, 'FailoverPolicies') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_failover_priority_change_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(failover_parameters, (IO, bytes)): + _content = failover_parameters + else: + _json = self._serialize.body(failover_parameters, "FailoverPolicies") + + request = build_failover_priority_change_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._failover_priority_change_initial.metadata['url'], + content=_content, + template_url=self._failover_priority_change_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -503,15 +744,90 @@ async def _failover_priority_change_initial( # pylint: disable=inconsistent-ret if cls: return cls(pipeline_response, None, {}) - _failover_priority_change_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange"} # type: ignore + _failover_priority_change_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange"} # type: ignore + @overload + async def begin_failover_priority_change( + self, + resource_group_name: str, + account_name: str, + failover_parameters: _models.FailoverPolicies, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Changes the failover priority for the Azure Cosmos DB database account. A failover priority of + 0 indicates a write region. The maximum value for a failover priority = (total number of + regions - 1). Failover priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param failover_parameters: The new failover policies for the database account. Required. + :type failover_parameters: ~azure.mgmt.cosmosdb.models.FailoverPolicies + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_failover_priority_change( + self, + resource_group_name: str, + account_name: str, + failover_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Changes the failover priority for the Azure Cosmos DB database account. A failover priority of + 0 indicates a write region. The maximum value for a failover priority = (total number of + regions - 1). Failover priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param failover_parameters: The new failover policies for the database account. Required. + :type failover_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async - async def begin_failover_priority_change( # pylint: disable=inconsistent-return-statements + async def begin_failover_priority_change( self, resource_group_name: str, account_name: str, - failover_parameters: "_models.FailoverPolicies", + failover_parameters: Union[_models.FailoverPolicies, IO], **kwargs: Any ) -> AsyncLROPoller[None]: """Changes the failover priority for the Azure Cosmos DB database account. A failover priority of @@ -520,11 +836,16 @@ async def begin_failover_priority_change( # pylint: disable=inconsistent-return database account exists. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param failover_parameters: The new failover policies for the database account. - :type failover_parameters: ~azure.mgmt.cosmosdb.models.FailoverPolicies + :param failover_parameters: The new failover policies for the database account. Is either a + model type or a IO type. Required. + :type failover_parameters: ~azure.mgmt.cosmosdb.models.FailoverPolicies or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -535,89 +856,98 @@ async def begin_failover_priority_change( # pylint: disable=inconsistent-return Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._failover_priority_change_initial( + raw_result = await self._failover_priority_change_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, failover_parameters=failover_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_failover_priority_change.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange"} # type: ignore + begin_failover_priority_change.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange"} # type: ignore @distributed_trace - def list( - self, - **kwargs: Any - ) -> AsyncIterable["_models.DatabaseAccountsListResult"]: + def list(self, **kwargs: Any) -> AsyncIterable["_models.DatabaseAccountGetResults"]: """Lists all the Azure Cosmos DB database accounts available under the subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either DatabaseAccountsListResult or the result of + :return: An iterator like instance of either DatabaseAccountGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.DatabaseAccountsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -631,10 +961,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -644,58 +972,62 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts"} # type: ignore @distributed_trace def list_by_resource_group( - self, - resource_group_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.DatabaseAccountsListResult"]: + self, resource_group_name: str, **kwargs: Any + ) -> AsyncIterable["_models.DatabaseAccountGetResults"]: """Lists all the Azure Cosmos DB database accounts available under the given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either DatabaseAccountsListResult or the result of + :return: An iterator like instance of either DatabaseAccountGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.DatabaseAccountsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata['url'], + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -709,10 +1041,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -722,191 +1052,216 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts"} # type: ignore + list_by_resource_group.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts"} # type: ignore @distributed_trace_async async def list_keys( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.DatabaseAccountListKeysResult": + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.DatabaseAccountListKeysResult: """Lists the access keys for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DatabaseAccountListKeysResult, or the result of cls(response) + :return: DatabaseAccountListKeysResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DatabaseAccountListKeysResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountListKeysResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountListKeysResult] - request = build_list_keys_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_keys.metadata['url'], + template_url=self.list_keys.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountListKeysResult', pipeline_response) + deserialized = self._deserialize("DatabaseAccountListKeysResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys"} # type: ignore - + list_keys.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys"} # type: ignore @distributed_trace_async async def list_connection_strings( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.DatabaseAccountListConnectionStringsResult": + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.DatabaseAccountListConnectionStringsResult: """Lists the connection strings for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DatabaseAccountListConnectionStringsResult, or the result of cls(response) + :return: DatabaseAccountListConnectionStringsResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DatabaseAccountListConnectionStringsResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountListConnectionStringsResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountListConnectionStringsResult] - request = build_list_connection_strings_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_connection_strings.metadata['url'], + template_url=self.list_connection_strings.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountListConnectionStringsResult', pipeline_response) + deserialized = self._deserialize("DatabaseAccountListConnectionStringsResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings"} # type: ignore - + list_connection_strings.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings"} # type: ignore async def _offline_region_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, account_name: str, - region_parameter_for_offline: "_models.RegionForOnlineOffline", + region_parameter_for_offline: Union[_models.RegionForOnlineOffline, IO], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(region_parameter_for_offline, 'RegionForOnlineOffline') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_offline_region_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(region_parameter_for_offline, (IO, bytes)): + _content = region_parameter_for_offline + else: + _json = self._serialize.body(region_parameter_for_offline, "RegionForOnlineOffline") + + request = build_offline_region_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._offline_region_initial.metadata['url'], + content=_content, + template_url=self._offline_region_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _offline_region_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion"} # type: ignore - + _offline_region_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion"} # type: ignore - @distributed_trace_async - async def begin_offline_region( # pylint: disable=inconsistent-return-statements + @overload + async def begin_offline_region( self, resource_group_name: str, account_name: str, - region_parameter_for_offline: "_models.RegionForOnlineOffline", + region_parameter_for_offline: _models.RegionForOnlineOffline, + *, + content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: """Offline the specified region for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param region_parameter_for_offline: Cosmos DB region to offline for the database account. + Required. :type region_parameter_for_offline: ~azure.mgmt.cosmosdb.models.RegionForOnlineOffline + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -917,111 +1272,206 @@ async def begin_offline_region( # pylint: disable=inconsistent-return-statement Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + async def begin_offline_region( + self, + resource_group_name: str, + account_name: str, + region_parameter_for_offline: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Offline the specified region for the specified Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param region_parameter_for_offline: Cosmos DB region to offline for the database account. + Required. + :type region_parameter_for_offline: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_offline_region( + self, + resource_group_name: str, + account_name: str, + region_parameter_for_offline: Union[_models.RegionForOnlineOffline, IO], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Offline the specified region for the specified Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param region_parameter_for_offline: Cosmos DB region to offline for the database account. Is + either a model type or a IO type. Required. + :type region_parameter_for_offline: ~azure.mgmt.cosmosdb.models.RegionForOnlineOffline or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._offline_region_initial( + raw_result = await self._offline_region_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, region_parameter_for_offline=region_parameter_for_offline, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_offline_region.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion"} # type: ignore + begin_offline_region.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion"} # type: ignore async def _online_region_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, account_name: str, - region_parameter_for_online: "_models.RegionForOnlineOffline", + region_parameter_for_online: Union[_models.RegionForOnlineOffline, IO], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(region_parameter_for_online, 'RegionForOnlineOffline') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_online_region_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(region_parameter_for_online, (IO, bytes)): + _content = region_parameter_for_online + else: + _json = self._serialize.body(region_parameter_for_online, "RegionForOnlineOffline") + + request = build_online_region_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._online_region_initial.metadata['url'], + content=_content, + template_url=self._online_region_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _online_region_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion"} # type: ignore - + _online_region_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion"} # type: ignore - @distributed_trace_async - async def begin_online_region( # pylint: disable=inconsistent-return-statements + @overload + async def begin_online_region( self, resource_group_name: str, account_name: str, - region_parameter_for_online: "_models.RegionForOnlineOffline", + region_parameter_for_online: _models.RegionForOnlineOffline, + *, + content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: """Online the specified region for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param region_parameter_for_online: Cosmos DB region to online for the database account. + Required. :type region_parameter_for_online: ~azure.mgmt.cosmosdb.models.RegionForOnlineOffline + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1032,199 +1482,293 @@ async def begin_online_region( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + async def begin_online_region( + self, + resource_group_name: str, + account_name: str, + region_parameter_for_online: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Online the specified region for the specified Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param region_parameter_for_online: Cosmos DB region to online for the database account. + Required. + :type region_parameter_for_online: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_online_region( + self, + resource_group_name: str, + account_name: str, + region_parameter_for_online: Union[_models.RegionForOnlineOffline, IO], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Online the specified region for the specified Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param region_parameter_for_online: Cosmos DB region to online for the database account. Is + either a model type or a IO type. Required. + :type region_parameter_for_online: ~azure.mgmt.cosmosdb.models.RegionForOnlineOffline or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._online_region_initial( + raw_result = await self._online_region_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, region_parameter_for_online=region_parameter_for_online, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_online_region.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion"} # type: ignore + begin_online_region.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion"} # type: ignore @distributed_trace_async async def get_read_only_keys( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.DatabaseAccountListReadOnlyKeysResult": + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.DatabaseAccountListReadOnlyKeysResult: """Lists the read-only access keys for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DatabaseAccountListReadOnlyKeysResult, or the result of cls(response) + :return: DatabaseAccountListReadOnlyKeysResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DatabaseAccountListReadOnlyKeysResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountListReadOnlyKeysResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountListReadOnlyKeysResult] - request = build_get_read_only_keys_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_read_only_keys.metadata['url'], + template_url=self.get_read_only_keys.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountListReadOnlyKeysResult', pipeline_response) + deserialized = self._deserialize("DatabaseAccountListReadOnlyKeysResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_read_only_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys"} # type: ignore - + get_read_only_keys.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys"} # type: ignore @distributed_trace_async async def list_read_only_keys( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.DatabaseAccountListReadOnlyKeysResult": + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.DatabaseAccountListReadOnlyKeysResult: """Lists the read-only access keys for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DatabaseAccountListReadOnlyKeysResult, or the result of cls(response) + :return: DatabaseAccountListReadOnlyKeysResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DatabaseAccountListReadOnlyKeysResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountListReadOnlyKeysResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountListReadOnlyKeysResult] - request = build_list_read_only_keys_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_read_only_keys.metadata['url'], + template_url=self.list_read_only_keys.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountListReadOnlyKeysResult', pipeline_response) + deserialized = self._deserialize("DatabaseAccountListReadOnlyKeysResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_read_only_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys"} # type: ignore - + list_read_only_keys.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys"} # type: ignore async def _regenerate_key_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, account_name: str, - key_to_regenerate: "_models.DatabaseAccountRegenerateKeyParameters", + key_to_regenerate: Union[_models.DatabaseAccountRegenerateKeyParameters, IO], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_regenerate_key_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(key_to_regenerate, (IO, bytes)): + _content = key_to_regenerate + else: + _json = self._serialize.body(key_to_regenerate, "DatabaseAccountRegenerateKeyParameters") + + request = build_regenerate_key_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._regenerate_key_initial.metadata['url'], + content=_content, + template_url=self._regenerate_key_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1234,25 +1778,100 @@ async def _regenerate_key_initial( # pylint: disable=inconsistent-return-statem if cls: return cls(pipeline_response, None, {}) - _regenerate_key_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey"} # type: ignore + _regenerate_key_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey"} # type: ignore + @overload + async def begin_regenerate_key( + self, + resource_group_name: str, + account_name: str, + key_to_regenerate: _models.DatabaseAccountRegenerateKeyParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Regenerates an access key for the specified Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param key_to_regenerate: The name of the key to regenerate. Required. + :type key_to_regenerate: ~azure.mgmt.cosmosdb.models.DatabaseAccountRegenerateKeyParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_regenerate_key( + self, + resource_group_name: str, + account_name: str, + key_to_regenerate: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Regenerates an access key for the specified Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param key_to_regenerate: The name of the key to regenerate. Required. + :type key_to_regenerate: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async - async def begin_regenerate_key( # pylint: disable=inconsistent-return-statements + async def begin_regenerate_key( self, resource_group_name: str, account_name: str, - key_to_regenerate: "_models.DatabaseAccountRegenerateKeyParameters", + key_to_regenerate: Union[_models.DatabaseAccountRegenerateKeyParameters, IO], **kwargs: Any ) -> AsyncLROPoller[None]: """Regenerates an access key for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param key_to_regenerate: The name of the key to regenerate. - :type key_to_regenerate: ~azure.mgmt.cosmosdb.models.DatabaseAccountRegenerateKeyParameters + :param key_to_regenerate: The name of the key to regenerate. Is either a model type or a IO + type. Required. + :type key_to_regenerate: ~azure.mgmt.cosmosdb.models.DatabaseAccountRegenerateKeyParameters or + IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1263,87 +1882,93 @@ async def begin_regenerate_key( # pylint: disable=inconsistent-return-statement Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._regenerate_key_initial( + raw_result = await self._regenerate_key_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, key_to_regenerate=key_to_regenerate, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_regenerate_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey"} # type: ignore + begin_regenerate_key.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey"} # type: ignore @distributed_trace_async - async def check_name_exists( - self, - account_name: str, - **kwargs: Any - ) -> bool: + async def check_name_exists(self, account_name: str, **kwargs: Any) -> bool: """Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: bool, or the result of cls(response) + :return: bool or the result of cls(response) :rtype: bool - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_check_name_exists_request( account_name=account_name, api_version=api_version, - template_url=self.check_name_exists.metadata['url'], + template_url=self.check_name_exists.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1354,65 +1979,66 @@ async def check_name_exists( return cls(pipeline_response, None, {}) return 200 <= response.status_code <= 299 - check_name_exists.metadata = {'url': "/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}"} # type: ignore - + check_name_exists.metadata = {"url": "/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}"} # type: ignore @distributed_trace def list_metrics( - self, - resource_group_name: str, - account_name: str, - filter: str, - **kwargs: Any - ) -> AsyncIterable["_models.MetricListResult"]: + self, resource_group_name: str, account_name: str, filter: str, **kwargs: Any + ) -> AsyncIterable["_models.Metric"]: """Retrieves the metrics determined by the given filter for the given database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Metric or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.Metric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1426,10 +2052,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1439,68 +2063,68 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics"} # type: ignore @distributed_trace def list_usages( - self, - resource_group_name: str, - account_name: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.UsagesResult"]: + self, resource_group_name: str, account_name: str, filter: Optional[str] = None, **kwargs: Any + ) -> AsyncIterable["_models.Usage"]: """Retrieves the usages (most recent data) for the given database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param filter: An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either UsagesResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.UsagesResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Usage or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.UsagesResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_usages_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_usages.metadata['url'], + api_version=api_version, + template_url=self.list_usages.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_usages_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1514,10 +2138,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1527,63 +2149,63 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages"} # type: ignore + list_usages.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages"} # type: ignore @distributed_trace def list_metric_definitions( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.MetricDefinitionsListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.MetricDefinition"]: """Retrieves metric definitions for the given database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricDefinitionsListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MetricDefinitionsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either MetricDefinition or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MetricDefinition] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricDefinitionsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricDefinitionsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metric_definitions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_metric_definitions.metadata['url'], + template_url=self.list_metric_definitions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metric_definitions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1597,10 +2219,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1610,8 +2230,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions"} # type: ignore + list_metric_definitions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_database_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_database_operations.py index 1d2851e68cf..77841e3c683 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_database_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_database_operations.py @@ -7,105 +7,117 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request -from ...operations._database_operations import build_list_metric_definitions_request, build_list_metrics_request, build_list_usages_request -T = TypeVar('T') +from ...operations._database_operations import ( + build_list_metric_definitions_request, + build_list_metrics_request, + build_list_usages_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DatabaseOperations: - """DatabaseOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class DatabaseOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`database` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( - self, - resource_group_name: str, - account_name: str, - database_rid: str, - filter: str, - **kwargs: Any - ) -> AsyncIterable["_models.MetricListResult"]: + self, resource_group_name: str, account_name: str, database_rid: str, filter: str, **kwargs: Any + ) -> AsyncIterable["_models.Metric"]: """Retrieves the metrics determined by the given filter for the given database account and database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Metric or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.Metric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -119,10 +131,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -132,11 +142,9 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metrics"} # type: ignore @distributed_trace def list_usages( @@ -146,59 +154,64 @@ def list_usages( database_rid: str, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.UsagesResult"]: + ) -> AsyncIterable["_models.Usage"]: """Retrieves the usages (most recent data) for the given database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str :param filter: An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either UsagesResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.UsagesResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Usage or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.UsagesResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_usages_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_usages.metadata['url'], + api_version=api_version, + template_url=self.list_usages.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_usages_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -212,10 +225,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -225,68 +236,66 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/usages"} # type: ignore + list_usages.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/usages"} # type: ignore @distributed_trace def list_metric_definitions( - self, - resource_group_name: str, - account_name: str, - database_rid: str, - **kwargs: Any - ) -> AsyncIterable["_models.MetricDefinitionsListResult"]: + self, resource_group_name: str, account_name: str, database_rid: str, **kwargs: Any + ) -> AsyncIterable["_models.MetricDefinition"]: """Retrieves metric definitions for the given database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricDefinitionsListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MetricDefinitionsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either MetricDefinition or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MetricDefinition] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricDefinitionsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricDefinitionsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metric_definitions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_metric_definitions.metadata['url'], + template_url=self.list_metric_definitions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metric_definitions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -300,10 +309,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -313,8 +320,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metricDefinitions"} # type: ignore + list_metric_definitions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metricDefinitions"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_graph_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_graph_resources_operations.py index f3e63dc5cd8..ee1bba3f5e6 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_graph_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_graph_resources_operations.py @@ -6,98 +6,115 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._vendor import _convert_request -from ...operations._graph_resources_operations import build_create_update_graph_request_initial, build_delete_graph_resource_request_initial, build_get_graph_request, build_list_graphs_request -T = TypeVar('T') +from ...operations._graph_resources_operations import ( + build_create_update_graph_request, + build_delete_graph_resource_request, + build_get_graph_request, + build_list_graphs_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class GraphResourcesOperations: - """GraphResourcesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class GraphResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`graph_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_graphs( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.GraphResourcesListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.GraphResourceGetResults"]: """Lists the graphs under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either GraphResourcesListResult or the result of + :return: An iterator like instance of either GraphResourceGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.GraphResourcesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.GraphResourceGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GraphResourcesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphResourcesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_graphs_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_graphs.metadata['url'], + template_url=self.list_graphs.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_graphs_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -111,10 +128,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -124,112 +139,126 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_graphs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs"} # type: ignore + list_graphs.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs"} # type: ignore @distributed_trace_async async def get_graph( - self, - resource_group_name: str, - account_name: str, - graph_name: str, - **kwargs: Any - ) -> "_models.GraphResourceGetResults": + self, resource_group_name: str, account_name: str, graph_name: str, **kwargs: Any + ) -> _models.GraphResourceGetResults: """Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param graph_name: Cosmos DB graph resource name. + :param graph_name: Cosmos DB graph resource name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: GraphResourceGetResults, or the result of cls(response) + :return: GraphResourceGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.GraphResourceGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphResourceGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GraphResourceGetResults] - request = build_get_graph_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_graph.metadata['url'], + template_url=self.get_graph.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('GraphResourceGetResults', pipeline_response) + deserialized = self._deserialize("GraphResourceGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_graph.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore - + get_graph.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore async def _create_update_graph_initial( self, resource_group_name: str, account_name: str, graph_name: str, - create_update_graph_parameters: "_models.GraphResourceCreateUpdateParameters", + create_update_graph_parameters: Union[_models.GraphResourceCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.GraphResourceGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GraphResourceGetResults"]] + ) -> Optional[_models.GraphResourceGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_graph_parameters, 'GraphResourceCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.GraphResourceGetResults]] - request = build_create_update_graph_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_graph_parameters, (IO, bytes)): + _content = create_update_graph_parameters + else: + _json = self._serialize.body(create_update_graph_parameters, "GraphResourceCreateUpdateParameters") + + request = build_create_update_graph_request( resource_group_name=resource_group_name, account_name=account_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_graph_initial.metadata['url'], + content=_content, + template_url=self._create_update_graph_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -238,36 +267,42 @@ async def _create_update_graph_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('GraphResourceGetResults', pipeline_response) + deserialized = self._deserialize("GraphResourceGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_graph_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore - + _create_update_graph_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore - @distributed_trace_async + @overload async def begin_create_update_graph( self, resource_group_name: str, account_name: str, graph_name: str, - create_update_graph_parameters: "_models.GraphResourceCreateUpdateParameters", + create_update_graph_parameters: _models.GraphResourceCreateUpdateParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller["_models.GraphResourceGetResults"]: + ) -> AsyncLROPoller[_models.GraphResourceGetResults]: """Create or update an Azure Cosmos DB Graph. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param graph_name: Cosmos DB graph resource name. + :param graph_name: Cosmos DB graph resource name. Required. :type graph_name: str :param create_update_graph_parameters: The parameters to provide for the current graph. + Required. :type create_update_graph_parameters: ~azure.mgmt.cosmosdb.models.GraphResourceCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -279,84 +314,168 @@ async def begin_create_update_graph( :return: An instance of AsyncLROPoller that returns either GraphResourceGetResults or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.GraphResourceGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphResourceGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + async def begin_create_update_graph( + self, + resource_group_name: str, + account_name: str, + graph_name: str, + create_update_graph_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.GraphResourceGetResults]: + """Create or update an Azure Cosmos DB Graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param graph_name: Cosmos DB graph resource name. Required. + :type graph_name: str + :param create_update_graph_parameters: The parameters to provide for the current graph. + Required. + :type create_update_graph_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either GraphResourceGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.GraphResourceGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_update_graph( + self, + resource_group_name: str, + account_name: str, + graph_name: str, + create_update_graph_parameters: Union[_models.GraphResourceCreateUpdateParameters, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.GraphResourceGetResults]: + """Create or update an Azure Cosmos DB Graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param graph_name: Cosmos DB graph resource name. Required. + :type graph_name: str + :param create_update_graph_parameters: The parameters to provide for the current graph. Is + either a model type or a IO type. Required. + :type create_update_graph_parameters: + ~azure.mgmt.cosmosdb.models.GraphResourceCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either GraphResourceGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.GraphResourceGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.GraphResourceGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_graph_initial( + raw_result = await self._create_update_graph_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, graph_name=graph_name, create_update_graph_parameters=create_update_graph_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('GraphResourceGetResults', pipeline_response) + deserialized = self._deserialize("GraphResourceGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_graph.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore + begin_create_update_graph.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore async def _delete_graph_resource_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - graph_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, graph_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_graph_resource_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_graph_resource_request( resource_group_name=resource_group_name, account_name=account_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_graph_resource_initial.metadata['url'], + template_url=self._delete_graph_resource_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -366,24 +485,20 @@ async def _delete_graph_resource_initial( # pylint: disable=inconsistent-return if cls: return cls(pipeline_response, None, {}) - _delete_graph_resource_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore - + _delete_graph_resource_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore @distributed_trace_async - async def begin_delete_graph_resource( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - graph_name: str, - **kwargs: Any + async def begin_delete_graph_resource( + self, resource_group_name: str, account_name: str, graph_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB Graph Resource. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param graph_name: Cosmos DB graph resource name. + :param graph_name: Cosmos DB graph resource name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -395,42 +510,46 @@ async def begin_delete_graph_resource( # pylint: disable=inconsistent-return-st Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_graph_resource_initial( + raw_result = await self._delete_graph_resource_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, graph_name=graph_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_graph_resource.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore + begin_delete_graph_resource.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_gremlin_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_gremlin_resources_operations.py index 9a886f88eca..4dee97ac4e3 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_gremlin_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_gremlin_resources_operations.py @@ -6,98 +6,128 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._vendor import _convert_request -from ...operations._gremlin_resources_operations import build_create_update_gremlin_database_request_initial, build_create_update_gremlin_graph_request_initial, build_delete_gremlin_database_request_initial, build_delete_gremlin_graph_request_initial, build_get_gremlin_database_request, build_get_gremlin_database_throughput_request, build_get_gremlin_graph_request, build_get_gremlin_graph_throughput_request, build_list_gremlin_databases_request, build_list_gremlin_graphs_request, build_migrate_gremlin_database_to_autoscale_request_initial, build_migrate_gremlin_database_to_manual_throughput_request_initial, build_migrate_gremlin_graph_to_autoscale_request_initial, build_migrate_gremlin_graph_to_manual_throughput_request_initial, build_retrieve_continuous_backup_information_request_initial, build_update_gremlin_database_throughput_request_initial, build_update_gremlin_graph_throughput_request_initial -T = TypeVar('T') +from ...operations._gremlin_resources_operations import ( + build_create_update_gremlin_database_request, + build_create_update_gremlin_graph_request, + build_delete_gremlin_database_request, + build_delete_gremlin_graph_request, + build_get_gremlin_database_request, + build_get_gremlin_database_throughput_request, + build_get_gremlin_graph_request, + build_get_gremlin_graph_throughput_request, + build_list_gremlin_databases_request, + build_list_gremlin_graphs_request, + build_migrate_gremlin_database_to_autoscale_request, + build_migrate_gremlin_database_to_manual_throughput_request, + build_migrate_gremlin_graph_to_autoscale_request, + build_migrate_gremlin_graph_to_manual_throughput_request, + build_retrieve_continuous_backup_information_request, + build_update_gremlin_database_throughput_request, + build_update_gremlin_graph_throughput_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class GremlinResourcesOperations: # pylint: disable=too-many-public-methods - """GremlinResourcesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class GremlinResourcesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`gremlin_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_gremlin_databases( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.GremlinDatabaseListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.GremlinDatabaseGetResults"]: """Lists the Gremlin databases under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either GremlinDatabaseListResult or the result of + :return: An iterator like instance of either GremlinDatabaseGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.GremlinDatabaseListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GremlinDatabaseListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GremlinDatabaseListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_gremlin_databases_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_gremlin_databases.metadata['url'], + template_url=self.list_gremlin_databases.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_gremlin_databases_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -111,10 +141,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -124,112 +152,128 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_gremlin_databases.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases"} # type: ignore + list_gremlin_databases.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases"} # type: ignore @distributed_trace_async async def get_gremlin_database( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> "_models.GremlinDatabaseGetResults": + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> _models.GremlinDatabaseGetResults: """Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: GremlinDatabaseGetResults, or the result of cls(response) + :return: GremlinDatabaseGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.GremlinDatabaseGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GremlinDatabaseGetResults] - request = build_get_gremlin_database_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_gremlin_database.metadata['url'], + template_url=self.get_gremlin_database.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('GremlinDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("GremlinDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_gremlin_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore - + get_gremlin_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore async def _create_update_gremlin_database_initial( self, resource_group_name: str, account_name: str, database_name: str, - create_update_gremlin_database_parameters: "_models.GremlinDatabaseCreateUpdateParameters", + create_update_gremlin_database_parameters: Union[_models.GremlinDatabaseCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.GremlinDatabaseGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GremlinDatabaseGetResults"]] + ) -> Optional[_models.GremlinDatabaseGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_gremlin_database_parameters, 'GremlinDatabaseCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.GremlinDatabaseGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_gremlin_database_parameters, (IO, bytes)): + _content = create_update_gremlin_database_parameters + else: + _json = self._serialize.body( + create_update_gremlin_database_parameters, "GremlinDatabaseCreateUpdateParameters" + ) - request = build_create_update_gremlin_database_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_gremlin_database_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_gremlin_database_initial.metadata['url'], + content=_content, + template_url=self._create_update_gremlin_database_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -238,15 +282,97 @@ async def _create_update_gremlin_database_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('GremlinDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("GremlinDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_gremlin_database_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore + _create_update_gremlin_database_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore + + @overload + async def begin_create_update_gremlin_database( + self, + resource_group_name: str, + account_name: str, + database_name: str, + create_update_gremlin_database_parameters: _models.GremlinDatabaseCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.GremlinDatabaseGetResults]: + """Create or update an Azure Cosmos DB Gremlin database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param create_update_gremlin_database_parameters: The parameters to provide for the current + Gremlin database. Required. + :type create_update_gremlin_database_parameters: + ~azure.mgmt.cosmosdb.models.GremlinDatabaseCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either GremlinDatabaseGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_gremlin_database( + self, + resource_group_name: str, + account_name: str, + database_name: str, + create_update_gremlin_database_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.GremlinDatabaseGetResults]: + """Create or update an Azure Cosmos DB Gremlin database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param create_update_gremlin_database_parameters: The parameters to provide for the current + Gremlin database. Required. + :type create_update_gremlin_database_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either GremlinDatabaseGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_gremlin_database( @@ -254,21 +380,25 @@ async def begin_create_update_gremlin_database( resource_group_name: str, account_name: str, database_name: str, - create_update_gremlin_database_parameters: "_models.GremlinDatabaseCreateUpdateParameters", + create_update_gremlin_database_parameters: Union[_models.GremlinDatabaseCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.GremlinDatabaseGetResults"]: + ) -> AsyncLROPoller[_models.GremlinDatabaseGetResults]: """Create or update an Azure Cosmos DB Gremlin database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :param create_update_gremlin_database_parameters: The parameters to provide for the current - Gremlin database. + Gremlin database. Is either a model type or a IO type. Required. :type create_update_gremlin_database_parameters: - ~azure.mgmt.cosmosdb.models.GremlinDatabaseCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.GremlinDatabaseCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -281,84 +411,89 @@ async def begin_create_update_gremlin_database( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GremlinDatabaseGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.GremlinDatabaseGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_gremlin_database_initial( + raw_result = await self._create_update_gremlin_database_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, create_update_gremlin_database_parameters=create_update_gremlin_database_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('GremlinDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("GremlinDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_gremlin_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore + begin_create_update_gremlin_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore async def _delete_gremlin_database_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_gremlin_database_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_gremlin_database_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_gremlin_database_initial.metadata['url'], + template_url=self._delete_gremlin_database_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -368,24 +503,20 @@ async def _delete_gremlin_database_initial( # pylint: disable=inconsistent-retu if cls: return cls(pipeline_response, None, {}) - _delete_gremlin_database_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore - + _delete_gremlin_database_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore @distributed_trace_async - async def begin_delete_gremlin_database( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + async def begin_delete_gremlin_database( + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB Gremlin database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -397,146 +528,166 @@ async def begin_delete_gremlin_database( # pylint: disable=inconsistent-return- Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_gremlin_database_initial( + raw_result = await self._delete_gremlin_database_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_gremlin_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore + begin_delete_gremlin_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore @distributed_trace_async async def get_gremlin_database_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_gremlin_database_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_gremlin_database_throughput.metadata['url'], + template_url=self.get_gremlin_database_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_gremlin_database_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default"} # type: ignore - + get_gremlin_database_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default"} # type: ignore async def _update_gremlin_database_throughput_initial( self, resource_group_name: str, account_name: str, database_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_gremlin_database_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_gremlin_database_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_gremlin_database_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_gremlin_database_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -545,15 +696,97 @@ async def _update_gremlin_database_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_gremlin_database_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default"} # type: ignore + _update_gremlin_database_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default"} # type: ignore + + @overload + async def begin_update_gremlin_database_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Gremlin database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Gremlin database. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_gremlin_database_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Gremlin database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Gremlin database. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_update_gremlin_database_throughput( @@ -561,21 +794,25 @@ async def begin_update_gremlin_database_throughput( resource_group_name: str, account_name: str, database_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB Gremlin database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current Gremlin database. + current Gremlin database. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -588,84 +825,89 @@ async def begin_update_gremlin_database_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_gremlin_database_throughput_initial( + raw_result = await self._update_gremlin_database_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_gremlin_database_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default"} # type: ignore + begin_update_gremlin_database_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default"} # type: ignore async def _migrate_gremlin_database_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_gremlin_database_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_gremlin_database_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_gremlin_database_to_autoscale_initial.metadata['url'], + template_url=self._migrate_gremlin_database_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -674,31 +916,27 @@ async def _migrate_gremlin_database_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_gremlin_database_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_gremlin_database_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace_async async def begin_migrate_gremlin_database_to_autoscale( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -712,81 +950,86 @@ async def begin_migrate_gremlin_database_to_autoscale( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_gremlin_database_to_autoscale_initial( + raw_result = await self._migrate_gremlin_database_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_gremlin_database_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_gremlin_database_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore async def _migrate_gremlin_database_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_gremlin_database_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_gremlin_database_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_gremlin_database_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_gremlin_database_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -795,31 +1038,27 @@ async def _migrate_gremlin_database_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_gremlin_database_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_gremlin_database_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace_async async def begin_migrate_gremlin_database_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -833,105 +1072,110 @@ async def begin_migrate_gremlin_database_to_manual_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_gremlin_database_to_manual_throughput_initial( + raw_result = await self._migrate_gremlin_database_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_gremlin_database_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_gremlin_database_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def list_gremlin_graphs( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.GremlinGraphListResult"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> AsyncIterable["_models.GremlinGraphGetResults"]: """Lists the Gremlin graph under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either GremlinGraphListResult or the result of + :return: An iterator like instance of either GremlinGraphGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.GremlinGraphListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GremlinGraphListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GremlinGraphListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_gremlin_graphs_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_gremlin_graphs.metadata['url'], + template_url=self.list_gremlin_graphs.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_gremlin_graphs_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -945,10 +1189,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -958,77 +1200,76 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_gremlin_graphs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs"} # type: ignore + list_gremlin_graphs.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs"} # type: ignore @distributed_trace_async async def get_gremlin_graph( - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any - ) -> "_models.GremlinGraphGetResults": + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any + ) -> _models.GremlinGraphGetResults: """Gets the Gremlin graph under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: GremlinGraphGetResults, or the result of cls(response) + :return: GremlinGraphGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.GremlinGraphGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.GremlinGraphGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GremlinGraphGetResults] - request = build_get_gremlin_graph_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_gremlin_graph.metadata['url'], + template_url=self.get_gremlin_graph.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('GremlinGraphGetResults', pipeline_response) + deserialized = self._deserialize("GremlinGraphGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_gremlin_graph.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore - + get_gremlin_graph.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore async def _create_update_gremlin_graph_initial( self, @@ -1036,39 +1277,53 @@ async def _create_update_gremlin_graph_initial( account_name: str, database_name: str, graph_name: str, - create_update_gremlin_graph_parameters: "_models.GremlinGraphCreateUpdateParameters", + create_update_gremlin_graph_parameters: Union[_models.GremlinGraphCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.GremlinGraphGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GremlinGraphGetResults"]] + ) -> Optional[_models.GremlinGraphGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_gremlin_graph_parameters, 'GremlinGraphCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.GremlinGraphGetResults]] - request = build_create_update_gremlin_graph_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_gremlin_graph_parameters, (IO, bytes)): + _content = create_update_gremlin_graph_parameters + else: + _json = self._serialize.body(create_update_gremlin_graph_parameters, "GremlinGraphCreateUpdateParameters") + + request = build_create_update_gremlin_graph_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_gremlin_graph_initial.metadata['url'], + content=_content, + template_url=self._create_update_gremlin_graph_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1077,15 +1332,101 @@ async def _create_update_gremlin_graph_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('GremlinGraphGetResults', pipeline_response) + deserialized = self._deserialize("GremlinGraphGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_gremlin_graph_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore + _create_update_gremlin_graph_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore + @overload + async def begin_create_update_gremlin_graph( + self, + resource_group_name: str, + account_name: str, + database_name: str, + graph_name: str, + create_update_gremlin_graph_parameters: _models.GremlinGraphCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.GremlinGraphGetResults]: + """Create or update an Azure Cosmos DB Gremlin graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param graph_name: Cosmos DB graph name. Required. + :type graph_name: str + :param create_update_gremlin_graph_parameters: The parameters to provide for the current + Gremlin graph. Required. + :type create_update_gremlin_graph_parameters: + ~azure.mgmt.cosmosdb.models.GremlinGraphCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either GremlinGraphGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_gremlin_graph( + self, + resource_group_name: str, + account_name: str, + database_name: str, + graph_name: str, + create_update_gremlin_graph_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.GremlinGraphGetResults]: + """Create or update an Azure Cosmos DB Gremlin graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param graph_name: Cosmos DB graph name. Required. + :type graph_name: str + :param create_update_gremlin_graph_parameters: The parameters to provide for the current + Gremlin graph. Required. + :type create_update_gremlin_graph_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either GremlinGraphGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_gremlin_graph( @@ -1094,23 +1435,27 @@ async def begin_create_update_gremlin_graph( account_name: str, database_name: str, graph_name: str, - create_update_gremlin_graph_parameters: "_models.GremlinGraphCreateUpdateParameters", + create_update_gremlin_graph_parameters: Union[_models.GremlinGraphCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.GremlinGraphGetResults"]: + ) -> AsyncLROPoller[_models.GremlinGraphGetResults]: """Create or update an Azure Cosmos DB Gremlin graph. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :param create_update_gremlin_graph_parameters: The parameters to provide for the current - Gremlin graph. + Gremlin graph. Is either a model type or a IO type. Required. :type create_update_gremlin_graph_parameters: - ~azure.mgmt.cosmosdb.models.GremlinGraphCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.GremlinGraphCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1122,19 +1467,19 @@ async def begin_create_update_gremlin_graph( :return: An instance of AsyncLROPoller that returns either GremlinGraphGetResults or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GremlinGraphGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.GremlinGraphGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_gremlin_graph_initial( + raw_result = await self._create_update_gremlin_graph_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -1142,67 +1487,71 @@ async def begin_create_update_gremlin_graph( create_update_gremlin_graph_parameters=create_update_gremlin_graph_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('GremlinGraphGetResults', pipeline_response) + deserialized = self._deserialize("GremlinGraphGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_gremlin_graph.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore + begin_create_update_gremlin_graph.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore async def _delete_gremlin_graph_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_gremlin_graph_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_gremlin_graph_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_gremlin_graph_initial.metadata['url'], + template_url=self._delete_gremlin_graph_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1212,27 +1561,22 @@ async def _delete_gremlin_graph_initial( # pylint: disable=inconsistent-return- if cls: return cls(pipeline_response, None, {}) - _delete_gremlin_graph_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore - + _delete_gremlin_graph_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore @distributed_trace_async - async def begin_delete_gremlin_graph( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any + async def begin_delete_gremlin_graph( + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB Gremlin graph. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1244,113 +1588,118 @@ async def begin_delete_gremlin_graph( # pylint: disable=inconsistent-return-sta Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_gremlin_graph_initial( + raw_result = await self._delete_gremlin_graph_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_gremlin_graph.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore + begin_delete_gremlin_graph.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore @distributed_trace_async async def get_gremlin_graph_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_gremlin_graph_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_gremlin_graph_throughput.metadata['url'], + template_url=self.get_gremlin_graph_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_gremlin_graph_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default"} # type: ignore - + get_gremlin_graph_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default"} # type: ignore async def _update_gremlin_graph_throughput_initial( self, @@ -1358,39 +1707,53 @@ async def _update_gremlin_graph_throughput_initial( account_name: str, database_name: str, graph_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_gremlin_graph_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_gremlin_graph_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_gremlin_graph_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_gremlin_graph_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1399,15 +1762,103 @@ async def _update_gremlin_graph_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_gremlin_graph_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default"} # type: ignore + _update_gremlin_graph_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default"} # type: ignore + @overload + async def begin_update_gremlin_graph_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + graph_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Gremlin graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param graph_name: Cosmos DB graph name. Required. + :type graph_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Gremlin graph. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_gremlin_graph_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + graph_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Gremlin graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param graph_name: Cosmos DB graph name. Required. + :type graph_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Gremlin graph. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_update_gremlin_graph_throughput( @@ -1416,23 +1867,27 @@ async def begin_update_gremlin_graph_throughput( account_name: str, database_name: str, graph_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB Gremlin graph. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current Gremlin graph. + current Gremlin graph. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1445,19 +1900,19 @@ async def begin_update_gremlin_graph_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_gremlin_graph_throughput_initial( + raw_result = await self._update_gremlin_graph_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -1465,67 +1920,71 @@ async def begin_update_gremlin_graph_throughput( update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_gremlin_graph_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default"} # type: ignore + begin_update_gremlin_graph_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default"} # type: ignore async def _migrate_gremlin_graph_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_gremlin_graph_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_gremlin_graph_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_gremlin_graph_to_autoscale_initial.metadata['url'], + template_url=self._migrate_gremlin_graph_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1534,34 +1993,29 @@ async def _migrate_gremlin_graph_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_gremlin_graph_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_gremlin_graph_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace_async async def begin_migrate_gremlin_graph_to_autoscale( - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1575,84 +2029,88 @@ async def begin_migrate_gremlin_graph_to_autoscale( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_gremlin_graph_to_autoscale_initial( + raw_result = await self._migrate_gremlin_graph_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_gremlin_graph_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_gremlin_graph_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale"} # type: ignore async def _migrate_gremlin_graph_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_gremlin_graph_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_gremlin_graph_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_gremlin_graph_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_gremlin_graph_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1661,34 +2119,29 @@ async def _migrate_gremlin_graph_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_gremlin_graph_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_gremlin_graph_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace_async async def begin_migrate_gremlin_graph_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1702,49 +2155,52 @@ async def begin_migrate_gremlin_graph_to_manual_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_gremlin_graph_to_manual_throughput_initial( + raw_result = await self._migrate_gremlin_graph_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_gremlin_graph_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_gremlin_graph_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore async def _retrieve_continuous_backup_information_initial( self, @@ -1752,39 +2208,53 @@ async def _retrieve_continuous_backup_information_initial( account_name: str, database_name: str, graph_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> Optional["_models.BackupInformation"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupInformation"]] + ) -> Optional[_models.BackupInformation]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(location, 'ContinuousBackupRestoreLocation') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.BackupInformation]] - request = build_retrieve_continuous_backup_information_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(location, (IO, bytes)): + _content = location + else: + _json = self._serialize.body(location, "ContinuousBackupRestoreLocation") + + request = build_retrieve_continuous_backup_information_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._retrieve_continuous_backup_information_initial.metadata['url'], + content=_content, + template_url=self._retrieve_continuous_backup_information_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1793,15 +2263,98 @@ async def _retrieve_continuous_backup_information_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _retrieve_continuous_backup_information_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/retrieveContinuousBackupInformation"} # type: ignore + _retrieve_continuous_backup_information_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/retrieveContinuousBackupInformation"} # type: ignore + @overload + async def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + graph_name: str, + location: _models.ContinuousBackupRestoreLocation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a gremlin graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param graph_name: Cosmos DB graph name. Required. + :type graph_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + graph_name: str, + location: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a gremlin graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param graph_name: Cosmos DB graph name. Required. + :type graph_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_retrieve_continuous_backup_information( @@ -1810,21 +2363,26 @@ async def begin_retrieve_continuous_backup_information( account_name: str, database_name: str, graph_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.BackupInformation"]: + ) -> AsyncLROPoller[_models.BackupInformation]: """Retrieves continuous backup information for a gremlin graph. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str - :param location: The name of the continuous backup restore location. - :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :param location: The name of the continuous backup restore location. Is either a model type or + a IO type. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1836,19 +2394,19 @@ async def begin_retrieve_continuous_backup_information( :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupInformation] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._retrieve_continuous_backup_information_initial( + raw_result = await self._retrieve_continuous_backup_information_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -1856,29 +2414,34 @@ async def begin_retrieve_continuous_backup_information( location=location, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_retrieve_continuous_backup_information.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/retrieveContinuousBackupInformation"} # type: ignore + begin_retrieve_continuous_backup_information.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/retrieveContinuousBackupInformation"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_locations_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_locations_operations.py index 5318ae66f63..838ea6b24a7 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_locations_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_locations_operations.py @@ -7,83 +7,96 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._locations_operations import build_get_request, build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LocationsOperations: - """LocationsOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class LocationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`locations` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list( - self, - **kwargs: Any - ) -> AsyncIterable["_models.LocationListResult"]: + def list(self, **kwargs: Any) -> AsyncIterable["_models.LocationGetResult"]: """List Cosmos DB locations and their properties. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LocationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.LocationListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either LocationGetResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.LocationGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.LocationListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -97,10 +110,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -110,62 +121,62 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations"} # type: ignore @distributed_trace_async - async def get( - self, - location: str, - **kwargs: Any - ) -> "_models.LocationGetResult": + async def get(self, location: str, **kwargs: Any) -> _models.LocationGetResult: """Get the properties of an existing Cosmos DB location. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: LocationGetResult, or the result of cls(response) + :return: LocationGetResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.LocationGetResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationGetResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.LocationGetResult] - request = build_get_request( - subscription_id=self._config.subscription_id, location=location, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('LocationGetResult', pipeline_response) + deserialized = self._deserialize("LocationGetResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_mongo_db_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_mongo_db_resources_operations.py index 6f9a2e8fdc3..2ec7a63a21f 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_mongo_db_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_mongo_db_resources_operations.py @@ -6,98 +6,141 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._vendor import _convert_request -from ...operations._mongo_db_resources_operations import build_create_update_mongo_db_collection_request_initial, build_create_update_mongo_db_database_request_initial, build_create_update_mongo_role_definition_request_initial, build_create_update_mongo_user_definition_request_initial, build_delete_mongo_db_collection_request_initial, build_delete_mongo_db_database_request_initial, build_delete_mongo_role_definition_request_initial, build_delete_mongo_user_definition_request_initial, build_get_mongo_db_collection_request, build_get_mongo_db_collection_throughput_request, build_get_mongo_db_database_request, build_get_mongo_db_database_throughput_request, build_get_mongo_role_definition_request, build_get_mongo_user_definition_request, build_list_mongo_db_collection_partition_merge_request_initial, build_list_mongo_db_collections_request, build_list_mongo_db_databases_request, build_list_mongo_role_definitions_request, build_list_mongo_user_definitions_request, build_migrate_mongo_db_collection_to_autoscale_request_initial, build_migrate_mongo_db_collection_to_manual_throughput_request_initial, build_migrate_mongo_db_database_to_autoscale_request_initial, build_migrate_mongo_db_database_to_manual_throughput_request_initial, build_mongo_db_container_redistribute_throughput_request_initial, build_mongo_db_container_retrieve_throughput_distribution_request_initial, build_retrieve_continuous_backup_information_request_initial, build_update_mongo_db_collection_throughput_request_initial, build_update_mongo_db_database_throughput_request_initial -T = TypeVar('T') +from ...operations._mongo_db_resources_operations import ( + build_create_update_mongo_db_collection_request, + build_create_update_mongo_db_database_request, + build_create_update_mongo_role_definition_request, + build_create_update_mongo_user_definition_request, + build_delete_mongo_db_collection_request, + build_delete_mongo_db_database_request, + build_delete_mongo_role_definition_request, + build_delete_mongo_user_definition_request, + build_get_mongo_db_collection_request, + build_get_mongo_db_collection_throughput_request, + build_get_mongo_db_database_request, + build_get_mongo_db_database_throughput_request, + build_get_mongo_role_definition_request, + build_get_mongo_user_definition_request, + build_list_mongo_db_collection_partition_merge_request, + build_list_mongo_db_collections_request, + build_list_mongo_db_databases_request, + build_list_mongo_role_definitions_request, + build_list_mongo_user_definitions_request, + build_migrate_mongo_db_collection_to_autoscale_request, + build_migrate_mongo_db_collection_to_manual_throughput_request, + build_migrate_mongo_db_database_to_autoscale_request, + build_migrate_mongo_db_database_to_manual_throughput_request, + build_mongo_db_container_redistribute_throughput_request, + build_mongo_db_container_retrieve_throughput_distribution_request, + build_mongo_db_database_redistribute_throughput_request, + build_mongo_db_database_retrieve_throughput_distribution_request, + build_retrieve_continuous_backup_information_request, + build_update_mongo_db_collection_throughput_request, + build_update_mongo_db_database_throughput_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class MongoDBResourcesOperations: # pylint: disable=too-many-public-methods - """MongoDBResourcesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class MongoDBResourcesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`mongo_db_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_mongo_db_databases( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.MongoDBDatabaseListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.MongoDBDatabaseGetResults"]: """Lists the MongoDB databases under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MongoDBDatabaseListResult or the result of + :return: An iterator like instance of either MongoDBDatabaseGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MongoDBDatabaseListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoDBDatabaseListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoDBDatabaseListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_mongo_db_databases_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_mongo_db_databases.metadata['url'], + template_url=self.list_mongo_db_databases.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_mongo_db_databases_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -111,10 +154,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -124,112 +165,128 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_mongo_db_databases.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases"} # type: ignore + list_mongo_db_databases.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases"} # type: ignore @distributed_trace_async async def get_mongo_db_database( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> "_models.MongoDBDatabaseGetResults": + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> _models.MongoDBDatabaseGetResults: """Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: MongoDBDatabaseGetResults, or the result of cls(response) + :return: MongoDBDatabaseGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoDBDatabaseGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoDBDatabaseGetResults] - request = build_get_mongo_db_database_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_mongo_db_database.metadata['url'], + template_url=self.get_mongo_db_database.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('MongoDBDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("MongoDBDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_mongo_db_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore - + get_mongo_db_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore async def _create_update_mongo_db_database_initial( self, resource_group_name: str, account_name: str, database_name: str, - create_update_mongo_db_database_parameters: "_models.MongoDBDatabaseCreateUpdateParameters", + create_update_mongo_db_database_parameters: Union[_models.MongoDBDatabaseCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.MongoDBDatabaseGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MongoDBDatabaseGetResults"]] + ) -> Optional[_models.MongoDBDatabaseGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_mongo_db_database_parameters, 'MongoDBDatabaseCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.MongoDBDatabaseGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_mongo_db_database_parameters, (IO, bytes)): + _content = create_update_mongo_db_database_parameters + else: + _json = self._serialize.body( + create_update_mongo_db_database_parameters, "MongoDBDatabaseCreateUpdateParameters" + ) - request = build_create_update_mongo_db_database_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_mongo_db_database_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_mongo_db_database_initial.metadata['url'], + content=_content, + template_url=self._create_update_mongo_db_database_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -238,15 +295,97 @@ async def _create_update_mongo_db_database_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MongoDBDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("MongoDBDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_mongo_db_database_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore + _create_update_mongo_db_database_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore + + @overload + async def begin_create_update_mongo_db_database( + self, + resource_group_name: str, + account_name: str, + database_name: str, + create_update_mongo_db_database_parameters: _models.MongoDBDatabaseCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MongoDBDatabaseGetResults]: + """Create or updates Azure Cosmos DB MongoDB database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param create_update_mongo_db_database_parameters: The parameters to provide for the current + MongoDB database. Required. + :type create_update_mongo_db_database_parameters: + ~azure.mgmt.cosmosdb.models.MongoDBDatabaseCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MongoDBDatabaseGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_mongo_db_database( + self, + resource_group_name: str, + account_name: str, + database_name: str, + create_update_mongo_db_database_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MongoDBDatabaseGetResults]: + """Create or updates Azure Cosmos DB MongoDB database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param create_update_mongo_db_database_parameters: The parameters to provide for the current + MongoDB database. Required. + :type create_update_mongo_db_database_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MongoDBDatabaseGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_mongo_db_database( @@ -254,21 +393,25 @@ async def begin_create_update_mongo_db_database( resource_group_name: str, account_name: str, database_name: str, - create_update_mongo_db_database_parameters: "_models.MongoDBDatabaseCreateUpdateParameters", + create_update_mongo_db_database_parameters: Union[_models.MongoDBDatabaseCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.MongoDBDatabaseGetResults"]: + ) -> AsyncLROPoller[_models.MongoDBDatabaseGetResults]: """Create or updates Azure Cosmos DB MongoDB database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :param create_update_mongo_db_database_parameters: The parameters to provide for the current - MongoDB database. + MongoDB database. Is either a model type or a IO type. Required. :type create_update_mongo_db_database_parameters: - ~azure.mgmt.cosmosdb.models.MongoDBDatabaseCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.MongoDBDatabaseCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -281,84 +424,89 @@ async def begin_create_update_mongo_db_database( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoDBDatabaseGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoDBDatabaseGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_mongo_db_database_initial( + raw_result = await self._create_update_mongo_db_database_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, create_update_mongo_db_database_parameters=create_update_mongo_db_database_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('MongoDBDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("MongoDBDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_mongo_db_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore + begin_create_update_mongo_db_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore async def _delete_mongo_db_database_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_mongo_db_database_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_mongo_db_database_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_mongo_db_database_initial.metadata['url'], + template_url=self._delete_mongo_db_database_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -368,24 +516,20 @@ async def _delete_mongo_db_database_initial( # pylint: disable=inconsistent-ret if cls: return cls(pipeline_response, None, {}) - _delete_mongo_db_database_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore - + _delete_mongo_db_database_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore @distributed_trace_async - async def begin_delete_mongo_db_database( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + async def begin_delete_mongo_db_database( + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB MongoDB database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -397,146 +541,166 @@ async def begin_delete_mongo_db_database( # pylint: disable=inconsistent-return Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_mongo_db_database_initial( + raw_result = await self._delete_mongo_db_database_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_mongo_db_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore + begin_delete_mongo_db_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore @distributed_trace_async async def get_mongo_db_database_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_mongo_db_database_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_mongo_db_database_throughput.metadata['url'], + template_url=self.get_mongo_db_database_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_mongo_db_database_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default"} # type: ignore - + get_mongo_db_database_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default"} # type: ignore async def _update_mongo_db_database_throughput_initial( self, resource_group_name: str, account_name: str, database_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_mongo_db_database_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_mongo_db_database_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_mongo_db_database_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_mongo_db_database_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -545,15 +709,97 @@ async def _update_mongo_db_database_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_mongo_db_database_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default"} # type: ignore + _update_mongo_db_database_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default"} # type: ignore + + @overload + async def begin_update_mongo_db_database_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of the an Azure Cosmos DB MongoDB database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current MongoDB database. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_mongo_db_database_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of the an Azure Cosmos DB MongoDB database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current MongoDB database. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_update_mongo_db_database_throughput( @@ -561,21 +807,25 @@ async def begin_update_mongo_db_database_throughput( resource_group_name: str, account_name: str, database_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of the an Azure Cosmos DB MongoDB database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current MongoDB database. + current MongoDB database. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -588,84 +838,89 @@ async def begin_update_mongo_db_database_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_mongo_db_database_throughput_initial( + raw_result = await self._update_mongo_db_database_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_mongo_db_database_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default"} # type: ignore + begin_update_mongo_db_database_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default"} # type: ignore async def _migrate_mongo_db_database_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_mongo_db_database_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_mongo_db_database_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_mongo_db_database_to_autoscale_initial.metadata['url'], + template_url=self._migrate_mongo_db_database_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -674,31 +929,27 @@ async def _migrate_mongo_db_database_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_mongo_db_database_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_mongo_db_database_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace_async async def begin_migrate_mongo_db_database_to_autoscale( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -712,81 +963,86 @@ async def begin_migrate_mongo_db_database_to_autoscale( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_mongo_db_database_to_autoscale_initial( + raw_result = await self._migrate_mongo_db_database_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_mongo_db_database_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_mongo_db_database_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore async def _migrate_mongo_db_database_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_mongo_db_database_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_mongo_db_database_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_mongo_db_database_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_mongo_db_database_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -795,31 +1051,27 @@ async def _migrate_mongo_db_database_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_mongo_db_database_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_mongo_db_database_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace_async async def begin_migrate_mongo_db_database_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -833,88 +1085,103 @@ async def begin_migrate_mongo_db_database_to_manual_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_mongo_db_database_to_manual_throughput_initial( + raw_result = await self._migrate_mongo_db_database_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_mongo_db_database_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_mongo_db_database_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - async def _mongo_db_container_retrieve_throughput_distribution_initial( + async def _mongo_db_database_retrieve_throughput_distribution_initial( self, resource_group_name: str, account_name: str, database_name: str, - collection_name: str, - retrieve_throughput_parameters: "_models.RetrieveThroughputParameters", + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], **kwargs: Any - ) -> Optional["_models.PhysicalPartitionThroughputInfoResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionThroughputInfoResult"]] + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(retrieve_throughput_parameters, 'RetrieveThroughputParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] - request = build_mongo_db_container_retrieve_throughput_distribution_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(retrieve_throughput_parameters, (IO, bytes)): + _content = retrieve_throughput_parameters + else: + _json = self._serialize.body(retrieve_throughput_parameters, "RetrieveThroughputParameters") + + request = build_mongo_db_database_retrieve_throughput_distribution_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._mongo_db_container_retrieve_throughput_distribution_initial.metadata['url'], + content=_content, + template_url=self._mongo_db_database_retrieve_throughput_distribution_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -923,39 +1190,41 @@ async def _mongo_db_container_retrieve_throughput_distribution_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _mongo_db_container_retrieve_throughput_distribution_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore - + _mongo_db_database_retrieve_throughput_distribution_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore - @distributed_trace_async - async def begin_mongo_db_container_retrieve_throughput_distribution( + @overload + async def begin_mongo_db_database_retrieve_throughput_distribution( self, resource_group_name: str, account_name: str, database_name: str, - collection_name: str, - retrieve_throughput_parameters: "_models.RetrieveThroughputParameters", + retrieve_throughput_parameters: _models.RetrieveThroughputParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller["_models.PhysicalPartitionThroughputInfoResult"]: - """Retrieve throughput distribution for an Azure Cosmos DB MongoDB container. + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB MongoDB database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. - :type collection_name: str :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput - distribution for the current MongoDB container. + distribution for the current MongoDB database. Required. :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -968,92 +1237,430 @@ async def begin_mongo_db_container_retrieve_throughput_distribution( PhysicalPartitionThroughputInfoResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionThroughputInfoResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._mongo_db_container_retrieve_throughput_distribution_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - collection_name=collection_name, - retrieve_throughput_parameters=retrieve_throughput_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + @overload + async def begin_mongo_db_database_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + retrieve_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB MongoDB database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current MongoDB database. Required. + :type retrieve_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_mongo_db_database_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB MongoDB database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current MongoDB database. Is either a model type or a IO type. Required. + :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._mongo_db_database_retrieve_throughput_distribution_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + retrieve_throughput_parameters=retrieve_throughput_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_mongo_db_container_retrieve_throughput_distribution.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + begin_mongo_db_database_retrieve_throughput_distribution.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore - async def _mongo_db_container_redistribute_throughput_initial( + async def _mongo_db_database_redistribute_throughput_initial( self, resource_group_name: str, account_name: str, database_name: str, - collection_name: str, - redistribute_throughput_parameters: "_models.RedistributeThroughputParameters", + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], **kwargs: Any - ) -> Optional["_models.PhysicalPartitionThroughputInfoResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionThroughputInfoResult"]] + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] - _json = self._serialize.body(redistribute_throughput_parameters, 'RedistributeThroughputParameters') + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(redistribute_throughput_parameters, (IO, bytes)): + _content = redistribute_throughput_parameters + else: + _json = self._serialize.body(redistribute_throughput_parameters, "RedistributeThroughputParameters") - request = build_mongo_db_container_redistribute_throughput_request_initial( + request = build_mongo_db_database_redistribute_throughput_request( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._mongo_db_database_redistribute_throughput_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _mongo_db_database_redistribute_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/redistributeThroughput"} # type: ignore + + @overload + async def begin_mongo_db_database_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + redistribute_throughput_parameters: _models.RedistributeThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB MongoDB database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current MongoDB database. Required. + :type redistribute_throughput_parameters: + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_mongo_db_database_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + redistribute_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB MongoDB database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current MongoDB database. Required. + :type redistribute_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_mongo_db_database_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB MongoDB database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current MongoDB database. Is either a model type or a IO type. Required. + :type redistribute_throughput_parameters: + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._mongo_db_database_redistribute_throughput_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + redistribute_throughput_parameters=redistribute_throughput_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_mongo_db_database_redistribute_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/redistributeThroughput"} # type: ignore + + async def _mongo_db_container_retrieve_throughput_distribution_initial( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], + **kwargs: Any + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(retrieve_throughput_parameters, (IO, bytes)): + _content = retrieve_throughput_parameters + else: + _json = self._serialize.body(retrieve_throughput_parameters, "RetrieveThroughputParameters") + + request = build_mongo_db_container_retrieve_throughput_distribution_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._mongo_db_container_redistribute_throughput_initial.metadata['url'], + content=_content, + template_url=self._mongo_db_container_retrieve_throughput_distribution_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1062,40 +1669,295 @@ async def _mongo_db_container_redistribute_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _mongo_db_container_redistribute_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput"} # type: ignore + _mongo_db_container_retrieve_throughput_distribution_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + @overload + async def begin_mongo_db_container_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + retrieve_throughput_parameters: _models.RetrieveThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB MongoDB container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current MongoDB container. Required. + :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_mongo_db_container_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + retrieve_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB MongoDB container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current MongoDB container. Required. + :type retrieve_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async + async def begin_mongo_db_container_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB MongoDB container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current MongoDB container. Is either a model type or a IO type. Required. + :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._mongo_db_container_retrieve_throughput_distribution_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + retrieve_throughput_parameters=retrieve_throughput_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_mongo_db_container_retrieve_throughput_distribution.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + + async def _mongo_db_container_redistribute_throughput_initial( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], + **kwargs: Any + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(redistribute_throughput_parameters, (IO, bytes)): + _content = redistribute_throughput_parameters + else: + _json = self._serialize.body(redistribute_throughput_parameters, "RedistributeThroughputParameters") + + request = build_mongo_db_container_redistribute_throughput_request( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._mongo_db_container_redistribute_throughput_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _mongo_db_container_redistribute_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput"} # type: ignore + + @overload async def begin_mongo_db_container_redistribute_throughput( self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, - redistribute_throughput_parameters: "_models.RedistributeThroughputParameters", + redistribute_throughput_parameters: _models.RedistributeThroughputParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller["_models.PhysicalPartitionThroughputInfoResult"]: + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: """Redistribute throughput for an Azure Cosmos DB MongoDB container. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :param redistribute_throughput_parameters: The parameters to provide for redistributing - throughput for the current MongoDB container. + throughput for the current MongoDB container. Required. :type redistribute_throughput_parameters: ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1108,19 +1970,106 @@ async def begin_mongo_db_container_redistribute_throughput( PhysicalPartitionThroughputInfoResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionThroughputInfoResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + async def begin_mongo_db_container_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + redistribute_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB MongoDB container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current MongoDB container. Required. + :type redistribute_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_mongo_db_container_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB MongoDB container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current MongoDB container. Is either a model type or a IO type. Required. + :type redistribute_throughput_parameters: + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._mongo_db_container_redistribute_throughput_initial( + raw_result = await self._mongo_db_container_redistribute_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -1128,89 +2077,96 @@ async def begin_mongo_db_container_redistribute_throughput( redistribute_throughput_parameters=redistribute_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_mongo_db_container_redistribute_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput"} # type: ignore + begin_mongo_db_container_redistribute_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput"} # type: ignore @distributed_trace def list_mongo_db_collections( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.MongoDBCollectionListResult"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> AsyncIterable["_models.MongoDBCollectionGetResults"]: """Lists the MongoDB collection under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MongoDBCollectionListResult or the result of + :return: An iterator like instance of either MongoDBCollectionGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MongoDBCollectionListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoDBCollectionListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoDBCollectionListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_mongo_db_collections_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_mongo_db_collections.metadata['url'], + template_url=self.list_mongo_db_collections.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_mongo_db_collections_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1224,10 +2180,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1237,77 +2191,76 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_mongo_db_collections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections"} # type: ignore + list_mongo_db_collections.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections"} # type: ignore @distributed_trace_async async def get_mongo_db_collection( - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any - ) -> "_models.MongoDBCollectionGetResults": + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any + ) -> _models.MongoDBCollectionGetResults: """Gets the MongoDB collection under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: MongoDBCollectionGetResults, or the result of cls(response) + :return: MongoDBCollectionGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoDBCollectionGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoDBCollectionGetResults] - request = build_get_mongo_db_collection_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_mongo_db_collection.metadata['url'], + template_url=self.get_mongo_db_collection.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('MongoDBCollectionGetResults', pipeline_response) + deserialized = self._deserialize("MongoDBCollectionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_mongo_db_collection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore - + get_mongo_db_collection.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore async def _create_update_mongo_db_collection_initial( self, @@ -1315,39 +2268,55 @@ async def _create_update_mongo_db_collection_initial( account_name: str, database_name: str, collection_name: str, - create_update_mongo_db_collection_parameters: "_models.MongoDBCollectionCreateUpdateParameters", + create_update_mongo_db_collection_parameters: Union[_models.MongoDBCollectionCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.MongoDBCollectionGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MongoDBCollectionGetResults"]] + ) -> Optional[_models.MongoDBCollectionGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_mongo_db_collection_parameters, 'MongoDBCollectionCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.MongoDBCollectionGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_mongo_db_collection_parameters, (IO, bytes)): + _content = create_update_mongo_db_collection_parameters + else: + _json = self._serialize.body( + create_update_mongo_db_collection_parameters, "MongoDBCollectionCreateUpdateParameters" + ) - request = build_create_update_mongo_db_collection_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_mongo_db_collection_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_mongo_db_collection_initial.metadata['url'], + content=_content, + template_url=self._create_update_mongo_db_collection_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1356,15 +2325,103 @@ async def _create_update_mongo_db_collection_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MongoDBCollectionGetResults', pipeline_response) + deserialized = self._deserialize("MongoDBCollectionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_mongo_db_collection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore + _create_update_mongo_db_collection_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore + + @overload + async def begin_create_update_mongo_db_collection( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + create_update_mongo_db_collection_parameters: _models.MongoDBCollectionCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MongoDBCollectionGetResults]: + """Create or update an Azure Cosmos DB MongoDB Collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param create_update_mongo_db_collection_parameters: The parameters to provide for the current + MongoDB Collection. Required. + :type create_update_mongo_db_collection_parameters: + ~azure.mgmt.cosmosdb.models.MongoDBCollectionCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MongoDBCollectionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_mongo_db_collection( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + create_update_mongo_db_collection_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MongoDBCollectionGetResults]: + """Create or update an Azure Cosmos DB MongoDB Collection. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param create_update_mongo_db_collection_parameters: The parameters to provide for the current + MongoDB Collection. Required. + :type create_update_mongo_db_collection_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MongoDBCollectionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_mongo_db_collection( @@ -1373,23 +2430,27 @@ async def begin_create_update_mongo_db_collection( account_name: str, database_name: str, collection_name: str, - create_update_mongo_db_collection_parameters: "_models.MongoDBCollectionCreateUpdateParameters", + create_update_mongo_db_collection_parameters: Union[_models.MongoDBCollectionCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.MongoDBCollectionGetResults"]: + ) -> AsyncLROPoller[_models.MongoDBCollectionGetResults]: """Create or update an Azure Cosmos DB MongoDB Collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :param create_update_mongo_db_collection_parameters: The parameters to provide for the current - MongoDB Collection. + MongoDB Collection. Is either a model type or a IO type. Required. :type create_update_mongo_db_collection_parameters: - ~azure.mgmt.cosmosdb.models.MongoDBCollectionCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.MongoDBCollectionCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1402,19 +2463,19 @@ async def begin_create_update_mongo_db_collection( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoDBCollectionGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoDBCollectionGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_mongo_db_collection_initial( + raw_result = await self._create_update_mongo_db_collection_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -1422,67 +2483,71 @@ async def begin_create_update_mongo_db_collection( create_update_mongo_db_collection_parameters=create_update_mongo_db_collection_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('MongoDBCollectionGetResults', pipeline_response) + deserialized = self._deserialize("MongoDBCollectionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_mongo_db_collection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore + begin_create_update_mongo_db_collection.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore async def _delete_mongo_db_collection_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_mongo_db_collection_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_mongo_db_collection_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_mongo_db_collection_initial.metadata['url'], + template_url=self._delete_mongo_db_collection_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1492,27 +2557,22 @@ async def _delete_mongo_db_collection_initial( # pylint: disable=inconsistent-r if cls: return cls(pipeline_response, None, {}) - _delete_mongo_db_collection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore - + _delete_mongo_db_collection_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore @distributed_trace_async - async def begin_delete_mongo_db_collection( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any + async def begin_delete_mongo_db_collection( + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB MongoDB Collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1524,46 +2584,50 @@ async def begin_delete_mongo_db_collection( # pylint: disable=inconsistent-retu Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_mongo_db_collection_initial( + raw_result = await self._delete_mongo_db_collection_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_mongo_db_collection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore + begin_delete_mongo_db_collection.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore async def _list_mongo_db_collection_partition_merge_initial( self, @@ -1571,39 +2635,53 @@ async def _list_mongo_db_collection_partition_merge_initial( account_name: str, database_name: str, collection_name: str, - merge_parameters: "_models.MergeParameters", + merge_parameters: Union[_models.MergeParameters, IO], **kwargs: Any - ) -> Optional["_models.PhysicalPartitionStorageInfoCollection"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionStorageInfoCollection"]] + ) -> Optional[_models.PhysicalPartitionStorageInfoCollection]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(merge_parameters, 'MergeParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionStorageInfoCollection]] - request = build_list_mongo_db_collection_partition_merge_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(merge_parameters, (IO, bytes)): + _content = merge_parameters + else: + _json = self._serialize.body(merge_parameters, "MergeParameters") + + request = build_list_mongo_db_collection_partition_merge_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._list_mongo_db_collection_partition_merge_initial.metadata['url'], + content=_content, + template_url=self._list_mongo_db_collection_partition_merge_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1612,15 +2690,100 @@ async def _list_mongo_db_collection_partition_merge_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionStorageInfoCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _list_mongo_db_collection_partition_merge_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge"} # type: ignore + _list_mongo_db_collection_partition_merge_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge"} # type: ignore + + @overload + async def begin_list_mongo_db_collection_partition_merge( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + merge_parameters: _models.MergeParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionStorageInfoCollection]: + """Merges the partitions of a MongoDB Collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param merge_parameters: The parameters for the merge operation. Required. + :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionStorageInfoCollection or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_list_mongo_db_collection_partition_merge( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + merge_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionStorageInfoCollection]: + """Merges the partitions of a MongoDB Collection. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param merge_parameters: The parameters for the merge operation. Required. + :type merge_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionStorageInfoCollection or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_list_mongo_db_collection_partition_merge( @@ -1629,21 +2792,26 @@ async def begin_list_mongo_db_collection_partition_merge( account_name: str, database_name: str, collection_name: str, - merge_parameters: "_models.MergeParameters", + merge_parameters: Union[_models.MergeParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.PhysicalPartitionStorageInfoCollection"]: + ) -> AsyncLROPoller[_models.PhysicalPartitionStorageInfoCollection]: """Merges the partitions of a MongoDB Collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str - :param merge_parameters: The parameters for the merge operation. - :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters + :param merge_parameters: The parameters for the merge operation. Is either a model type or a IO + type. Required. + :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1656,19 +2824,19 @@ async def begin_list_mongo_db_collection_partition_merge( PhysicalPartitionStorageInfoCollection or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionStorageInfoCollection"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionStorageInfoCollection] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._list_mongo_db_collection_partition_merge_initial( + raw_result = await self._list_mongo_db_collection_partition_merge_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -1676,99 +2844,105 @@ async def begin_list_mongo_db_collection_partition_merge( merge_parameters=merge_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionStorageInfoCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_mongo_db_collection_partition_merge.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge"} # type: ignore + begin_list_mongo_db_collection_partition_merge.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge"} # type: ignore @distributed_trace_async async def get_mongo_db_collection_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_mongo_db_collection_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_mongo_db_collection_throughput.metadata['url'], + template_url=self.get_mongo_db_collection_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_mongo_db_collection_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default"} # type: ignore - + get_mongo_db_collection_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default"} # type: ignore async def _update_mongo_db_collection_throughput_initial( self, @@ -1776,39 +2950,53 @@ async def _update_mongo_db_collection_throughput_initial( account_name: str, database_name: str, collection_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_mongo_db_collection_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_mongo_db_collection_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_mongo_db_collection_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_mongo_db_collection_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1817,15 +3005,103 @@ async def _update_mongo_db_collection_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_mongo_db_collection_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default"} # type: ignore + _update_mongo_db_collection_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default"} # type: ignore + + @overload + async def begin_update_mongo_db_collection_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update the RUs per second of an Azure Cosmos DB MongoDB collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current MongoDB collection. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_mongo_db_collection_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update the RUs per second of an Azure Cosmos DB MongoDB collection. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current MongoDB collection. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_update_mongo_db_collection_throughput( @@ -1834,23 +3110,27 @@ async def begin_update_mongo_db_collection_throughput( account_name: str, database_name: str, collection_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Update the RUs per second of an Azure Cosmos DB MongoDB collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current MongoDB collection. + current MongoDB collection. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1863,19 +3143,19 @@ async def begin_update_mongo_db_collection_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_mongo_db_collection_throughput_initial( + raw_result = await self._update_mongo_db_collection_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -1883,67 +3163,71 @@ async def begin_update_mongo_db_collection_throughput( update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_mongo_db_collection_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default"} # type: ignore + begin_update_mongo_db_collection_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default"} # type: ignore async def _migrate_mongo_db_collection_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_mongo_db_collection_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_mongo_db_collection_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_mongo_db_collection_to_autoscale_initial.metadata['url'], + template_url=self._migrate_mongo_db_collection_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1952,34 +3236,29 @@ async def _migrate_mongo_db_collection_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_mongo_db_collection_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_mongo_db_collection_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace_async async def begin_migrate_mongo_db_collection_to_autoscale( - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1993,84 +3272,88 @@ async def begin_migrate_mongo_db_collection_to_autoscale( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_mongo_db_collection_to_autoscale_initial( + raw_result = await self._migrate_mongo_db_collection_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_mongo_db_collection_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_mongo_db_collection_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToAutoscale"} # type: ignore async def _migrate_mongo_db_collection_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_mongo_db_collection_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_mongo_db_collection_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_mongo_db_collection_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_mongo_db_collection_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2079,34 +3362,29 @@ async def _migrate_mongo_db_collection_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_mongo_db_collection_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_mongo_db_collection_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace_async async def begin_migrate_mongo_db_collection_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2120,150 +3398,171 @@ async def begin_migrate_mongo_db_collection_to_manual_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_mongo_db_collection_to_manual_throughput_initial( + raw_result = await self._migrate_mongo_db_collection_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_mongo_db_collection_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_mongo_db_collection_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace_async async def get_mongo_role_definition( - self, - mongo_role_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.MongoRoleDefinitionGetResults": + self, mongo_role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.MongoRoleDefinitionGetResults: """Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. - :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. + :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. Required. :type mongo_role_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: MongoRoleDefinitionGetResults, or the result of cls(response) + :return: MongoRoleDefinitionGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.MongoRoleDefinitionGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoRoleDefinitionGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoRoleDefinitionGetResults] - request = build_get_mongo_role_definition_request( mongo_role_definition_id=mongo_role_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_mongo_role_definition.metadata['url'], + template_url=self.get_mongo_role_definition.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('MongoRoleDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("MongoRoleDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_mongo_role_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore - + get_mongo_role_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore async def _create_update_mongo_role_definition_initial( self, mongo_role_definition_id: str, resource_group_name: str, account_name: str, - create_update_mongo_role_definition_parameters: "_models.MongoRoleDefinitionCreateUpdateParameters", + create_update_mongo_role_definition_parameters: Union[_models.MongoRoleDefinitionCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.MongoRoleDefinitionGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MongoRoleDefinitionGetResults"]] + ) -> Optional[_models.MongoRoleDefinitionGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_mongo_role_definition_parameters, 'MongoRoleDefinitionCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.MongoRoleDefinitionGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_mongo_role_definition_parameters, (IO, bytes)): + _content = create_update_mongo_role_definition_parameters + else: + _json = self._serialize.body( + create_update_mongo_role_definition_parameters, "MongoRoleDefinitionCreateUpdateParameters" + ) - request = build_create_update_mongo_role_definition_request_initial( + request = build_create_update_mongo_role_definition_request( mongo_role_definition_id=mongo_role_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_mongo_role_definition_initial.metadata['url'], + content=_content, + template_url=self._create_update_mongo_role_definition_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2272,15 +3571,97 @@ async def _create_update_mongo_role_definition_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MongoRoleDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("MongoRoleDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_mongo_role_definition_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore + _create_update_mongo_role_definition_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore + + @overload + async def begin_create_update_mongo_role_definition( + self, + mongo_role_definition_id: str, + resource_group_name: str, + account_name: str, + create_update_mongo_role_definition_parameters: _models.MongoRoleDefinitionCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MongoRoleDefinitionGetResults]: + """Creates or updates an Azure Cosmos DB Mongo Role Definition. + + :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. Required. + :type mongo_role_definition_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_mongo_role_definition_parameters: The properties required to create or + update a Role Definition. Required. + :type create_update_mongo_role_definition_parameters: + ~azure.mgmt.cosmosdb.models.MongoRoleDefinitionCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MongoRoleDefinitionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.MongoRoleDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_mongo_role_definition( + self, + mongo_role_definition_id: str, + resource_group_name: str, + account_name: str, + create_update_mongo_role_definition_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MongoRoleDefinitionGetResults]: + """Creates or updates an Azure Cosmos DB Mongo Role Definition. + :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. Required. + :type mongo_role_definition_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_mongo_role_definition_parameters: The properties required to create or + update a Role Definition. Required. + :type create_update_mongo_role_definition_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MongoRoleDefinitionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.MongoRoleDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_mongo_role_definition( @@ -2288,21 +3669,25 @@ async def begin_create_update_mongo_role_definition( mongo_role_definition_id: str, resource_group_name: str, account_name: str, - create_update_mongo_role_definition_parameters: "_models.MongoRoleDefinitionCreateUpdateParameters", + create_update_mongo_role_definition_parameters: Union[_models.MongoRoleDefinitionCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.MongoRoleDefinitionGetResults"]: + ) -> AsyncLROPoller[_models.MongoRoleDefinitionGetResults]: """Creates or updates an Azure Cosmos DB Mongo Role Definition. - :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. + :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. Required. :type mongo_role_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param create_update_mongo_role_definition_parameters: The properties required to create or - update a Role Definition. + update a Role Definition. Is either a model type or a IO type. Required. :type create_update_mongo_role_definition_parameters: - ~azure.mgmt.cosmosdb.models.MongoRoleDefinitionCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.MongoRoleDefinitionCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -2315,84 +3700,89 @@ async def begin_create_update_mongo_role_definition( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.MongoRoleDefinitionGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoRoleDefinitionGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoRoleDefinitionGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_mongo_role_definition_initial( + raw_result = await self._create_update_mongo_role_definition_initial( # type: ignore mongo_role_definition_id=mongo_role_definition_id, resource_group_name=resource_group_name, account_name=account_name, create_update_mongo_role_definition_parameters=create_update_mongo_role_definition_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('MongoRoleDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("MongoRoleDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_mongo_role_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore + begin_create_update_mongo_role_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore async def _delete_mongo_role_definition_initial( # pylint: disable=inconsistent-return-statements - self, - mongo_role_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + self, mongo_role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_mongo_role_definition_request_initial( + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_mongo_role_definition_request( mongo_role_definition_id=mongo_role_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_mongo_role_definition_initial.metadata['url'], + template_url=self._delete_mongo_role_definition_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -2402,24 +3792,20 @@ async def _delete_mongo_role_definition_initial( # pylint: disable=inconsistent if cls: return cls(pipeline_response, None, {}) - _delete_mongo_role_definition_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore - + _delete_mongo_role_definition_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore @distributed_trace_async - async def begin_delete_mongo_role_definition( # pylint: disable=inconsistent-return-statements - self, - mongo_role_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + async def begin_delete_mongo_role_definition( + self, mongo_role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB Mongo Role Definition. - :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. + :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. Required. :type mongo_role_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2431,97 +3817,105 @@ async def begin_delete_mongo_role_definition( # pylint: disable=inconsistent-re Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_mongo_role_definition_initial( + raw_result = await self._delete_mongo_role_definition_initial( # type: ignore mongo_role_definition_id=mongo_role_definition_id, resource_group_name=resource_group_name, account_name=account_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_mongo_role_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore + begin_delete_mongo_role_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore @distributed_trace def list_mongo_role_definitions( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.MongoRoleDefinitionListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.MongoRoleDefinitionGetResults"]: """Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MongoRoleDefinitionListResult or the result of + :return: An iterator like instance of either MongoRoleDefinitionGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MongoRoleDefinitionListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MongoRoleDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoRoleDefinitionListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoRoleDefinitionListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_mongo_role_definitions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_mongo_role_definitions.metadata['url'], + template_url=self.list_mongo_role_definitions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_mongo_role_definitions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -2535,10 +3929,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2548,112 +3940,128 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_mongo_role_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions"} # type: ignore + list_mongo_role_definitions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions"} # type: ignore @distributed_trace_async async def get_mongo_user_definition( - self, - mongo_user_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.MongoUserDefinitionGetResults": + self, mongo_user_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.MongoUserDefinitionGetResults: """Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. - :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. + :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. Required. :type mongo_user_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: MongoUserDefinitionGetResults, or the result of cls(response) + :return: MongoUserDefinitionGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.MongoUserDefinitionGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoUserDefinitionGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoUserDefinitionGetResults] - request = build_get_mongo_user_definition_request( mongo_user_definition_id=mongo_user_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_mongo_user_definition.metadata['url'], + template_url=self.get_mongo_user_definition.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('MongoUserDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("MongoUserDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_mongo_user_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore - + get_mongo_user_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore async def _create_update_mongo_user_definition_initial( self, mongo_user_definition_id: str, resource_group_name: str, account_name: str, - create_update_mongo_user_definition_parameters: "_models.MongoUserDefinitionCreateUpdateParameters", + create_update_mongo_user_definition_parameters: Union[_models.MongoUserDefinitionCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.MongoUserDefinitionGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MongoUserDefinitionGetResults"]] + ) -> Optional[_models.MongoUserDefinitionGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_mongo_user_definition_parameters, 'MongoUserDefinitionCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.MongoUserDefinitionGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_mongo_user_definition_parameters, (IO, bytes)): + _content = create_update_mongo_user_definition_parameters + else: + _json = self._serialize.body( + create_update_mongo_user_definition_parameters, "MongoUserDefinitionCreateUpdateParameters" + ) - request = build_create_update_mongo_user_definition_request_initial( + request = build_create_update_mongo_user_definition_request( mongo_user_definition_id=mongo_user_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_mongo_user_definition_initial.metadata['url'], + content=_content, + template_url=self._create_update_mongo_user_definition_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2662,15 +4070,97 @@ async def _create_update_mongo_user_definition_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MongoUserDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("MongoUserDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_mongo_user_definition_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore + _create_update_mongo_user_definition_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore + + @overload + async def begin_create_update_mongo_user_definition( + self, + mongo_user_definition_id: str, + resource_group_name: str, + account_name: str, + create_update_mongo_user_definition_parameters: _models.MongoUserDefinitionCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MongoUserDefinitionGetResults]: + """Creates or updates an Azure Cosmos DB Mongo User Definition. + + :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. Required. + :type mongo_user_definition_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_mongo_user_definition_parameters: The properties required to create or + update a User Definition. Required. + :type create_update_mongo_user_definition_parameters: + ~azure.mgmt.cosmosdb.models.MongoUserDefinitionCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MongoUserDefinitionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.MongoUserDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_mongo_user_definition( + self, + mongo_user_definition_id: str, + resource_group_name: str, + account_name: str, + create_update_mongo_user_definition_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MongoUserDefinitionGetResults]: + """Creates or updates an Azure Cosmos DB Mongo User Definition. + :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. Required. + :type mongo_user_definition_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_mongo_user_definition_parameters: The properties required to create or + update a User Definition. Required. + :type create_update_mongo_user_definition_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MongoUserDefinitionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.MongoUserDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_mongo_user_definition( @@ -2678,21 +4168,25 @@ async def begin_create_update_mongo_user_definition( mongo_user_definition_id: str, resource_group_name: str, account_name: str, - create_update_mongo_user_definition_parameters: "_models.MongoUserDefinitionCreateUpdateParameters", + create_update_mongo_user_definition_parameters: Union[_models.MongoUserDefinitionCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.MongoUserDefinitionGetResults"]: + ) -> AsyncLROPoller[_models.MongoUserDefinitionGetResults]: """Creates or updates an Azure Cosmos DB Mongo User Definition. - :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. + :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. Required. :type mongo_user_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param create_update_mongo_user_definition_parameters: The properties required to create or - update a User Definition. + update a User Definition. Is either a model type or a IO type. Required. :type create_update_mongo_user_definition_parameters: - ~azure.mgmt.cosmosdb.models.MongoUserDefinitionCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.MongoUserDefinitionCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -2705,84 +4199,89 @@ async def begin_create_update_mongo_user_definition( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.MongoUserDefinitionGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoUserDefinitionGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoUserDefinitionGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_mongo_user_definition_initial( + raw_result = await self._create_update_mongo_user_definition_initial( # type: ignore mongo_user_definition_id=mongo_user_definition_id, resource_group_name=resource_group_name, account_name=account_name, create_update_mongo_user_definition_parameters=create_update_mongo_user_definition_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('MongoUserDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("MongoUserDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_mongo_user_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore + begin_create_update_mongo_user_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore async def _delete_mongo_user_definition_initial( # pylint: disable=inconsistent-return-statements - self, - mongo_user_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + self, mongo_user_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_mongo_user_definition_request_initial( + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_mongo_user_definition_request( mongo_user_definition_id=mongo_user_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_mongo_user_definition_initial.metadata['url'], + template_url=self._delete_mongo_user_definition_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -2792,24 +4291,20 @@ async def _delete_mongo_user_definition_initial( # pylint: disable=inconsistent if cls: return cls(pipeline_response, None, {}) - _delete_mongo_user_definition_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore - + _delete_mongo_user_definition_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore @distributed_trace_async - async def begin_delete_mongo_user_definition( # pylint: disable=inconsistent-return-statements - self, - mongo_user_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + async def begin_delete_mongo_user_definition( + self, mongo_user_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB Mongo User Definition. - :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. + :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. Required. :type mongo_user_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2821,97 +4316,105 @@ async def begin_delete_mongo_user_definition( # pylint: disable=inconsistent-re Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_mongo_user_definition_initial( + raw_result = await self._delete_mongo_user_definition_initial( # type: ignore mongo_user_definition_id=mongo_user_definition_id, resource_group_name=resource_group_name, account_name=account_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_mongo_user_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore + begin_delete_mongo_user_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore @distributed_trace def list_mongo_user_definitions( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.MongoUserDefinitionListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.MongoUserDefinitionGetResults"]: """Retrieves the list of all Azure Cosmos DB Mongo User Definition. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MongoUserDefinitionListResult or the result of + :return: An iterator like instance of either MongoUserDefinitionGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MongoUserDefinitionListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.MongoUserDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoUserDefinitionListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoUserDefinitionListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_mongo_user_definitions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_mongo_user_definitions.metadata['url'], + template_url=self.list_mongo_user_definitions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_mongo_user_definitions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -2925,10 +4428,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2938,11 +4439,9 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_mongo_user_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions"} # type: ignore + list_mongo_user_definitions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions"} # type: ignore async def _retrieve_continuous_backup_information_initial( self, @@ -2950,39 +4449,53 @@ async def _retrieve_continuous_backup_information_initial( account_name: str, database_name: str, collection_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> Optional["_models.BackupInformation"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupInformation"]] + ) -> Optional[_models.BackupInformation]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(location, 'ContinuousBackupRestoreLocation') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.BackupInformation]] - request = build_retrieve_continuous_backup_information_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(location, (IO, bytes)): + _content = location + else: + _json = self._serialize.body(location, "ContinuousBackupRestoreLocation") + + request = build_retrieve_continuous_backup_information_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._retrieve_continuous_backup_information_initial.metadata['url'], + content=_content, + template_url=self._retrieve_continuous_backup_information_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2991,15 +4504,98 @@ async def _retrieve_continuous_backup_information_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _retrieve_continuous_backup_information_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation"} # type: ignore + _retrieve_continuous_backup_information_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation"} # type: ignore + + @overload + async def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + location: _models.ContinuousBackupRestoreLocation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a Mongodb collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + location: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a Mongodb collection. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_retrieve_continuous_backup_information( @@ -3008,21 +4604,26 @@ async def begin_retrieve_continuous_backup_information( account_name: str, database_name: str, collection_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.BackupInformation"]: + ) -> AsyncLROPoller[_models.BackupInformation]: """Retrieves continuous backup information for a Mongodb collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str - :param location: The name of the continuous backup restore location. - :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :param location: The name of the continuous backup restore location. Is either a model type or + a IO type. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -3034,19 +4635,19 @@ async def begin_retrieve_continuous_backup_information( :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupInformation] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._retrieve_continuous_backup_information_initial( + raw_result = await self._retrieve_continuous_backup_information_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -3054,29 +4655,34 @@ async def begin_retrieve_continuous_backup_information( location=location, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_retrieve_continuous_backup_information.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation"} # type: ignore + begin_retrieve_continuous_backup_information.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_notebook_workspaces_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_notebook_workspaces_operations.py index 11238ab2218..4bfe9187f7c 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_notebook_workspaces_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_notebook_workspaces_operations.py @@ -6,98 +6,116 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._vendor import _convert_request -from ...operations._notebook_workspaces_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_by_database_account_request, build_list_connection_info_request, build_regenerate_auth_token_request_initial, build_start_request_initial -T = TypeVar('T') +from ...operations._notebook_workspaces_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_by_database_account_request, + build_list_connection_info_request, + build_regenerate_auth_token_request, + build_start_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class NotebookWorkspacesOperations: - """NotebookWorkspacesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class NotebookWorkspacesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`notebook_workspaces` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_database_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.NotebookWorkspaceListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.NotebookWorkspace"]: """Gets the notebook workspace resources of an existing Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NotebookWorkspaceListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.NotebookWorkspaceListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either NotebookWorkspace or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.NotebookWorkspace] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.NotebookWorkspaceListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookWorkspaceListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_database_account.metadata['url'], + template_url=self.list_by_database_account.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -111,10 +129,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -125,11 +141,9 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_database_account.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces"} # type: ignore + list_by_database_account.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces"} # type: ignore @distributed_trace_async async def get( @@ -138,45 +152,53 @@ async def get( account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any - ) -> "_models.NotebookWorkspace": + ) -> _models.NotebookWorkspace: """Gets the notebook workspace for a Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param notebook_workspace_name: The name of the notebook workspace resource. + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName :keyword callable cls: A custom type or function that will be passed the direct response - :return: NotebookWorkspace, or the result of cls(response) + :return: NotebookWorkspace or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.NotebookWorkspace - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookWorkspace"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.NotebookWorkspace] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: @@ -184,68 +206,164 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('NotebookWorkspace', pipeline_response) + deserialized = self._deserialize("NotebookWorkspace", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], - notebook_create_update_parameters: "_models.NotebookWorkspaceCreateUpdateParameters", + notebook_create_update_parameters: Union[_models.NotebookWorkspaceCreateUpdateParameters, IO], **kwargs: Any - ) -> "_models.NotebookWorkspace": - cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookWorkspace"] + ) -> _models.NotebookWorkspace: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(notebook_create_update_parameters, 'NotebookWorkspaceCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.NotebookWorkspace] - request = build_create_or_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(notebook_create_update_parameters, (IO, bytes)): + _content = notebook_create_update_parameters + else: + _json = self._serialize.body(notebook_create_update_parameters, "NotebookWorkspaceCreateUpdateParameters") + + request = build_create_or_update_request( resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_or_update_initial.metadata['url'], + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('NotebookWorkspace', pipeline_response) + deserialized = self._deserialize("NotebookWorkspace", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], + notebook_create_update_parameters: _models.NotebookWorkspaceCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NotebookWorkspace]: + """Creates the notebook workspace for a Cosmos DB account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. + :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName + :param notebook_create_update_parameters: The notebook workspace to create for the current + database account. Required. + :type notebook_create_update_parameters: + ~azure.mgmt.cosmosdb.models.NotebookWorkspaceCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either NotebookWorkspace or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.NotebookWorkspace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], + notebook_create_update_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NotebookWorkspace]: + """Creates the notebook workspace for a Cosmos DB account. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. + :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName + :param notebook_create_update_parameters: The notebook workspace to create for the current + database account. Required. + :type notebook_create_update_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either NotebookWorkspace or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.NotebookWorkspace] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_or_update( @@ -253,21 +371,26 @@ async def begin_create_or_update( resource_group_name: str, account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], - notebook_create_update_parameters: "_models.NotebookWorkspaceCreateUpdateParameters", + notebook_create_update_parameters: Union[_models.NotebookWorkspaceCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.NotebookWorkspace"]: + ) -> AsyncLROPoller[_models.NotebookWorkspace]: """Creates the notebook workspace for a Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param notebook_workspace_name: The name of the notebook workspace resource. + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName :param notebook_create_update_parameters: The notebook workspace to create for the current - database account. + database account. Is either a model type or a IO type. Required. :type notebook_create_update_parameters: - ~azure.mgmt.cosmosdb.models.NotebookWorkspaceCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.NotebookWorkspaceCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -279,51 +402,54 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either NotebookWorkspace or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.NotebookWorkspace] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookWorkspace"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.NotebookWorkspace] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._create_or_update_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, notebook_create_update_parameters=notebook_create_update_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('NotebookWorkspace', pipeline_response) + deserialized = self._deserialize("NotebookWorkspace", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore async def _delete_initial( # pylint: disable=inconsistent-return-statements self, @@ -332,45 +458,51 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_request( resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements + async def begin_delete( self, resource_group_name: str, account_name: str, @@ -380,10 +512,12 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements """Deletes the notebook workspace for a Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param notebook_workspace_name: The name of the notebook workspace resource. + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -395,45 +529,49 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._delete_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore @distributed_trace_async async def list_connection_info( @@ -442,45 +580,53 @@ async def list_connection_info( account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any - ) -> "_models.NotebookWorkspaceConnectionInfoResult": + ) -> _models.NotebookWorkspaceConnectionInfoResult: """Retrieves the connection info for the notebook workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param notebook_workspace_name: The name of the notebook workspace resource. + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName :keyword callable cls: A custom type or function that will be passed the direct response - :return: NotebookWorkspaceConnectionInfoResult, or the result of cls(response) + :return: NotebookWorkspaceConnectionInfoResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.NotebookWorkspaceConnectionInfoResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookWorkspaceConnectionInfoResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.NotebookWorkspaceConnectionInfoResult] - request = build_list_connection_info_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_connection_info.metadata['url'], + template_url=self.list_connection_info.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: @@ -488,15 +634,14 @@ async def list_connection_info( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('NotebookWorkspaceConnectionInfoResult', pipeline_response) + deserialized = self._deserialize("NotebookWorkspaceConnectionInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_connection_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/listConnectionInfo"} # type: ignore - + list_connection_info.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/listConnectionInfo"} # type: ignore async def _regenerate_auth_token_initial( # pylint: disable=inconsistent-return-statements self, @@ -505,45 +650,51 @@ async def _regenerate_auth_token_initial( # pylint: disable=inconsistent-return notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_regenerate_auth_token_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_regenerate_auth_token_request( resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._regenerate_auth_token_initial.metadata['url'], + template_url=self._regenerate_auth_token_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _regenerate_auth_token_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken"} # type: ignore - + _regenerate_auth_token_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken"} # type: ignore @distributed_trace_async - async def begin_regenerate_auth_token( # pylint: disable=inconsistent-return-statements + async def begin_regenerate_auth_token( self, resource_group_name: str, account_name: str, @@ -553,10 +704,12 @@ async def begin_regenerate_auth_token( # pylint: disable=inconsistent-return-st """Regenerates the auth token for the notebook workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param notebook_workspace_name: The name of the notebook workspace resource. + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -568,45 +721,49 @@ async def begin_regenerate_auth_token( # pylint: disable=inconsistent-return-st Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._regenerate_auth_token_initial( + raw_result = await self._regenerate_auth_token_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_regenerate_auth_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken"} # type: ignore + begin_regenerate_auth_token.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken"} # type: ignore async def _start_initial( # pylint: disable=inconsistent-return-statements self, @@ -615,45 +772,51 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_start_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_start_request( resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._start_initial.metadata['url'], + template_url=self._start_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _start_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start"} # type: ignore - + _start_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start"} # type: ignore @distributed_trace_async - async def begin_start( # pylint: disable=inconsistent-return-statements + async def begin_start( self, resource_group_name: str, account_name: str, @@ -663,10 +826,12 @@ async def begin_start( # pylint: disable=inconsistent-return-statements """Starts the notebook workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param notebook_workspace_name: The name of the notebook workspace resource. + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -678,42 +843,46 @@ async def begin_start( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._start_initial( + raw_result = await self._start_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start"} # type: ignore + begin_start.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_operations.py index 23bdb87e132..dd6fd621221 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_operations.py @@ -7,81 +7,94 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class Operations: - """Operations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`operations` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list( - self, - **kwargs: Any - ) -> AsyncIterable["_models.OperationListResult"]: + def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: """Lists all of the available Cosmos DB Resource Provider operations. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.OperationListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Operation or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.OperationListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -95,10 +108,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -108,8 +119,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/providers/Microsoft.DocumentDB/operations"} # type: ignore + list.metadata = {"url": "/providers/Microsoft.DocumentDB/operations"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_partition_key_range_id_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_partition_key_range_id_operations.py index d5c7eb96fe7..f21b1e256de 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_partition_key_range_id_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_partition_key_range_id_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._partition_key_range_id_operations import build_list_metrics_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PartitionKeyRangeIdOperations: - """PartitionKeyRangeIdOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class PartitionKeyRangeIdOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`partition_key_range_id` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -54,69 +62,70 @@ def list_metrics( partition_key_range_id: str, filter: str, **kwargs: Any - ) -> AsyncIterable["_models.PartitionMetricListResult"]: + ) -> AsyncIterable["_models.PartitionMetric"]: """Retrieves the metrics determined by the given filter for the given partition key range id. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str - :param partition_key_range_id: Partition Key Range Id for which to get data. + :param partition_key_range_id: Partition Key Range Id for which to get data. Required. :type partition_key_range_id: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartitionMetricListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PartitionMetric or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PartitionMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, collection_rid=collection_rid, partition_key_range_id=partition_key_range_id, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, - partition_key_range_id=partition_key_range_id, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -130,10 +139,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -143,8 +150,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_partition_key_range_id_region_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_partition_key_range_id_region_operations.py index b1079a66d8d..7b53497ac65 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_partition_key_range_id_region_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_partition_key_range_id_region_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._partition_key_range_id_region_operations import build_list_metrics_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PartitionKeyRangeIdRegionOperations: - """PartitionKeyRangeIdRegionOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class PartitionKeyRangeIdRegionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`partition_key_range_id_region` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -55,74 +63,74 @@ def list_metrics( partition_key_range_id: str, filter: str, **kwargs: Any - ) -> AsyncIterable["_models.PartitionMetricListResult"]: + ) -> AsyncIterable["_models.PartitionMetric"]: """Retrieves the metrics determined by the given filter for the given partition key range id and region. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param region: Cosmos DB region, with spaces between words and each word capitalized. + :param region: Cosmos DB region, with spaces between words and each word capitalized. Required. :type region: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str - :param partition_key_range_id: Partition Key Range Id for which to get data. + :param partition_key_range_id: Partition Key Range Id for which to get data. Required. :type partition_key_range_id: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartitionMetricListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PartitionMetric or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PartitionMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, region=region, database_rid=database_rid, collection_rid=collection_rid, partition_key_range_id=partition_key_range_id, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - region=region, - database_rid=database_rid, - collection_rid=collection_rid, - partition_key_range_id=partition_key_range_id, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -136,10 +144,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -149,8 +155,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_patch.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_patch.py new file mode 100644 index 00000000000..f7dd3251033 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_percentile_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_percentile_operations.py index 2ef279a66c9..0edc259991d 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_percentile_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_percentile_operations.py @@ -7,102 +7,110 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._percentile_operations import build_list_metrics_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PercentileOperations: - """PercentileOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class PercentileOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`percentile` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( - self, - resource_group_name: str, - account_name: str, - filter: str, - **kwargs: Any - ) -> AsyncIterable["_models.PercentileMetricListResult"]: + self, resource_group_name: str, account_name: str, filter: str, **kwargs: Any + ) -> AsyncIterable["_models.PercentileMetric"]: """Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PercentileMetricListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PercentileMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PercentileMetric or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PercentileMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PercentileMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PercentileMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -116,10 +124,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -129,8 +135,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_percentile_source_target_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_percentile_source_target_operations.py index a01727d4503..7e1e86d76ab 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_percentile_source_target_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_percentile_source_target_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._percentile_source_target_operations import build_list_metrics_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PercentileSourceTargetOperations: - """PercentileSourceTargetOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class PercentileSourceTargetOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`percentile_source_target` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -53,68 +61,70 @@ def list_metrics( target_region: str, filter: str, **kwargs: Any - ) -> AsyncIterable["_models.PercentileMetricListResult"]: + ) -> AsyncIterable["_models.PercentileMetric"]: """Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param source_region: Source region from which data is written. Cosmos DB region, with spaces - between words and each word capitalized. + between words and each word capitalized. Required. :type source_region: str :param target_region: Target region to which data is written. Cosmos DB region, with spaces - between words and each word capitalized. + between words and each word capitalized. Required. :type target_region: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PercentileMetricListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PercentileMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PercentileMetric or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PercentileMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PercentileMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PercentileMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, source_region=source_region, target_region=target_region, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - source_region=source_region, - target_region=target_region, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -128,10 +138,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -141,8 +149,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_percentile_target_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_percentile_target_operations.py index d00fca003cd..b1b67ef9b7b 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_percentile_target_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_percentile_target_operations.py @@ -7,108 +7,114 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._percentile_target_operations import build_list_metrics_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PercentileTargetOperations: - """PercentileTargetOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class PercentileTargetOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`percentile_target` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( - self, - resource_group_name: str, - account_name: str, - target_region: str, - filter: str, - **kwargs: Any - ) -> AsyncIterable["_models.PercentileMetricListResult"]: + self, resource_group_name: str, account_name: str, target_region: str, filter: str, **kwargs: Any + ) -> AsyncIterable["_models.PercentileMetric"]: """Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param target_region: Target region to which data is written. Cosmos DB region, with spaces - between words and each word capitalized. + between words and each word capitalized. Required. :type target_region: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PercentileMetricListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PercentileMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PercentileMetric or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PercentileMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PercentileMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PercentileMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, target_region=target_region, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - target_region=target_region, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -122,10 +128,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -135,8 +139,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_private_endpoint_connections_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_private_endpoint_connections_operations.py index b42a347a217..0ddb00080e7 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_private_endpoint_connections_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_private_endpoint_connections_operations.py @@ -6,98 +6,115 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._vendor import _convert_request -from ...operations._private_endpoint_connections_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_by_database_account_request -T = TypeVar('T') +from ...operations._private_endpoint_connections_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_by_database_account_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PrivateEndpointConnectionsOperations: - """PrivateEndpointConnectionsOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`private_endpoint_connections` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_database_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointConnection"]: """List all private endpoint connections on a Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result - of cls(response) + :return: An iterator like instance of either PrivateEndpointConnection or the result of + cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PrivateEndpointConnectionListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PrivateEndpointConnectionListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_database_account.metadata['url'], + template_url=self.list_by_database_account.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -111,10 +128,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -124,128 +139,222 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_database_account.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections"} # type: ignore + list_by_database_account.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get( - self, - resource_group_name: str, - account_name: str, - private_endpoint_connection_name: str, - **kwargs: Any - ) -> "_models.PrivateEndpointConnection": + self, resource_group_name: str, account_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: """Gets a private endpoint connection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PrivateEndpointConnection, or the result of cls(response) + :return: PrivateEndpointConnection or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.PrivateEndpointConnection - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PrivateEndpointConnection] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, account_name: str, private_endpoint_connection_name: str, - parameters: "_models.PrivateEndpointConnection", + parameters: Union[_models.PrivateEndpointConnection, IO], **kwargs: Any - ) -> Optional["_models.PrivateEndpointConnection"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] + ) -> Optional[_models.PrivateEndpointConnection]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(parameters, 'PrivateEndpointConnection') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PrivateEndpointConnection]] - request = build_create_or_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "PrivateEndpointConnection") + + request = build_create_or_update_request( resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_or_update_initial.metadata['url'], + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + private_endpoint_connection_name: str, + parameters: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: Required. + :type parameters: ~azure.mgmt.cosmosdb.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + private_endpoint_connection_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Approve or reject a private endpoint connection with a given name. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_or_update( @@ -253,19 +362,23 @@ async def begin_create_or_update( resource_group_name: str, account_name: str, private_endpoint_connection_name: str, - parameters: "_models.PrivateEndpointConnection", + parameters: Union[_models.PrivateEndpointConnection, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: """Approve or reject a private endpoint connection with a given name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: - :type parameters: ~azure.mgmt.cosmosdb.models.PrivateEndpointConnection + :param parameters: Is either a model type or a IO type. Required. + :type parameters: ~azure.mgmt.cosmosdb.models.PrivateEndpointConnection or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -278,111 +391,113 @@ async def begin_create_or_update( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PrivateEndpointConnection] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._create_or_update_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, parameters=parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - private_endpoint_connection_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_request( resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - private_endpoint_connection_name: str, - **kwargs: Any + async def begin_delete( + self, resource_group_name: str, account_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a private endpoint connection with a given name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -394,42 +509,46 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._delete_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_private_link_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_private_link_resources_operations.py index 1d19c4fd44a..e4237da28da 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_private_link_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_private_link_resources_operations.py @@ -7,95 +7,106 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._private_link_resources_operations import build_get_request, build_list_by_database_account_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PrivateLinkResourcesOperations: - """PrivateLinkResourcesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class PrivateLinkResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`private_link_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_database_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.PrivateLinkResource"]: """Gets the private link resources that need to be created for a Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PrivateLinkResourceListResult or the result of - cls(response) + :return: An iterator like instance of either PrivateLinkResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PrivateLinkResourceListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.PrivateLinkResource] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PrivateLinkResourceListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_database_account.metadata['url'], + template_url=self.list_by_database_account.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -109,10 +120,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -122,70 +131,70 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_database_account.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources"} # type: ignore + list_by_database_account.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources"} # type: ignore @distributed_trace_async async def get( - self, - resource_group_name: str, - account_name: str, - group_name: str, - **kwargs: Any - ) -> "_models.PrivateLinkResource": + self, resource_group_name: str, account_name: str, group_name: str, **kwargs: Any + ) -> _models.PrivateLinkResource: """Gets the private link resources that need to be created for a Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param group_name: The name of the private link resource. + :param group_name: The name of the private link resource. Required. :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PrivateLinkResource, or the result of cls(response) + :return: PrivateLinkResource or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.PrivateLinkResource - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PrivateLinkResource] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, group_name=group_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + deserialized = self._deserialize("PrivateLinkResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources/{groupName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources/{groupName}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_database_accounts_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_database_accounts_operations.py index ac77a557835..7bfbdf8db6c 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_database_accounts_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_database_accounts_operations.py @@ -7,92 +7,110 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request -from ...operations._restorable_database_accounts_operations import build_get_by_location_request, build_list_by_location_request, build_list_request -T = TypeVar('T') +from ...operations._restorable_database_accounts_operations import ( + build_get_by_location_request, + build_list_by_location_request, + build_list_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RestorableDatabaseAccountsOperations: - """RestorableDatabaseAccountsOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class RestorableDatabaseAccountsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`restorable_database_accounts` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_location( - self, - location: str, - **kwargs: Any - ) -> AsyncIterable["_models.RestorableDatabaseAccountsListResult"]: + self, location: str, **kwargs: Any + ) -> AsyncIterable["_models.RestorableDatabaseAccountGetResult"]: """Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableDatabaseAccountsListResult or the result + :return: An iterator like instance of either RestorableDatabaseAccountGetResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableDatabaseAccountsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableDatabaseAccountsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_location_request( - subscription_id=self._config.subscription_id, location=location, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_location.metadata['url'], + template_url=self.list_by_location.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_location_request( - subscription_id=self._config.subscription_id, - location=location, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -106,10 +124,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -119,54 +135,57 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts"} # type: ignore + list_by_location.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts"} # type: ignore @distributed_trace - def list( - self, - **kwargs: Any - ) -> AsyncIterable["_models.RestorableDatabaseAccountsListResult"]: + def list(self, **kwargs: Any) -> AsyncIterable["_models.RestorableDatabaseAccountGetResult"]: """Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableDatabaseAccountsListResult or the result + :return: An iterator like instance of either RestorableDatabaseAccountGetResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableDatabaseAccountsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableDatabaseAccountsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -180,10 +199,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -193,67 +210,68 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts"} # type: ignore @distributed_trace_async async def get_by_location( - self, - location: str, - instance_id: str, - **kwargs: Any - ) -> "_models.RestorableDatabaseAccountGetResult": + self, location: str, instance_id: str, **kwargs: Any + ) -> _models.RestorableDatabaseAccountGetResult: """Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RestorableDatabaseAccountGetResult, or the result of cls(response) + :return: RestorableDatabaseAccountGetResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountGetResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableDatabaseAccountGetResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableDatabaseAccountGetResult] - request = build_get_by_location_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_by_location.metadata['url'], + template_url=self.get_by_location.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RestorableDatabaseAccountGetResult', pipeline_response) + deserialized = self._deserialize("RestorableDatabaseAccountGetResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}"} # type: ignore - + get_by_location.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_gremlin_databases_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_gremlin_databases_operations.py index c7702c4ad09..3c1ea155a8a 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_gremlin_databases_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_gremlin_databases_operations.py @@ -7,97 +7,109 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._restorable_gremlin_databases_operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RestorableGremlinDatabasesOperations: - """RestorableGremlinDatabasesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class RestorableGremlinDatabasesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`restorable_gremlin_databases` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( - self, - location: str, - instance_id: str, - **kwargs: Any - ) -> AsyncIterable["_models.RestorableGremlinDatabasesListResult"]: + self, location: str, instance_id: str, **kwargs: Any + ) -> AsyncIterable["_models.RestorableGremlinDatabaseGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableGremlinDatabasesListResult or the result + :return: An iterator like instance of either RestorableGremlinDatabaseGetResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableGremlinDatabasesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableGremlinDatabaseGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableGremlinDatabasesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableGremlinDatabasesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -111,10 +123,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -124,8 +134,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinDatabases"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinDatabases"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_gremlin_graphs_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_gremlin_graphs_operations.py index 9cda2dba068..cbb9ee94241 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_gremlin_graphs_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_gremlin_graphs_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._restorable_gremlin_graphs_operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RestorableGremlinGraphsOperations: - """RestorableGremlinGraphsOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class RestorableGremlinGraphsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`restorable_gremlin_graphs` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -53,14 +61,15 @@ def list( start_time: Optional[str] = None, end_time: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.RestorableGremlinGraphsListResult"]: + ) -> AsyncIterable["_models.RestorableGremlinGraphGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restorable_gremlin_database_rid: The resource ID of the Gremlin database. Default value is None. @@ -70,49 +79,52 @@ def list( :param end_time: Restorable Gremlin graphs event feed end time. Default value is None. :type end_time: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableGremlinGraphsListResult or the result of + :return: An iterator like instance of either RestorableGremlinGraphGetResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableGremlinGraphsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableGremlinGraphGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableGremlinGraphsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableGremlinGraphsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restorable_gremlin_database_rid=restorable_gremlin_database_rid, start_time=start_time, end_time=end_time, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restorable_gremlin_database_rid=restorable_gremlin_database_rid, - start_time=start_time, - end_time=end_time, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -126,10 +138,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -139,8 +149,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGraphs"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGraphs"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_gremlin_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_gremlin_resources_operations.py index 76ba9c3fcd6..d0a357a5c55 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_gremlin_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_gremlin_resources_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._restorable_gremlin_resources_operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RestorableGremlinResourcesOperations: - """RestorableGremlinResourcesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class RestorableGremlinResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`restorable_gremlin_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -52,15 +60,16 @@ def list( restore_location: Optional[str] = None, restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.RestorableGremlinResourcesListResult"]: + ) -> AsyncIterable["_models.RestorableGremlinResourcesGetResult"]: """Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restore_location: The location where the restorable resources are located. Default value is None. @@ -69,47 +78,51 @@ def list( value is None. :type restore_timestamp_in_utc: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableGremlinResourcesListResult or the result + :return: An iterator like instance of either RestorableGremlinResourcesGetResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableGremlinResourcesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableGremlinResourcesGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableGremlinResourcesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableGremlinResourcesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restore_location=restore_location, restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restore_location=restore_location, - restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -123,10 +136,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -136,8 +147,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_mongodb_collections_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_mongodb_collections_operations.py index 02cd880d423..d79c09e0dd5 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_mongodb_collections_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_mongodb_collections_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._restorable_mongodb_collections_operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RestorableMongodbCollectionsOperations: - """RestorableMongodbCollectionsOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class RestorableMongodbCollectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`restorable_mongodb_collections` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -53,14 +61,15 @@ def list( start_time: Optional[str] = None, end_time: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.RestorableMongodbCollectionsListResult"]: + ) -> AsyncIterable["_models.RestorableMongodbCollectionGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restorable_mongodb_database_rid: The resource ID of the MongoDB database. Default value is None. @@ -70,49 +79,52 @@ def list( :param end_time: Restorable MongoDB collections event feed end time. Default value is None. :type end_time: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableMongodbCollectionsListResult or the - result of cls(response) + :return: An iterator like instance of either RestorableMongodbCollectionGetResult or the result + of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbCollectionsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbCollectionGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableMongodbCollectionsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableMongodbCollectionsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restorable_mongodb_database_rid=restorable_mongodb_database_rid, start_time=start_time, end_time=end_time, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restorable_mongodb_database_rid=restorable_mongodb_database_rid, - start_time=start_time, - end_time=end_time, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -126,10 +138,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -139,8 +149,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_mongodb_databases_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_mongodb_databases_operations.py index 39595f17c96..9519912b4ea 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_mongodb_databases_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_mongodb_databases_operations.py @@ -7,97 +7,109 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._restorable_mongodb_databases_operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RestorableMongodbDatabasesOperations: - """RestorableMongodbDatabasesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class RestorableMongodbDatabasesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`restorable_mongodb_databases` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( - self, - location: str, - instance_id: str, - **kwargs: Any - ) -> AsyncIterable["_models.RestorableMongodbDatabasesListResult"]: + self, location: str, instance_id: str, **kwargs: Any + ) -> AsyncIterable["_models.RestorableMongodbDatabaseGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableMongodbDatabasesListResult or the result + :return: An iterator like instance of either RestorableMongodbDatabaseGetResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbDatabasesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbDatabaseGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableMongodbDatabasesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableMongodbDatabasesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -111,10 +123,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -124,8 +134,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_mongodb_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_mongodb_resources_operations.py index 89d4c00793f..b768abb215a 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_mongodb_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_mongodb_resources_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._restorable_mongodb_resources_operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RestorableMongodbResourcesOperations: - """RestorableMongodbResourcesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class RestorableMongodbResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`restorable_mongodb_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -52,15 +60,16 @@ def list( restore_location: Optional[str] = None, restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.RestorableMongodbResourcesListResult"]: + ) -> AsyncIterable["_models.RestorableMongodbResourcesGetResult"]: """Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restore_location: The location where the restorable resources are located. Default value is None. @@ -69,47 +78,51 @@ def list( value is None. :type restore_timestamp_in_utc: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableMongodbResourcesListResult or the result + :return: An iterator like instance of either RestorableMongodbResourcesGetResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbResourcesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbResourcesGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableMongodbResourcesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableMongodbResourcesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restore_location=restore_location, restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restore_location=restore_location, - restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -123,10 +136,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -136,8 +147,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_sql_containers_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_sql_containers_operations.py index 6307a7132ee..a409e42bdbb 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_sql_containers_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_sql_containers_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._restorable_sql_containers_operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RestorableSqlContainersOperations: - """RestorableSqlContainersOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class RestorableSqlContainersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`restorable_sql_containers` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -53,14 +61,15 @@ def list( start_time: Optional[str] = None, end_time: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.RestorableSqlContainersListResult"]: + ) -> AsyncIterable["_models.RestorableSqlContainerGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restorable_sql_database_rid: The resource ID of the SQL database. Default value is None. :type restorable_sql_database_rid: str @@ -69,49 +78,52 @@ def list( :param end_time: Restorable Sql containers event feed end time. Default value is None. :type end_time: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableSqlContainersListResult or the result of + :return: An iterator like instance of either RestorableSqlContainerGetResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableSqlContainersListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableSqlContainerGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableSqlContainersListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableSqlContainersListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restorable_sql_database_rid=restorable_sql_database_rid, start_time=start_time, end_time=end_time, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restorable_sql_database_rid=restorable_sql_database_rid, - start_time=start_time, - end_time=end_time, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -125,10 +137,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -138,8 +148,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_sql_databases_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_sql_databases_operations.py index db97f8f67ab..79373f22a0f 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_sql_databases_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_sql_databases_operations.py @@ -7,97 +7,109 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._restorable_sql_databases_operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RestorableSqlDatabasesOperations: - """RestorableSqlDatabasesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class RestorableSqlDatabasesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`restorable_sql_databases` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( - self, - location: str, - instance_id: str, - **kwargs: Any - ) -> AsyncIterable["_models.RestorableSqlDatabasesListResult"]: + self, location: str, instance_id: str, **kwargs: Any + ) -> AsyncIterable["_models.RestorableSqlDatabaseGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableSqlDatabasesListResult or the result of + :return: An iterator like instance of either RestorableSqlDatabaseGetResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableSqlDatabasesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableSqlDatabaseGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableSqlDatabasesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableSqlDatabasesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -111,10 +123,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -124,8 +134,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_sql_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_sql_resources_operations.py index 1d417d1adea..c9ebbef2e05 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_sql_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_sql_resources_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._restorable_sql_resources_operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RestorableSqlResourcesOperations: - """RestorableSqlResourcesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class RestorableSqlResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`restorable_sql_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -52,15 +60,16 @@ def list( restore_location: Optional[str] = None, restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.RestorableSqlResourcesListResult"]: + ) -> AsyncIterable["_models.RestorableSqlResourcesGetResult"]: """Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restore_location: The location where the restorable resources are located. Default value is None. @@ -69,47 +78,51 @@ def list( value is None. :type restore_timestamp_in_utc: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableSqlResourcesListResult or the result of + :return: An iterator like instance of either RestorableSqlResourcesGetResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableSqlResourcesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableSqlResourcesGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableSqlResourcesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableSqlResourcesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restore_location=restore_location, restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restore_location=restore_location, - restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -123,10 +136,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -136,8 +147,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_table_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_table_resources_operations.py index 3596c1ed9e9..40e843e6cce 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_table_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_table_resources_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._restorable_table_resources_operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RestorableTableResourcesOperations: - """RestorableTableResourcesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class RestorableTableResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`restorable_table_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -52,14 +60,15 @@ def list( restore_location: Optional[str] = None, restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.RestorableTableResourcesListResult"]: + ) -> AsyncIterable["_models.RestorableTableResourcesGetResult"]: """Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restore_location: The location where the restorable resources are located. Default value is None. @@ -68,47 +77,51 @@ def list( value is None. :type restore_timestamp_in_utc: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableTableResourcesListResult or the result - of cls(response) + :return: An iterator like instance of either RestorableTableResourcesGetResult or the result of + cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableTableResourcesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableTableResourcesGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableTableResourcesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableTableResourcesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restore_location=restore_location, restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restore_location=restore_location, - restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -122,10 +135,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -135,8 +146,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTableResources"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTableResources"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_tables_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_tables_operations.py index 265ed59c878..676382d3639 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_tables_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_restorable_tables_operations.py @@ -7,42 +7,50 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models from ..._vendor import _convert_request from ...operations._restorable_tables_operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RestorableTablesOperations: - """RestorableTablesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class RestorableTablesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`restorable_tables` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -52,61 +60,66 @@ def list( start_time: Optional[str] = None, end_time: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.RestorableTablesListResult"]: + ) -> AsyncIterable["_models.RestorableTableGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param start_time: Restorable Tables event feed start time. Default value is None. :type start_time: str :param end_time: Restorable Tables event feed end time. Default value is None. :type end_time: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableTablesListResult or the result of + :return: An iterator like instance of either RestorableTableGetResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableTablesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.RestorableTableGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableTablesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableTablesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, start_time=start_time, end_time=end_time, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - start_time=start_time, - end_time=end_time, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -120,10 +133,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -133,8 +144,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTables"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTables"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_service_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_service_operations.py index 330b03be1c9..13fad900cdf 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_service_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_service_operations.py @@ -6,98 +6,113 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._vendor import _convert_request -from ...operations._service_operations import build_create_request_initial, build_delete_request_initial, build_get_request, build_list_request -T = TypeVar('T') +from ...operations._service_operations import ( + build_create_request, + build_delete_request, + build_get_request, + build_list_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class ServiceOperations: - """ServiceOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class ServiceOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`service` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ServiceResourceListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.ServiceResource"]: """Gets the status of service. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ServiceResourceListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.ServiceResourceListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either ServiceResource or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.ServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ServiceResourceListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResourceListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -111,10 +126,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -124,49 +137,61 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services"} # type: ignore async def _create_initial( self, resource_group_name: str, account_name: str, service_name: str, - create_update_parameters: "_models.ServiceResourceCreateUpdateParameters", + create_update_parameters: Union[_models.ServiceResourceCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ServiceResource"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServiceResource"]] + ) -> Optional[_models.ServiceResource]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_parameters, 'ServiceResourceCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ServiceResource]] - request = build_create_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_parameters, (IO, bytes)): + _content = create_update_parameters + else: + _json = self._serialize.body(create_update_parameters, "ServiceResourceCreateUpdateParameters") + + request = build_create_request( resource_group_name=resource_group_name, account_name=account_name, service_name=service_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_initial.metadata['url'], + content=_content, + template_url=self._create_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -175,15 +200,93 @@ async def _create_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ServiceResource', pipeline_response) + deserialized = self._deserialize("ServiceResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore + _create_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + account_name: str, + service_name: str, + create_update_parameters: _models.ServiceResourceCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ServiceResource]: + """Creates a service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param service_name: Cosmos DB service name. Required. + :type service_name: str + :param create_update_parameters: The Service resource parameters. Required. + :type create_update_parameters: + ~azure.mgmt.cosmosdb.models.ServiceResourceCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ServiceResource or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + account_name: str, + service_name: str, + create_update_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ServiceResource]: + """Creates a service. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param service_name: Cosmos DB service name. Required. + :type service_name: str + :param create_update_parameters: The Service resource parameters. Required. + :type create_update_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ServiceResource or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create( @@ -191,20 +294,25 @@ async def begin_create( resource_group_name: str, account_name: str, service_name: str, - create_update_parameters: "_models.ServiceResourceCreateUpdateParameters", + create_update_parameters: Union[_models.ServiceResourceCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.ServiceResource"]: + ) -> AsyncLROPoller[_models.ServiceResource]: """Creates a service. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param service_name: Cosmos DB service name. + :param service_name: Cosmos DB service name. Required. :type service_name: str - :param create_update_parameters: The Service resource parameters. + :param create_update_parameters: The Service resource parameters. Is either a model type or a + IO type. Required. :type create_update_parameters: - ~azure.mgmt.cosmosdb.models.ServiceResourceCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.ServiceResourceCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -216,146 +324,153 @@ async def begin_create( :return: An instance of AsyncLROPoller that returns either ServiceResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ServiceResource] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ServiceResource] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_initial( + raw_result = await self._create_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, service_name=service_name, create_update_parameters=create_update_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ServiceResource', pipeline_response) + deserialized = self._deserialize("ServiceResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore + begin_create.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore @distributed_trace_async async def get( - self, - resource_group_name: str, - account_name: str, - service_name: str, - **kwargs: Any - ) -> "_models.ServiceResource": + self, resource_group_name: str, account_name: str, service_name: str, **kwargs: Any + ) -> _models.ServiceResource: """Gets the status of service. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param service_name: Cosmos DB service name. + :param service_name: Cosmos DB service name. Required. :type service_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceResource, or the result of cls(response) + :return: ServiceResource or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ServiceResource - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ServiceResource] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, service_name=service_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ServiceResource', pipeline_response) + deserialized = self._deserialize("ServiceResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore async def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - service_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, service_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_request( resource_group_name=resource_group_name, account_name=account_name, service_name=service_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -365,24 +480,20 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - service_name: str, - **kwargs: Any + async def begin_delete( + self, resource_group_name: str, account_name: str, service_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes service with the given serviceName. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param service_name: Cosmos DB service name. + :param service_name: Cosmos DB service name. Required. :type service_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -394,42 +505,46 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._delete_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, service_name=service_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_sql_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_sql_resources_operations.py index 6c84c8a0c6f..083f77e61cc 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_sql_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_sql_resources_operations.py @@ -6,98 +6,156 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._vendor import _convert_request -from ...operations._sql_resources_operations import build_create_update_client_encryption_key_request_initial, build_create_update_sql_container_request_initial, build_create_update_sql_database_request_initial, build_create_update_sql_role_assignment_request_initial, build_create_update_sql_role_definition_request_initial, build_create_update_sql_stored_procedure_request_initial, build_create_update_sql_trigger_request_initial, build_create_update_sql_user_defined_function_request_initial, build_delete_sql_container_request_initial, build_delete_sql_database_request_initial, build_delete_sql_role_assignment_request_initial, build_delete_sql_role_definition_request_initial, build_delete_sql_stored_procedure_request_initial, build_delete_sql_trigger_request_initial, build_delete_sql_user_defined_function_request_initial, build_get_client_encryption_key_request, build_get_sql_container_request, build_get_sql_container_throughput_request, build_get_sql_database_request, build_get_sql_database_throughput_request, build_get_sql_role_assignment_request, build_get_sql_role_definition_request, build_get_sql_stored_procedure_request, build_get_sql_trigger_request, build_get_sql_user_defined_function_request, build_list_client_encryption_keys_request, build_list_sql_container_partition_merge_request_initial, build_list_sql_containers_request, build_list_sql_databases_request, build_list_sql_role_assignments_request, build_list_sql_role_definitions_request, build_list_sql_stored_procedures_request, build_list_sql_triggers_request, build_list_sql_user_defined_functions_request, build_migrate_sql_container_to_autoscale_request_initial, build_migrate_sql_container_to_manual_throughput_request_initial, build_migrate_sql_database_to_autoscale_request_initial, build_migrate_sql_database_to_manual_throughput_request_initial, build_retrieve_continuous_backup_information_request_initial, build_sql_container_redistribute_throughput_request_initial, build_sql_container_retrieve_throughput_distribution_request_initial, build_update_sql_container_throughput_request_initial, build_update_sql_database_throughput_request_initial -T = TypeVar('T') +from ...operations._sql_resources_operations import ( + build_create_update_client_encryption_key_request, + build_create_update_sql_container_request, + build_create_update_sql_database_request, + build_create_update_sql_role_assignment_request, + build_create_update_sql_role_definition_request, + build_create_update_sql_stored_procedure_request, + build_create_update_sql_trigger_request, + build_create_update_sql_user_defined_function_request, + build_delete_sql_container_request, + build_delete_sql_database_request, + build_delete_sql_role_assignment_request, + build_delete_sql_role_definition_request, + build_delete_sql_stored_procedure_request, + build_delete_sql_trigger_request, + build_delete_sql_user_defined_function_request, + build_get_client_encryption_key_request, + build_get_sql_container_request, + build_get_sql_container_throughput_request, + build_get_sql_database_request, + build_get_sql_database_throughput_request, + build_get_sql_role_assignment_request, + build_get_sql_role_definition_request, + build_get_sql_stored_procedure_request, + build_get_sql_trigger_request, + build_get_sql_user_defined_function_request, + build_list_client_encryption_keys_request, + build_list_sql_container_partition_merge_request, + build_list_sql_containers_request, + build_list_sql_databases_request, + build_list_sql_role_assignments_request, + build_list_sql_role_definitions_request, + build_list_sql_stored_procedures_request, + build_list_sql_triggers_request, + build_list_sql_user_defined_functions_request, + build_migrate_sql_container_to_autoscale_request, + build_migrate_sql_container_to_manual_throughput_request, + build_migrate_sql_database_to_autoscale_request, + build_migrate_sql_database_to_manual_throughput_request, + build_retrieve_continuous_backup_information_request, + build_sql_container_redistribute_throughput_request, + build_sql_container_retrieve_throughput_distribution_request, + build_sql_database_redistribute_throughput_request, + build_sql_database_retrieve_throughput_distribution_request, + build_update_sql_container_throughput_request, + build_update_sql_database_throughput_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class SqlResourcesOperations: # pylint: disable=too-many-public-methods - """SqlResourcesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class SqlResourcesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`sql_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_sql_databases( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.SqlDatabaseListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.SqlDatabaseGetResults"]: """Lists the SQL databases under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlDatabaseListResult or the result of + :return: An iterator like instance of either SqlDatabaseGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlDatabaseListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlDatabaseListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlDatabaseListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_databases_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_databases.metadata['url'], + template_url=self.list_sql_databases.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_databases_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -111,10 +169,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -124,112 +180,126 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_sql_databases.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases"} # type: ignore + list_sql_databases.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases"} # type: ignore @distributed_trace_async async def get_sql_database( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> "_models.SqlDatabaseGetResults": + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> _models.SqlDatabaseGetResults: """Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlDatabaseGetResults, or the result of cls(response) + :return: SqlDatabaseGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlDatabaseGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlDatabaseGetResults] - request = build_get_sql_database_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_database.metadata['url'], + template_url=self.get_sql_database.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("SqlDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore - + get_sql_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore async def _create_update_sql_database_initial( self, resource_group_name: str, account_name: str, database_name: str, - create_update_sql_database_parameters: "_models.SqlDatabaseCreateUpdateParameters", + create_update_sql_database_parameters: Union[_models.SqlDatabaseCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.SqlDatabaseGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlDatabaseGetResults"]] + ) -> Optional[_models.SqlDatabaseGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_sql_database_parameters, 'SqlDatabaseCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlDatabaseGetResults]] - request = build_create_update_sql_database_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_database_parameters, (IO, bytes)): + _content = create_update_sql_database_parameters + else: + _json = self._serialize.body(create_update_sql_database_parameters, "SqlDatabaseCreateUpdateParameters") + + request = build_create_update_sql_database_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_database_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_database_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -238,15 +308,95 @@ async def _create_update_sql_database_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("SqlDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_database_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore + _create_update_sql_database_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore + + @overload + async def begin_create_update_sql_database( + self, + resource_group_name: str, + account_name: str, + database_name: str, + create_update_sql_database_parameters: _models.SqlDatabaseCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlDatabaseGetResults]: + """Create or update an Azure Cosmos DB SQL database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param create_update_sql_database_parameters: The parameters to provide for the current SQL + database. Required. + :type create_update_sql_database_parameters: + ~azure.mgmt.cosmosdb.models.SqlDatabaseCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlDatabaseGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_sql_database( + self, + resource_group_name: str, + account_name: str, + database_name: str, + create_update_sql_database_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlDatabaseGetResults]: + """Create or update an Azure Cosmos DB SQL database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param create_update_sql_database_parameters: The parameters to provide for the current SQL + database. Required. + :type create_update_sql_database_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlDatabaseGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_sql_database( @@ -254,21 +404,25 @@ async def begin_create_update_sql_database( resource_group_name: str, account_name: str, database_name: str, - create_update_sql_database_parameters: "_models.SqlDatabaseCreateUpdateParameters", + create_update_sql_database_parameters: Union[_models.SqlDatabaseCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.SqlDatabaseGetResults"]: + ) -> AsyncLROPoller[_models.SqlDatabaseGetResults]: """Create or update an Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :param create_update_sql_database_parameters: The parameters to provide for the current SQL - database. + database. Is either a model type or a IO type. Required. :type create_update_sql_database_parameters: - ~azure.mgmt.cosmosdb.models.SqlDatabaseCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlDatabaseCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -280,84 +434,89 @@ async def begin_create_update_sql_database( :return: An instance of AsyncLROPoller that returns either SqlDatabaseGetResults or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlDatabaseGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlDatabaseGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_sql_database_initial( + raw_result = await self._create_update_sql_database_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, create_update_sql_database_parameters=create_update_sql_database_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("SqlDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore + begin_create_update_sql_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore async def _delete_sql_database_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_database_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_database_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_database_initial.metadata['url'], + template_url=self._delete_sql_database_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -367,24 +526,20 @@ async def _delete_sql_database_initial( # pylint: disable=inconsistent-return-s if cls: return cls(pipeline_response, None, {}) - _delete_sql_database_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore - + _delete_sql_database_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore @distributed_trace_async - async def begin_delete_sql_database( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + async def begin_delete_sql_database( + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -396,146 +551,166 @@ async def begin_delete_sql_database( # pylint: disable=inconsistent-return-stat Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_sql_database_initial( + raw_result = await self._delete_sql_database_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore + begin_delete_sql_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore @distributed_trace_async async def get_sql_database_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_sql_database_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_database_throughput.metadata['url'], + template_url=self.get_sql_database_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_database_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default"} # type: ignore - + get_sql_database_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default"} # type: ignore async def _update_sql_database_throughput_initial( self, resource_group_name: str, account_name: str, database_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_sql_database_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_sql_database_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_sql_database_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_sql_database_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -544,15 +719,97 @@ async def _update_sql_database_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_sql_database_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default"} # type: ignore + _update_sql_database_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default"} # type: ignore + + @overload + async def begin_update_sql_database_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB SQL database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param update_throughput_parameters: The parameters to provide for the RUs per second of the + current SQL database. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_sql_database_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB SQL database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param update_throughput_parameters: The parameters to provide for the RUs per second of the + current SQL database. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_update_sql_database_throughput( @@ -560,21 +817,25 @@ async def begin_update_sql_database_throughput( resource_group_name: str, account_name: str, database_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :param update_throughput_parameters: The parameters to provide for the RUs per second of the - current SQL database. + current SQL database. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -587,84 +848,89 @@ async def begin_update_sql_database_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_sql_database_throughput_initial( + raw_result = await self._update_sql_database_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_sql_database_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default"} # type: ignore + begin_update_sql_database_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default"} # type: ignore async def _migrate_sql_database_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_sql_database_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_sql_database_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_sql_database_to_autoscale_initial.metadata['url'], + template_url=self._migrate_sql_database_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -673,31 +939,27 @@ async def _migrate_sql_database_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_sql_database_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_sql_database_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace_async async def begin_migrate_sql_database_to_autoscale( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -711,81 +973,86 @@ async def begin_migrate_sql_database_to_autoscale( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_sql_database_to_autoscale_initial( + raw_result = await self._migrate_sql_database_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_sql_database_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_sql_database_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore async def _migrate_sql_database_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_sql_database_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_sql_database_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_sql_database_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_sql_database_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -794,31 +1061,27 @@ async def _migrate_sql_database_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_sql_database_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_sql_database_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace_async async def begin_migrate_sql_database_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -832,105 +1095,110 @@ async def begin_migrate_sql_database_to_manual_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_sql_database_to_manual_throughput_initial( + raw_result = await self._migrate_sql_database_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_sql_database_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_sql_database_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def list_client_encryption_keys( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ClientEncryptionKeysListResult"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> AsyncIterable["_models.ClientEncryptionKeyGetResults"]: """Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ClientEncryptionKeysListResult or the result of + :return: An iterator like instance of either ClientEncryptionKeyGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.ClientEncryptionKeysListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClientEncryptionKeysListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClientEncryptionKeysListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_client_encryption_keys_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_client_encryption_keys.metadata['url'], + template_url=self.list_client_encryption_keys.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_client_encryption_keys_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -944,10 +1212,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -957,11 +1223,9 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_client_encryption_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys"} # type: ignore + list_client_encryption_keys.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys"} # type: ignore @distributed_trace_async async def get_client_encryption_key( @@ -971,63 +1235,69 @@ async def get_client_encryption_key( database_name: str, client_encryption_key_name: str, **kwargs: Any - ) -> "_models.ClientEncryptionKeyGetResults": + ) -> _models.ClientEncryptionKeyGetResults: """Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param client_encryption_key_name: Cosmos DB ClientEncryptionKey name. + :param client_encryption_key_name: Cosmos DB ClientEncryptionKey name. Required. :type client_encryption_key_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClientEncryptionKeyGetResults, or the result of cls(response) + :return: ClientEncryptionKeyGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClientEncryptionKeyGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClientEncryptionKeyGetResults] - request = build_get_client_encryption_key_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, client_encryption_key_name=client_encryption_key_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_client_encryption_key.metadata['url'], + template_url=self.get_client_encryption_key.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ClientEncryptionKeyGetResults', pipeline_response) + deserialized = self._deserialize("ClientEncryptionKeyGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_client_encryption_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}"} # type: ignore - + get_client_encryption_key.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}"} # type: ignore async def _create_update_client_encryption_key_initial( self, @@ -1035,39 +1305,55 @@ async def _create_update_client_encryption_key_initial( account_name: str, database_name: str, client_encryption_key_name: str, - create_update_client_encryption_key_parameters: "_models.ClientEncryptionKeyCreateUpdateParameters", + create_update_client_encryption_key_parameters: Union[_models.ClientEncryptionKeyCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ClientEncryptionKeyGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ClientEncryptionKeyGetResults"]] + ) -> Optional[_models.ClientEncryptionKeyGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_client_encryption_key_parameters, 'ClientEncryptionKeyCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ClientEncryptionKeyGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_client_encryption_key_parameters, (IO, bytes)): + _content = create_update_client_encryption_key_parameters + else: + _json = self._serialize.body( + create_update_client_encryption_key_parameters, "ClientEncryptionKeyCreateUpdateParameters" + ) - request = build_create_update_client_encryption_key_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_client_encryption_key_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, client_encryption_key_name=client_encryption_key_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_client_encryption_key_initial.metadata['url'], + content=_content, + template_url=self._create_update_client_encryption_key_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1076,41 +1362,46 @@ async def _create_update_client_encryption_key_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClientEncryptionKeyGetResults', pipeline_response) + deserialized = self._deserialize("ClientEncryptionKeyGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_client_encryption_key_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}"} # type: ignore + _create_update_client_encryption_key_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}"} # type: ignore - - @distributed_trace_async + @overload async def begin_create_update_client_encryption_key( self, resource_group_name: str, account_name: str, database_name: str, client_encryption_key_name: str, - create_update_client_encryption_key_parameters: "_models.ClientEncryptionKeyCreateUpdateParameters", + create_update_client_encryption_key_parameters: _models.ClientEncryptionKeyCreateUpdateParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller["_models.ClientEncryptionKeyGetResults"]: + ) -> AsyncLROPoller[_models.ClientEncryptionKeyGetResults]: """Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param client_encryption_key_name: Cosmos DB ClientEncryptionKey name. + :param client_encryption_key_name: Cosmos DB ClientEncryptionKey name. Required. :type client_encryption_key_name: str :param create_update_client_encryption_key_parameters: The parameters to provide for the client - encryption key. + encryption key. Required. :type create_update_client_encryption_key_parameters: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1123,109 +1414,203 @@ async def begin_create_update_client_encryption_key( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClientEncryptionKeyGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_update_client_encryption_key_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - client_encryption_key_name=client_encryption_key_name, + + @overload + async def begin_create_update_client_encryption_key( + self, + resource_group_name: str, + account_name: str, + database_name: str, + client_encryption_key_name: str, + create_update_client_encryption_key_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ClientEncryptionKeyGetResults]: + """Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the + Azure Powershell (instead of directly). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param client_encryption_key_name: Cosmos DB ClientEncryptionKey name. Required. + :type client_encryption_key_name: str + :param create_update_client_encryption_key_parameters: The parameters to provide for the client + encryption key. Required. + :type create_update_client_encryption_key_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ClientEncryptionKeyGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_update_client_encryption_key( + self, + resource_group_name: str, + account_name: str, + database_name: str, + client_encryption_key_name: str, + create_update_client_encryption_key_parameters: Union[_models.ClientEncryptionKeyCreateUpdateParameters, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.ClientEncryptionKeyGetResults]: + """Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the + Azure Powershell (instead of directly). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param client_encryption_key_name: Cosmos DB ClientEncryptionKey name. Required. + :type client_encryption_key_name: str + :param create_update_client_encryption_key_parameters: The parameters to provide for the client + encryption key. Is either a model type or a IO type. Required. + :type create_update_client_encryption_key_parameters: + ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ClientEncryptionKeyGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClientEncryptionKeyGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_update_client_encryption_key_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + client_encryption_key_name=client_encryption_key_name, create_update_client_encryption_key_parameters=create_update_client_encryption_key_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ClientEncryptionKeyGetResults', pipeline_response) + deserialized = self._deserialize("ClientEncryptionKeyGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_client_encryption_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}"} # type: ignore + begin_create_update_client_encryption_key.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}"} # type: ignore @distributed_trace def list_sql_containers( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.SqlContainerListResult"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> AsyncIterable["_models.SqlContainerGetResults"]: """Lists the SQL container under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlContainerListResult or the result of + :return: An iterator like instance of either SqlContainerGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlContainerListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlContainerGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlContainerListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlContainerListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_containers_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_containers.metadata['url'], + template_url=self.list_sql_containers.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_containers_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1239,10 +1624,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1252,77 +1635,76 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_sql_containers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers"} # type: ignore + list_sql_containers.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers"} # type: ignore @distributed_trace_async async def get_sql_container( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> "_models.SqlContainerGetResults": + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> _models.SqlContainerGetResults: """Gets the SQL container under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlContainerGetResults, or the result of cls(response) + :return: SqlContainerGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlContainerGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlContainerGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlContainerGetResults] - request = build_get_sql_container_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_container.metadata['url'], + template_url=self.get_sql_container.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlContainerGetResults', pipeline_response) + deserialized = self._deserialize("SqlContainerGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_container.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore - + get_sql_container.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore async def _create_update_sql_container_initial( self, @@ -1330,39 +1712,53 @@ async def _create_update_sql_container_initial( account_name: str, database_name: str, container_name: str, - create_update_sql_container_parameters: "_models.SqlContainerCreateUpdateParameters", + create_update_sql_container_parameters: Union[_models.SqlContainerCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.SqlContainerGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlContainerGetResults"]] + ) -> Optional[_models.SqlContainerGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_sql_container_parameters, 'SqlContainerCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlContainerGetResults]] - request = build_create_update_sql_container_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_container_parameters, (IO, bytes)): + _content = create_update_sql_container_parameters + else: + _json = self._serialize.body(create_update_sql_container_parameters, "SqlContainerCreateUpdateParameters") + + request = build_create_update_sql_container_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_container_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_container_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1371,15 +1767,101 @@ async def _create_update_sql_container_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlContainerGetResults', pipeline_response) + deserialized = self._deserialize("SqlContainerGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_container_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore + _create_update_sql_container_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore + + @overload + async def begin_create_update_sql_container( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + create_update_sql_container_parameters: _models.SqlContainerCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlContainerGetResults]: + """Create or update an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param create_update_sql_container_parameters: The parameters to provide for the current SQL + container. Required. + :type create_update_sql_container_parameters: + ~azure.mgmt.cosmosdb.models.SqlContainerCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlContainerGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlContainerGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_sql_container( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + create_update_sql_container_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlContainerGetResults]: + """Create or update an Azure Cosmos DB SQL container. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param create_update_sql_container_parameters: The parameters to provide for the current SQL + container. Required. + :type create_update_sql_container_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlContainerGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlContainerGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_sql_container( @@ -1388,23 +1870,27 @@ async def begin_create_update_sql_container( account_name: str, database_name: str, container_name: str, - create_update_sql_container_parameters: "_models.SqlContainerCreateUpdateParameters", + create_update_sql_container_parameters: Union[_models.SqlContainerCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.SqlContainerGetResults"]: + ) -> AsyncLROPoller[_models.SqlContainerGetResults]: """Create or update an Azure Cosmos DB SQL container. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :param create_update_sql_container_parameters: The parameters to provide for the current SQL - container. + container. Is either a model type or a IO type. Required. :type create_update_sql_container_parameters: - ~azure.mgmt.cosmosdb.models.SqlContainerCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlContainerCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1416,19 +1902,19 @@ async def begin_create_update_sql_container( :return: An instance of AsyncLROPoller that returns either SqlContainerGetResults or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlContainerGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlContainerGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlContainerGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_sql_container_initial( + raw_result = await self._create_update_sql_container_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -1436,67 +1922,71 @@ async def begin_create_update_sql_container( create_update_sql_container_parameters=create_update_sql_container_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlContainerGetResults', pipeline_response) + deserialized = self._deserialize("SqlContainerGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_container.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore + begin_create_update_sql_container.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore async def _delete_sql_container_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_container_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_container_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_container_initial.metadata['url'], + template_url=self._delete_sql_container_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1506,27 +1996,22 @@ async def _delete_sql_container_initial( # pylint: disable=inconsistent-return- if cls: return cls(pipeline_response, None, {}) - _delete_sql_container_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore - + _delete_sql_container_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore @distributed_trace_async - async def begin_delete_sql_container( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any + async def begin_delete_sql_container( + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB SQL container. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1538,46 +2023,50 @@ async def begin_delete_sql_container( # pylint: disable=inconsistent-return-sta Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_sql_container_initial( + raw_result = await self._delete_sql_container_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_container.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore + begin_delete_sql_container.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore async def _list_sql_container_partition_merge_initial( self, @@ -1585,39 +2074,53 @@ async def _list_sql_container_partition_merge_initial( account_name: str, database_name: str, container_name: str, - merge_parameters: "_models.MergeParameters", + merge_parameters: Union[_models.MergeParameters, IO], **kwargs: Any - ) -> Optional["_models.PhysicalPartitionStorageInfoCollection"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionStorageInfoCollection"]] + ) -> Optional[_models.PhysicalPartitionStorageInfoCollection]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(merge_parameters, 'MergeParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionStorageInfoCollection]] - request = build_list_sql_container_partition_merge_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(merge_parameters, (IO, bytes)): + _content = merge_parameters + else: + _json = self._serialize.body(merge_parameters, "MergeParameters") + + request = build_list_sql_container_partition_merge_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._list_sql_container_partition_merge_initial.metadata['url'], + content=_content, + template_url=self._list_sql_container_partition_merge_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1626,15 +2129,100 @@ async def _list_sql_container_partition_merge_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionStorageInfoCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _list_sql_container_partition_merge_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge"} # type: ignore + _list_sql_container_partition_merge_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge"} # type: ignore + + @overload + async def begin_list_sql_container_partition_merge( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + merge_parameters: _models.MergeParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionStorageInfoCollection]: + """Merges the partitions of a SQL Container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param merge_parameters: The parameters for the merge operation. Required. + :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionStorageInfoCollection or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_list_sql_container_partition_merge( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + merge_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionStorageInfoCollection]: + """Merges the partitions of a SQL Container. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param merge_parameters: The parameters for the merge operation. Required. + :type merge_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionStorageInfoCollection or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_list_sql_container_partition_merge( @@ -1643,21 +2231,26 @@ async def begin_list_sql_container_partition_merge( account_name: str, database_name: str, container_name: str, - merge_parameters: "_models.MergeParameters", + merge_parameters: Union[_models.MergeParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.PhysicalPartitionStorageInfoCollection"]: + ) -> AsyncLROPoller[_models.PhysicalPartitionStorageInfoCollection]: """Merges the partitions of a SQL Container. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param merge_parameters: The parameters for the merge operation. - :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters + :param merge_parameters: The parameters for the merge operation. Is either a model type or a IO + type. Required. + :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1670,19 +2263,19 @@ async def begin_list_sql_container_partition_merge( PhysicalPartitionStorageInfoCollection or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionStorageInfoCollection"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionStorageInfoCollection] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._list_sql_container_partition_merge_initial( + raw_result = await self._list_sql_container_partition_merge_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -1690,99 +2283,105 @@ async def begin_list_sql_container_partition_merge( merge_parameters=merge_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionStorageInfoCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_sql_container_partition_merge.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge"} # type: ignore + begin_list_sql_container_partition_merge.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge"} # type: ignore @distributed_trace_async async def get_sql_container_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_sql_container_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_container_throughput.metadata['url'], + template_url=self.get_sql_container_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_container_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default"} # type: ignore - + get_sql_container_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default"} # type: ignore async def _update_sql_container_throughput_initial( self, @@ -1790,39 +2389,53 @@ async def _update_sql_container_throughput_initial( account_name: str, database_name: str, container_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_sql_container_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_sql_container_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_sql_container_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_sql_container_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1831,15 +2444,103 @@ async def _update_sql_container_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_sql_container_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default"} # type: ignore + _update_sql_container_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default"} # type: ignore + + @overload + async def begin_update_sql_container_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param update_throughput_parameters: The parameters to provide for the RUs per second of the + current SQL container. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_sql_container_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB SQL container. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param update_throughput_parameters: The parameters to provide for the RUs per second of the + current SQL container. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_update_sql_container_throughput( @@ -1848,23 +2549,27 @@ async def begin_update_sql_container_throughput( account_name: str, database_name: str, container_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB SQL container. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :param update_throughput_parameters: The parameters to provide for the RUs per second of the - current SQL container. + current SQL container. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1877,19 +2582,19 @@ async def begin_update_sql_container_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_sql_container_throughput_initial( + raw_result = await self._update_sql_container_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -1897,67 +2602,71 @@ async def begin_update_sql_container_throughput( update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_sql_container_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default"} # type: ignore + begin_update_sql_container_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default"} # type: ignore async def _migrate_sql_container_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_sql_container_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_sql_container_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_sql_container_to_autoscale_initial.metadata['url'], + template_url=self._migrate_sql_container_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1966,34 +2675,29 @@ async def _migrate_sql_container_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_sql_container_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_sql_container_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace_async async def begin_migrate_sql_container_to_autoscale( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2007,84 +2711,88 @@ async def begin_migrate_sql_container_to_autoscale( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_sql_container_to_autoscale_initial( + raw_result = await self._migrate_sql_container_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_sql_container_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_sql_container_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToAutoscale"} # type: ignore async def _migrate_sql_container_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_sql_container_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_sql_container_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_sql_container_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_sql_container_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2093,34 +2801,29 @@ async def _migrate_sql_container_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_sql_container_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_sql_container_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace_async async def begin_migrate_sql_container_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2134,89 +2837,104 @@ async def begin_migrate_sql_container_to_manual_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_sql_container_to_manual_throughput_initial( + raw_result = await self._migrate_sql_container_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_sql_container_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_sql_container_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - async def _sql_container_retrieve_throughput_distribution_initial( + async def _sql_database_retrieve_throughput_distribution_initial( self, resource_group_name: str, account_name: str, database_name: str, - container_name: str, - retrieve_throughput_parameters: "_models.RetrieveThroughputParameters", + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], **kwargs: Any - ) -> Optional["_models.PhysicalPartitionThroughputInfoResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionThroughputInfoResult"]] + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(retrieve_throughput_parameters, 'RetrieveThroughputParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] - request = build_sql_container_retrieve_throughput_distribution_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(retrieve_throughput_parameters, (IO, bytes)): + _content = retrieve_throughput_parameters + else: + _json = self._serialize.body(retrieve_throughput_parameters, "RetrieveThroughputParameters") + + request = build_sql_database_retrieve_throughput_distribution_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._sql_container_retrieve_throughput_distribution_initial.metadata['url'], + content=_content, + template_url=self._sql_database_retrieve_throughput_distribution_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2225,39 +2943,122 @@ async def _sql_container_retrieve_throughput_distribution_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _sql_container_retrieve_throughput_distribution_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + _sql_database_retrieve_throughput_distribution_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + + @overload + async def begin_sql_database_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + retrieve_throughput_parameters: _models.RetrieveThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB SQL database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current SQL database. Required. + :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_sql_database_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + retrieve_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB SQL database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current SQL database. Required. + :type retrieve_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async - async def begin_sql_container_retrieve_throughput_distribution( + async def begin_sql_database_retrieve_throughput_distribution( self, resource_group_name: str, account_name: str, database_name: str, - container_name: str, - retrieve_throughput_parameters: "_models.RetrieveThroughputParameters", + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.PhysicalPartitionThroughputInfoResult"]: - """Retrieve throughput distribution for an Azure Cosmos DB SQL container. + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. - :type container_name: str :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput - distribution for the current SQL container. + distribution for the current SQL database. Is either a model type or a IO type. Required. :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -2270,92 +3071,108 @@ async def begin_sql_container_retrieve_throughput_distribution( PhysicalPartitionThroughputInfoResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionThroughputInfoResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._sql_container_retrieve_throughput_distribution_initial( + raw_result = await self._sql_database_retrieve_throughput_distribution_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - container_name=container_name, retrieve_throughput_parameters=retrieve_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_sql_container_retrieve_throughput_distribution.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + begin_sql_database_retrieve_throughput_distribution.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore - async def _sql_container_redistribute_throughput_initial( + async def _sql_database_redistribute_throughput_initial( self, resource_group_name: str, account_name: str, database_name: str, - container_name: str, - redistribute_throughput_parameters: "_models.RedistributeThroughputParameters", + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], **kwargs: Any - ) -> Optional["_models.PhysicalPartitionThroughputInfoResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionThroughputInfoResult"]] + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(redistribute_throughput_parameters, 'RedistributeThroughputParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] - request = build_sql_container_redistribute_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(redistribute_throughput_parameters, (IO, bytes)): + _content = redistribute_throughput_parameters + else: + _json = self._serialize.body(redistribute_throughput_parameters, "RedistributeThroughputParameters") + + request = build_sql_database_redistribute_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._sql_container_redistribute_throughput_initial.metadata['url'], + content=_content, + template_url=self._sql_database_redistribute_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2364,40 +3181,123 @@ async def _sql_container_redistribute_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _sql_container_redistribute_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput"} # type: ignore + _sql_database_redistribute_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/redistributeThroughput"} # type: ignore + + @overload + async def begin_sql_database_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + redistribute_throughput_parameters: _models.RedistributeThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB SQL database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current SQL database. Required. + :type redistribute_throughput_parameters: + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_sql_database_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + redistribute_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB SQL database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current SQL database. Required. + :type redistribute_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async - async def begin_sql_container_redistribute_throughput( + async def begin_sql_database_redistribute_throughput( self, resource_group_name: str, account_name: str, database_name: str, - container_name: str, - redistribute_throughput_parameters: "_models.RedistributeThroughputParameters", + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.PhysicalPartitionThroughputInfoResult"]: - """Redistribute throughput for an Azure Cosmos DB SQL container. + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. - :type container_name: str :param redistribute_throughput_parameters: The parameters to provide for redistributing - throughput for the current SQL container. + throughput for the current SQL database. Is either a model type or a IO type. Required. :type redistribute_throughput_parameters: - ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -2410,114 +3310,619 @@ async def begin_sql_container_redistribute_throughput( PhysicalPartitionThroughputInfoResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionThroughputInfoResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._sql_container_redistribute_throughput_initial( + raw_result = await self._sql_database_redistribute_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - container_name=container_name, redistribute_throughput_parameters=redistribute_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_sql_container_redistribute_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput"} # type: ignore + begin_sql_database_redistribute_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/redistributeThroughput"} # type: ignore - @distributed_trace - def list_sql_stored_procedures( + async def _sql_container_retrieve_throughput_distribution_initial( self, resource_group_name: str, account_name: str, database_name: str, container_name: str, + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], **kwargs: Any - ) -> AsyncIterable["_models.SqlStoredProcedureListResult"]: - """Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param container_name: Cosmos DB container name. - :type container_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlStoredProcedureListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlStoredProcedureListResult] - :raises: ~azure.core.exceptions.HttpResponseError + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(retrieve_throughput_parameters, (IO, bytes)): + _content = retrieve_throughput_parameters + else: + _json = self._serialize.body(retrieve_throughput_parameters, "RetrieveThroughputParameters") + + request = build_sql_container_retrieve_throughput_distribution_request( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._sql_container_retrieve_throughput_distribution_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _sql_container_retrieve_throughput_distribution_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + + @overload + async def begin_sql_container_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + retrieve_throughput_parameters: _models.RetrieveThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current SQL container. Required. + :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_sql_container_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + retrieve_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current SQL container. Required. + :type retrieve_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_sql_container_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current SQL container. Is either a model type or a IO type. Required. + :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._sql_container_retrieve_throughput_distribution_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + retrieve_throughput_parameters=retrieve_throughput_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_sql_container_retrieve_throughput_distribution.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + + async def _sql_container_redistribute_throughput_initial( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], + **kwargs: Any + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(redistribute_throughput_parameters, (IO, bytes)): + _content = redistribute_throughput_parameters + else: + _json = self._serialize.body(redistribute_throughput_parameters, "RedistributeThroughputParameters") + + request = build_sql_container_redistribute_throughput_request( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._sql_container_redistribute_throughput_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _sql_container_redistribute_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput"} # type: ignore + + @overload + async def begin_sql_container_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + redistribute_throughput_parameters: _models.RedistributeThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current SQL container. Required. + :type redistribute_throughput_parameters: + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_sql_container_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + redistribute_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current SQL container. Required. + :type redistribute_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlStoredProcedureListResult"] + @distributed_trace_async + async def begin_sql_container_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current SQL container. Is either a model type or a IO type. Required. + :type redistribute_throughput_parameters: + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionThroughputInfoResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._sql_container_redistribute_throughput_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + redistribute_throughput_parameters=redistribute_throughput_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_sql_container_redistribute_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput"} # type: ignore + + @distributed_trace + def list_sql_stored_procedures( + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> AsyncIterable["_models.SqlStoredProcedureGetResults"]: + """Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SqlStoredProcedureGetResults or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlStoredProcedureListResult] + error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_stored_procedures_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_stored_procedures.metadata['url'], + template_url=self.list_sql_stored_procedures.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_stored_procedures_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - container_name=container_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -2531,10 +3936,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2544,11 +3947,9 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_sql_stored_procedures.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures"} # type: ignore + list_sql_stored_procedures.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures"} # type: ignore @distributed_trace_async async def get_sql_stored_procedure( @@ -2559,66 +3960,72 @@ async def get_sql_stored_procedure( container_name: str, stored_procedure_name: str, **kwargs: Any - ) -> "_models.SqlStoredProcedureGetResults": + ) -> _models.SqlStoredProcedureGetResults: """Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param stored_procedure_name: Cosmos DB storedProcedure name. + :param stored_procedure_name: Cosmos DB storedProcedure name. Required. :type stored_procedure_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlStoredProcedureGetResults, or the result of cls(response) + :return: SqlStoredProcedureGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlStoredProcedureGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlStoredProcedureGetResults] - request = build_get_sql_stored_procedure_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, stored_procedure_name=stored_procedure_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_stored_procedure.metadata['url'], + template_url=self.get_sql_stored_procedure.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlStoredProcedureGetResults', pipeline_response) + deserialized = self._deserialize("SqlStoredProcedureGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_stored_procedure.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore - + get_sql_stored_procedure.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore async def _create_update_sql_stored_procedure_initial( self, @@ -2627,40 +4034,56 @@ async def _create_update_sql_stored_procedure_initial( database_name: str, container_name: str, stored_procedure_name: str, - create_update_sql_stored_procedure_parameters: "_models.SqlStoredProcedureCreateUpdateParameters", + create_update_sql_stored_procedure_parameters: Union[_models.SqlStoredProcedureCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.SqlStoredProcedureGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlStoredProcedureGetResults"]] + ) -> Optional[_models.SqlStoredProcedureGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_sql_stored_procedure_parameters, 'SqlStoredProcedureCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlStoredProcedureGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_stored_procedure_parameters, (IO, bytes)): + _content = create_update_sql_stored_procedure_parameters + else: + _json = self._serialize.body( + create_update_sql_stored_procedure_parameters, "SqlStoredProcedureCreateUpdateParameters" + ) - request = build_create_update_sql_stored_procedure_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_sql_stored_procedure_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, stored_procedure_name=stored_procedure_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_stored_procedure_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_stored_procedure_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2669,15 +4092,109 @@ async def _create_update_sql_stored_procedure_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlStoredProcedureGetResults', pipeline_response) + deserialized = self._deserialize("SqlStoredProcedureGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_stored_procedure_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore + _create_update_sql_stored_procedure_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore + + @overload + async def begin_create_update_sql_stored_procedure( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + stored_procedure_name: str, + create_update_sql_stored_procedure_parameters: _models.SqlStoredProcedureCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlStoredProcedureGetResults]: + """Create or update an Azure Cosmos DB SQL storedProcedure. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param stored_procedure_name: Cosmos DB storedProcedure name. Required. + :type stored_procedure_name: str + :param create_update_sql_stored_procedure_parameters: The parameters to provide for the current + SQL storedProcedure. Required. + :type create_update_sql_stored_procedure_parameters: + ~azure.mgmt.cosmosdb.models.SqlStoredProcedureCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlStoredProcedureGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_sql_stored_procedure( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + stored_procedure_name: str, + create_update_sql_stored_procedure_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlStoredProcedureGetResults]: + """Create or update an Azure Cosmos DB SQL storedProcedure. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param stored_procedure_name: Cosmos DB storedProcedure name. Required. + :type stored_procedure_name: str + :param create_update_sql_stored_procedure_parameters: The parameters to provide for the current + SQL storedProcedure. Required. + :type create_update_sql_stored_procedure_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlStoredProcedureGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_sql_stored_procedure( @@ -2687,25 +4204,29 @@ async def begin_create_update_sql_stored_procedure( database_name: str, container_name: str, stored_procedure_name: str, - create_update_sql_stored_procedure_parameters: "_models.SqlStoredProcedureCreateUpdateParameters", + create_update_sql_stored_procedure_parameters: Union[_models.SqlStoredProcedureCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.SqlStoredProcedureGetResults"]: + ) -> AsyncLROPoller[_models.SqlStoredProcedureGetResults]: """Create or update an Azure Cosmos DB SQL storedProcedure. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param stored_procedure_name: Cosmos DB storedProcedure name. + :param stored_procedure_name: Cosmos DB storedProcedure name. Required. :type stored_procedure_name: str :param create_update_sql_stored_procedure_parameters: The parameters to provide for the current - SQL storedProcedure. + SQL storedProcedure. Is either a model type or a IO type. Required. :type create_update_sql_stored_procedure_parameters: - ~azure.mgmt.cosmosdb.models.SqlStoredProcedureCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlStoredProcedureCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -2718,19 +4239,19 @@ async def begin_create_update_sql_stored_procedure( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlStoredProcedureGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlStoredProcedureGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_sql_stored_procedure_initial( + raw_result = await self._create_update_sql_stored_procedure_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -2739,32 +4260,35 @@ async def begin_create_update_sql_stored_procedure( create_update_sql_stored_procedure_parameters=create_update_sql_stored_procedure_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlStoredProcedureGetResults', pipeline_response) + deserialized = self._deserialize("SqlStoredProcedureGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_stored_procedure.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore + begin_create_update_sql_stored_procedure.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore async def _delete_sql_stored_procedure_initial( # pylint: disable=inconsistent-return-statements self, @@ -2775,33 +4299,39 @@ async def _delete_sql_stored_procedure_initial( # pylint: disable=inconsistent- stored_procedure_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_stored_procedure_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_stored_procedure_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, stored_procedure_name=stored_procedure_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_stored_procedure_initial.metadata['url'], + template_url=self._delete_sql_stored_procedure_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -2811,11 +4341,10 @@ async def _delete_sql_stored_procedure_initial( # pylint: disable=inconsistent- if cls: return cls(pipeline_response, None, {}) - _delete_sql_stored_procedure_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore - + _delete_sql_stored_procedure_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore @distributed_trace_async - async def begin_delete_sql_stored_procedure( # pylint: disable=inconsistent-return-statements + async def begin_delete_sql_stored_procedure( self, resource_group_name: str, account_name: str, @@ -2827,14 +4356,15 @@ async def begin_delete_sql_stored_procedure( # pylint: disable=inconsistent-ret """Deletes an existing Azure Cosmos DB SQL storedProcedure. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param stored_procedure_name: Cosmos DB storedProcedure name. + :param stored_procedure_name: Cosmos DB storedProcedure name. Required. :type stored_procedure_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2846,109 +4376,113 @@ async def begin_delete_sql_stored_procedure( # pylint: disable=inconsistent-ret Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_sql_stored_procedure_initial( + raw_result = await self._delete_sql_stored_procedure_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, stored_procedure_name=stored_procedure_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_stored_procedure.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore + begin_delete_sql_stored_procedure.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore @distributed_trace def list_sql_user_defined_functions( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.SqlUserDefinedFunctionListResult"]: + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> AsyncIterable["_models.SqlUserDefinedFunctionGetResults"]: """Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlUserDefinedFunctionListResult or the result of + :return: An iterator like instance of either SqlUserDefinedFunctionGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlUserDefinedFunctionListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlUserDefinedFunctionListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_user_defined_functions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_user_defined_functions.metadata['url'], + template_url=self.list_sql_user_defined_functions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_user_defined_functions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - container_name=container_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -2962,10 +4496,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2975,11 +4507,9 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_sql_user_defined_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions"} # type: ignore + list_sql_user_defined_functions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions"} # type: ignore @distributed_trace_async async def get_sql_user_defined_function( @@ -2990,66 +4520,72 @@ async def get_sql_user_defined_function( container_name: str, user_defined_function_name: str, **kwargs: Any - ) -> "_models.SqlUserDefinedFunctionGetResults": + ) -> _models.SqlUserDefinedFunctionGetResults: """Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param user_defined_function_name: Cosmos DB userDefinedFunction name. + :param user_defined_function_name: Cosmos DB userDefinedFunction name. Required. :type user_defined_function_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlUserDefinedFunctionGetResults, or the result of cls(response) + :return: SqlUserDefinedFunctionGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlUserDefinedFunctionGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlUserDefinedFunctionGetResults] - request = build_get_sql_user_defined_function_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, user_defined_function_name=user_defined_function_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_user_defined_function.metadata['url'], + template_url=self.get_sql_user_defined_function.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlUserDefinedFunctionGetResults', pipeline_response) + deserialized = self._deserialize("SqlUserDefinedFunctionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_user_defined_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore - + get_sql_user_defined_function.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore async def _create_update_sql_user_defined_function_initial( self, @@ -3058,40 +4594,58 @@ async def _create_update_sql_user_defined_function_initial( database_name: str, container_name: str, user_defined_function_name: str, - create_update_sql_user_defined_function_parameters: "_models.SqlUserDefinedFunctionCreateUpdateParameters", + create_update_sql_user_defined_function_parameters: Union[ + _models.SqlUserDefinedFunctionCreateUpdateParameters, IO + ], **kwargs: Any - ) -> Optional["_models.SqlUserDefinedFunctionGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlUserDefinedFunctionGetResults"]] + ) -> Optional[_models.SqlUserDefinedFunctionGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_sql_user_defined_function_parameters, 'SqlUserDefinedFunctionCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlUserDefinedFunctionGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_user_defined_function_parameters, (IO, bytes)): + _content = create_update_sql_user_defined_function_parameters + else: + _json = self._serialize.body( + create_update_sql_user_defined_function_parameters, "SqlUserDefinedFunctionCreateUpdateParameters" + ) - request = build_create_update_sql_user_defined_function_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_sql_user_defined_function_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, user_defined_function_name=user_defined_function_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_user_defined_function_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_user_defined_function_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3100,15 +4654,109 @@ async def _create_update_sql_user_defined_function_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlUserDefinedFunctionGetResults', pipeline_response) + deserialized = self._deserialize("SqlUserDefinedFunctionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_user_defined_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore + _create_update_sql_user_defined_function_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore + + @overload + async def begin_create_update_sql_user_defined_function( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + user_defined_function_name: str, + create_update_sql_user_defined_function_parameters: _models.SqlUserDefinedFunctionCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlUserDefinedFunctionGetResults]: + """Create or update an Azure Cosmos DB SQL userDefinedFunction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param user_defined_function_name: Cosmos DB userDefinedFunction name. Required. + :type user_defined_function_name: str + :param create_update_sql_user_defined_function_parameters: The parameters to provide for the + current SQL userDefinedFunction. Required. + :type create_update_sql_user_defined_function_parameters: + ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlUserDefinedFunctionGetResults or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_sql_user_defined_function( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + user_defined_function_name: str, + create_update_sql_user_defined_function_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlUserDefinedFunctionGetResults]: + """Create or update an Azure Cosmos DB SQL userDefinedFunction. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param user_defined_function_name: Cosmos DB userDefinedFunction name. Required. + :type user_defined_function_name: str + :param create_update_sql_user_defined_function_parameters: The parameters to provide for the + current SQL userDefinedFunction. Required. + :type create_update_sql_user_defined_function_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlUserDefinedFunctionGetResults or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_sql_user_defined_function( @@ -3118,25 +4766,31 @@ async def begin_create_update_sql_user_defined_function( database_name: str, container_name: str, user_defined_function_name: str, - create_update_sql_user_defined_function_parameters: "_models.SqlUserDefinedFunctionCreateUpdateParameters", + create_update_sql_user_defined_function_parameters: Union[ + _models.SqlUserDefinedFunctionCreateUpdateParameters, IO + ], **kwargs: Any - ) -> AsyncLROPoller["_models.SqlUserDefinedFunctionGetResults"]: + ) -> AsyncLROPoller[_models.SqlUserDefinedFunctionGetResults]: """Create or update an Azure Cosmos DB SQL userDefinedFunction. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param user_defined_function_name: Cosmos DB userDefinedFunction name. + :param user_defined_function_name: Cosmos DB userDefinedFunction name. Required. :type user_defined_function_name: str :param create_update_sql_user_defined_function_parameters: The parameters to provide for the - current SQL userDefinedFunction. + current SQL userDefinedFunction. Is either a model type or a IO type. Required. :type create_update_sql_user_defined_function_parameters: - ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -3149,19 +4803,19 @@ async def begin_create_update_sql_user_defined_function( the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlUserDefinedFunctionGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlUserDefinedFunctionGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_sql_user_defined_function_initial( + raw_result = await self._create_update_sql_user_defined_function_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -3170,32 +4824,35 @@ async def begin_create_update_sql_user_defined_function( create_update_sql_user_defined_function_parameters=create_update_sql_user_defined_function_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlUserDefinedFunctionGetResults', pipeline_response) + deserialized = self._deserialize("SqlUserDefinedFunctionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_user_defined_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore + begin_create_update_sql_user_defined_function.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore async def _delete_sql_user_defined_function_initial( # pylint: disable=inconsistent-return-statements self, @@ -3206,33 +4863,39 @@ async def _delete_sql_user_defined_function_initial( # pylint: disable=inconsis user_defined_function_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_user_defined_function_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_user_defined_function_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, user_defined_function_name=user_defined_function_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_user_defined_function_initial.metadata['url'], + template_url=self._delete_sql_user_defined_function_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -3242,11 +4905,10 @@ async def _delete_sql_user_defined_function_initial( # pylint: disable=inconsis if cls: return cls(pipeline_response, None, {}) - _delete_sql_user_defined_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore - + _delete_sql_user_defined_function_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore @distributed_trace_async - async def begin_delete_sql_user_defined_function( # pylint: disable=inconsistent-return-statements + async def begin_delete_sql_user_defined_function( self, resource_group_name: str, account_name: str, @@ -3258,14 +4920,15 @@ async def begin_delete_sql_user_defined_function( # pylint: disable=inconsisten """Deletes an existing Azure Cosmos DB SQL userDefinedFunction. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param user_defined_function_name: Cosmos DB userDefinedFunction name. + :param user_defined_function_name: Cosmos DB userDefinedFunction name. Required. :type user_defined_function_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3277,109 +4940,113 @@ async def begin_delete_sql_user_defined_function( # pylint: disable=inconsisten Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_sql_user_defined_function_initial( + raw_result = await self._delete_sql_user_defined_function_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, user_defined_function_name=user_defined_function_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_user_defined_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore + begin_delete_sql_user_defined_function.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore @distributed_trace def list_sql_triggers( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.SqlTriggerListResult"]: + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> AsyncIterable["_models.SqlTriggerGetResults"]: """Lists the SQL trigger under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlTriggerListResult or the result of + :return: An iterator like instance of either SqlTriggerGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlTriggerListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlTriggerGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlTriggerListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlTriggerListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_triggers_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_triggers.metadata['url'], + template_url=self.list_sql_triggers.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_triggers_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - container_name=container_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -3393,10 +5060,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -3406,11 +5071,9 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_sql_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers"} # type: ignore + list_sql_triggers.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers"} # type: ignore @distributed_trace_async async def get_sql_trigger( @@ -3421,66 +5084,72 @@ async def get_sql_trigger( container_name: str, trigger_name: str, **kwargs: Any - ) -> "_models.SqlTriggerGetResults": + ) -> _models.SqlTriggerGetResults: """Gets the SQL trigger under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param trigger_name: Cosmos DB trigger name. + :param trigger_name: Cosmos DB trigger name. Required. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlTriggerGetResults, or the result of cls(response) + :return: SqlTriggerGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlTriggerGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlTriggerGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlTriggerGetResults] - request = build_get_sql_trigger_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, trigger_name=trigger_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_trigger.metadata['url'], + template_url=self.get_sql_trigger.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlTriggerGetResults', pipeline_response) + deserialized = self._deserialize("SqlTriggerGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_trigger.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore - + get_sql_trigger.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore async def _create_update_sql_trigger_initial( self, @@ -3489,40 +5158,54 @@ async def _create_update_sql_trigger_initial( database_name: str, container_name: str, trigger_name: str, - create_update_sql_trigger_parameters: "_models.SqlTriggerCreateUpdateParameters", + create_update_sql_trigger_parameters: Union[_models.SqlTriggerCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.SqlTriggerGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlTriggerGetResults"]] + ) -> Optional[_models.SqlTriggerGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_sql_trigger_parameters, 'SqlTriggerCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlTriggerGetResults]] - request = build_create_update_sql_trigger_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_trigger_parameters, (IO, bytes)): + _content = create_update_sql_trigger_parameters + else: + _json = self._serialize.body(create_update_sql_trigger_parameters, "SqlTriggerCreateUpdateParameters") + + request = build_create_update_sql_trigger_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, trigger_name=trigger_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_trigger_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_trigger_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3531,15 +5214,107 @@ async def _create_update_sql_trigger_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlTriggerGetResults', pipeline_response) + deserialized = self._deserialize("SqlTriggerGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_trigger_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore + _create_update_sql_trigger_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore + + @overload + async def begin_create_update_sql_trigger( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + trigger_name: str, + create_update_sql_trigger_parameters: _models.SqlTriggerCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlTriggerGetResults]: + """Create or update an Azure Cosmos DB SQL trigger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param trigger_name: Cosmos DB trigger name. Required. + :type trigger_name: str + :param create_update_sql_trigger_parameters: The parameters to provide for the current SQL + trigger. Required. + :type create_update_sql_trigger_parameters: + ~azure.mgmt.cosmosdb.models.SqlTriggerCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlTriggerGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlTriggerGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_sql_trigger( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + trigger_name: str, + create_update_sql_trigger_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlTriggerGetResults]: + """Create or update an Azure Cosmos DB SQL trigger. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param trigger_name: Cosmos DB trigger name. Required. + :type trigger_name: str + :param create_update_sql_trigger_parameters: The parameters to provide for the current SQL + trigger. Required. + :type create_update_sql_trigger_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlTriggerGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlTriggerGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_sql_trigger( @@ -3549,25 +5324,29 @@ async def begin_create_update_sql_trigger( database_name: str, container_name: str, trigger_name: str, - create_update_sql_trigger_parameters: "_models.SqlTriggerCreateUpdateParameters", + create_update_sql_trigger_parameters: Union[_models.SqlTriggerCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.SqlTriggerGetResults"]: + ) -> AsyncLROPoller[_models.SqlTriggerGetResults]: """Create or update an Azure Cosmos DB SQL trigger. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param trigger_name: Cosmos DB trigger name. + :param trigger_name: Cosmos DB trigger name. Required. :type trigger_name: str :param create_update_sql_trigger_parameters: The parameters to provide for the current SQL - trigger. + trigger. Is either a model type or a IO type. Required. :type create_update_sql_trigger_parameters: - ~azure.mgmt.cosmosdb.models.SqlTriggerCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlTriggerCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -3579,19 +5358,19 @@ async def begin_create_update_sql_trigger( :return: An instance of AsyncLROPoller that returns either SqlTriggerGetResults or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlTriggerGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlTriggerGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlTriggerGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_sql_trigger_initial( + raw_result = await self._create_update_sql_trigger_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -3600,32 +5379,35 @@ async def begin_create_update_sql_trigger( create_update_sql_trigger_parameters=create_update_sql_trigger_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlTriggerGetResults', pipeline_response) + deserialized = self._deserialize("SqlTriggerGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_trigger.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore + begin_create_update_sql_trigger.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore async def _delete_sql_trigger_initial( # pylint: disable=inconsistent-return-statements self, @@ -3636,33 +5418,39 @@ async def _delete_sql_trigger_initial( # pylint: disable=inconsistent-return-st trigger_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_trigger_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_trigger_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, trigger_name=trigger_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_trigger_initial.metadata['url'], + template_url=self._delete_sql_trigger_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -3672,11 +5460,10 @@ async def _delete_sql_trigger_initial( # pylint: disable=inconsistent-return-st if cls: return cls(pipeline_response, None, {}) - _delete_sql_trigger_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore - + _delete_sql_trigger_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore @distributed_trace_async - async def begin_delete_sql_trigger( # pylint: disable=inconsistent-return-statements + async def begin_delete_sql_trigger( self, resource_group_name: str, account_name: str, @@ -3688,14 +5475,15 @@ async def begin_delete_sql_trigger( # pylint: disable=inconsistent-return-state """Deletes an existing Azure Cosmos DB SQL trigger. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param trigger_name: Cosmos DB trigger name. + :param trigger_name: Cosmos DB trigger name. Required. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3707,147 +5495,169 @@ async def begin_delete_sql_trigger( # pylint: disable=inconsistent-return-state Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_sql_trigger_initial( + raw_result = await self._delete_sql_trigger_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, trigger_name=trigger_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_trigger.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore + begin_delete_sql_trigger.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore @distributed_trace_async async def get_sql_role_definition( - self, - role_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.SqlRoleDefinitionGetResults": + self, role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.SqlRoleDefinitionGetResults: """Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. - :param role_definition_id: The GUID for the Role Definition. + :param role_definition_id: The GUID for the Role Definition. Required. :type role_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlRoleDefinitionGetResults, or the result of cls(response) + :return: SqlRoleDefinitionGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlRoleDefinitionGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlRoleDefinitionGetResults] - request = build_get_sql_role_definition_request( role_definition_id=role_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_role_definition.metadata['url'], + template_url=self.get_sql_role_definition.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlRoleDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("SqlRoleDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_role_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore - + get_sql_role_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore async def _create_update_sql_role_definition_initial( self, role_definition_id: str, resource_group_name: str, account_name: str, - create_update_sql_role_definition_parameters: "_models.SqlRoleDefinitionCreateUpdateParameters", + create_update_sql_role_definition_parameters: Union[_models.SqlRoleDefinitionCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.SqlRoleDefinitionGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlRoleDefinitionGetResults"]] + ) -> Optional[_models.SqlRoleDefinitionGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_sql_role_definition_parameters, 'SqlRoleDefinitionCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlRoleDefinitionGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_role_definition_parameters, (IO, bytes)): + _content = create_update_sql_role_definition_parameters + else: + _json = self._serialize.body( + create_update_sql_role_definition_parameters, "SqlRoleDefinitionCreateUpdateParameters" + ) - request = build_create_update_sql_role_definition_request_initial( + request = build_create_update_sql_role_definition_request( role_definition_id=role_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_role_definition_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_role_definition_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3856,15 +5666,97 @@ async def _create_update_sql_role_definition_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlRoleDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("SqlRoleDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_role_definition_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore + _create_update_sql_role_definition_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore + + @overload + async def begin_create_update_sql_role_definition( + self, + role_definition_id: str, + resource_group_name: str, + account_name: str, + create_update_sql_role_definition_parameters: _models.SqlRoleDefinitionCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlRoleDefinitionGetResults]: + """Creates or updates an Azure Cosmos DB SQL Role Definition. + + :param role_definition_id: The GUID for the Role Definition. Required. + :type role_definition_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_sql_role_definition_parameters: The properties required to create or + update a Role Definition. Required. + :type create_update_sql_role_definition_parameters: + ~azure.mgmt.cosmosdb.models.SqlRoleDefinitionCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlRoleDefinitionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_sql_role_definition( + self, + role_definition_id: str, + resource_group_name: str, + account_name: str, + create_update_sql_role_definition_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlRoleDefinitionGetResults]: + """Creates or updates an Azure Cosmos DB SQL Role Definition. + :param role_definition_id: The GUID for the Role Definition. Required. + :type role_definition_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_sql_role_definition_parameters: The properties required to create or + update a Role Definition. Required. + :type create_update_sql_role_definition_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlRoleDefinitionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_sql_role_definition( @@ -3872,21 +5764,25 @@ async def begin_create_update_sql_role_definition( role_definition_id: str, resource_group_name: str, account_name: str, - create_update_sql_role_definition_parameters: "_models.SqlRoleDefinitionCreateUpdateParameters", + create_update_sql_role_definition_parameters: Union[_models.SqlRoleDefinitionCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.SqlRoleDefinitionGetResults"]: + ) -> AsyncLROPoller[_models.SqlRoleDefinitionGetResults]: """Creates or updates an Azure Cosmos DB SQL Role Definition. - :param role_definition_id: The GUID for the Role Definition. + :param role_definition_id: The GUID for the Role Definition. Required. :type role_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param create_update_sql_role_definition_parameters: The properties required to create or - update a Role Definition. + update a Role Definition. Is either a model type or a IO type. Required. :type create_update_sql_role_definition_parameters: - ~azure.mgmt.cosmosdb.models.SqlRoleDefinitionCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlRoleDefinitionCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -3899,84 +5795,89 @@ async def begin_create_update_sql_role_definition( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlRoleDefinitionGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlRoleDefinitionGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_sql_role_definition_initial( + raw_result = await self._create_update_sql_role_definition_initial( # type: ignore role_definition_id=role_definition_id, resource_group_name=resource_group_name, account_name=account_name, create_update_sql_role_definition_parameters=create_update_sql_role_definition_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlRoleDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("SqlRoleDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_role_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore + begin_create_update_sql_role_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore async def _delete_sql_role_definition_initial( # pylint: disable=inconsistent-return-statements - self, - role_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + self, role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_role_definition_request_initial( + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_role_definition_request( role_definition_id=role_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_role_definition_initial.metadata['url'], + template_url=self._delete_sql_role_definition_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -3986,24 +5887,20 @@ async def _delete_sql_role_definition_initial( # pylint: disable=inconsistent-r if cls: return cls(pipeline_response, None, {}) - _delete_sql_role_definition_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore - + _delete_sql_role_definition_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore @distributed_trace_async - async def begin_delete_sql_role_definition( # pylint: disable=inconsistent-return-statements - self, - role_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + async def begin_delete_sql_role_definition( + self, role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB SQL Role Definition. - :param role_definition_id: The GUID for the Role Definition. + :param role_definition_id: The GUID for the Role Definition. Required. :type role_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -4015,97 +5912,105 @@ async def begin_delete_sql_role_definition( # pylint: disable=inconsistent-retu Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_sql_role_definition_initial( + raw_result = await self._delete_sql_role_definition_initial( # type: ignore role_definition_id=role_definition_id, resource_group_name=resource_group_name, account_name=account_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_role_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore + begin_delete_sql_role_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore @distributed_trace def list_sql_role_definitions( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.SqlRoleDefinitionListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.SqlRoleDefinitionGetResults"]: """Retrieves the list of all Azure Cosmos DB SQL Role Definitions. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlRoleDefinitionListResult or the result of + :return: An iterator like instance of either SqlRoleDefinitionGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlRoleDefinitionListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlRoleDefinitionListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_role_definitions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_role_definitions.metadata['url'], + template_url=self.list_sql_role_definitions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_role_definitions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -4119,10 +6024,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4132,111 +6035,127 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_sql_role_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions"} # type: ignore + list_sql_role_definitions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions"} # type: ignore @distributed_trace_async async def get_sql_role_assignment( - self, - role_assignment_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.SqlRoleAssignmentGetResults": + self, role_assignment_id: str, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.SqlRoleAssignmentGetResults: """Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. - :param role_assignment_id: The GUID for the Role Assignment. + :param role_assignment_id: The GUID for the Role Assignment. Required. :type role_assignment_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlRoleAssignmentGetResults, or the result of cls(response) + :return: SqlRoleAssignmentGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlRoleAssignmentGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlRoleAssignmentGetResults] - request = build_get_sql_role_assignment_request( role_assignment_id=role_assignment_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_role_assignment.metadata['url'], + template_url=self.get_sql_role_assignment.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlRoleAssignmentGetResults', pipeline_response) + deserialized = self._deserialize("SqlRoleAssignmentGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_role_assignment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore - + get_sql_role_assignment.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore async def _create_update_sql_role_assignment_initial( self, role_assignment_id: str, resource_group_name: str, account_name: str, - create_update_sql_role_assignment_parameters: "_models.SqlRoleAssignmentCreateUpdateParameters", + create_update_sql_role_assignment_parameters: Union[_models.SqlRoleAssignmentCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.SqlRoleAssignmentGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlRoleAssignmentGetResults"]] + ) -> Optional[_models.SqlRoleAssignmentGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_sql_role_assignment_parameters, 'SqlRoleAssignmentCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlRoleAssignmentGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_role_assignment_parameters, (IO, bytes)): + _content = create_update_sql_role_assignment_parameters + else: + _json = self._serialize.body( + create_update_sql_role_assignment_parameters, "SqlRoleAssignmentCreateUpdateParameters" + ) - request = build_create_update_sql_role_assignment_request_initial( + request = build_create_update_sql_role_assignment_request( role_assignment_id=role_assignment_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_role_assignment_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_role_assignment_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4245,15 +6164,97 @@ async def _create_update_sql_role_assignment_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlRoleAssignmentGetResults', pipeline_response) + deserialized = self._deserialize("SqlRoleAssignmentGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_role_assignment_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore + _create_update_sql_role_assignment_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore + + @overload + async def begin_create_update_sql_role_assignment( + self, + role_assignment_id: str, + resource_group_name: str, + account_name: str, + create_update_sql_role_assignment_parameters: _models.SqlRoleAssignmentCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlRoleAssignmentGetResults]: + """Creates or updates an Azure Cosmos DB SQL Role Assignment. + + :param role_assignment_id: The GUID for the Role Assignment. Required. + :type role_assignment_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_sql_role_assignment_parameters: The properties required to create or + update a Role Assignment. Required. + :type create_update_sql_role_assignment_parameters: + ~azure.mgmt.cosmosdb.models.SqlRoleAssignmentCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlRoleAssignmentGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_update_sql_role_assignment( + self, + role_assignment_id: str, + resource_group_name: str, + account_name: str, + create_update_sql_role_assignment_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SqlRoleAssignmentGetResults]: + """Creates or updates an Azure Cosmos DB SQL Role Assignment. + :param role_assignment_id: The GUID for the Role Assignment. Required. + :type role_assignment_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_sql_role_assignment_parameters: The properties required to create or + update a Role Assignment. Required. + :type create_update_sql_role_assignment_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlRoleAssignmentGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_create_update_sql_role_assignment( @@ -4261,21 +6262,25 @@ async def begin_create_update_sql_role_assignment( role_assignment_id: str, resource_group_name: str, account_name: str, - create_update_sql_role_assignment_parameters: "_models.SqlRoleAssignmentCreateUpdateParameters", + create_update_sql_role_assignment_parameters: Union[_models.SqlRoleAssignmentCreateUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.SqlRoleAssignmentGetResults"]: + ) -> AsyncLROPoller[_models.SqlRoleAssignmentGetResults]: """Creates or updates an Azure Cosmos DB SQL Role Assignment. - :param role_assignment_id: The GUID for the Role Assignment. + :param role_assignment_id: The GUID for the Role Assignment. Required. :type role_assignment_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param create_update_sql_role_assignment_parameters: The properties required to create or - update a Role Assignment. + update a Role Assignment. Is either a model type or a IO type. Required. :type create_update_sql_role_assignment_parameters: - ~azure.mgmt.cosmosdb.models.SqlRoleAssignmentCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlRoleAssignmentCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -4288,84 +6293,89 @@ async def begin_create_update_sql_role_assignment( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlRoleAssignmentGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlRoleAssignmentGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_sql_role_assignment_initial( + raw_result = await self._create_update_sql_role_assignment_initial( # type: ignore role_assignment_id=role_assignment_id, resource_group_name=resource_group_name, account_name=account_name, create_update_sql_role_assignment_parameters=create_update_sql_role_assignment_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlRoleAssignmentGetResults', pipeline_response) + deserialized = self._deserialize("SqlRoleAssignmentGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_role_assignment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore + begin_create_update_sql_role_assignment.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore async def _delete_sql_role_assignment_initial( # pylint: disable=inconsistent-return-statements - self, - role_assignment_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + self, role_assignment_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_role_assignment_request_initial( + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_role_assignment_request( role_assignment_id=role_assignment_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_role_assignment_initial.metadata['url'], + template_url=self._delete_sql_role_assignment_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -4375,24 +6385,20 @@ async def _delete_sql_role_assignment_initial( # pylint: disable=inconsistent-r if cls: return cls(pipeline_response, None, {}) - _delete_sql_role_assignment_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore - + _delete_sql_role_assignment_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore @distributed_trace_async - async def begin_delete_sql_role_assignment( # pylint: disable=inconsistent-return-statements - self, - role_assignment_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + async def begin_delete_sql_role_assignment( + self, role_assignment_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB SQL Role Assignment. - :param role_assignment_id: The GUID for the Role Assignment. + :param role_assignment_id: The GUID for the Role Assignment. Required. :type role_assignment_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -4404,97 +6410,105 @@ async def begin_delete_sql_role_assignment( # pylint: disable=inconsistent-retu Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_sql_role_assignment_initial( + raw_result = await self._delete_sql_role_assignment_initial( # type: ignore role_assignment_id=role_assignment_id, resource_group_name=resource_group_name, account_name=account_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_role_assignment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore + begin_delete_sql_role_assignment.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore @distributed_trace def list_sql_role_assignments( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.SqlRoleAssignmentListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.SqlRoleAssignmentGetResults"]: """Retrieves the list of all Azure Cosmos DB SQL Role Assignments. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlRoleAssignmentListResult or the result of + :return: An iterator like instance of either SqlRoleAssignmentGetResults or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlRoleAssignmentListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlRoleAssignmentListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_role_assignments_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_role_assignments.metadata['url'], + template_url=self.list_sql_role_assignments.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_role_assignments_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -4508,10 +6522,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4521,11 +6533,9 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_sql_role_assignments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments"} # type: ignore + list_sql_role_assignments.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments"} # type: ignore async def _retrieve_continuous_backup_information_initial( self, @@ -4533,39 +6543,53 @@ async def _retrieve_continuous_backup_information_initial( account_name: str, database_name: str, container_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> Optional["_models.BackupInformation"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupInformation"]] + ) -> Optional[_models.BackupInformation]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(location, 'ContinuousBackupRestoreLocation') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.BackupInformation]] - request = build_retrieve_continuous_backup_information_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(location, (IO, bytes)): + _content = location + else: + _json = self._serialize.body(location, "ContinuousBackupRestoreLocation") + + request = build_retrieve_continuous_backup_information_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._retrieve_continuous_backup_information_initial.metadata['url'], + content=_content, + template_url=self._retrieve_continuous_backup_information_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4574,15 +6598,98 @@ async def _retrieve_continuous_backup_information_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _retrieve_continuous_backup_information_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/retrieveContinuousBackupInformation"} # type: ignore + _retrieve_continuous_backup_information_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/retrieveContinuousBackupInformation"} # type: ignore + + @overload + async def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + location: _models.ContinuousBackupRestoreLocation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a container resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + location: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a container resource. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_retrieve_continuous_backup_information( @@ -4591,21 +6698,26 @@ async def begin_retrieve_continuous_backup_information( account_name: str, database_name: str, container_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.BackupInformation"]: + ) -> AsyncLROPoller[_models.BackupInformation]: """Retrieves continuous backup information for a container resource. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param location: The name of the continuous backup restore location. - :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :param location: The name of the continuous backup restore location. Is either a model type or + a IO type. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -4617,19 +6729,19 @@ async def begin_retrieve_continuous_backup_information( :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupInformation] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._retrieve_continuous_backup_information_initial( + raw_result = await self._retrieve_continuous_backup_information_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -4637,29 +6749,34 @@ async def begin_retrieve_continuous_backup_information( location=location, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_retrieve_continuous_backup_information.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/retrieveContinuousBackupInformation"} # type: ignore + begin_retrieve_continuous_backup_information.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/retrieveContinuousBackupInformation"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_table_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_table_resources_operations.py index daf72d97560..daf8fd375de 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_table_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/aio/operations/_table_resources_operations.py @@ -6,96 +6,118 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._vendor import _convert_request -from ...operations._table_resources_operations import build_create_update_table_request_initial, build_delete_table_request_initial, build_get_table_request, build_get_table_throughput_request, build_list_tables_request, build_migrate_table_to_autoscale_request_initial, build_migrate_table_to_manual_throughput_request_initial, build_retrieve_continuous_backup_information_request_initial, build_update_table_throughput_request_initial -T = TypeVar('T') +from ...operations._table_resources_operations import ( + build_create_update_table_request, + build_delete_table_request, + build_get_table_request, + build_get_table_throughput_request, + build_list_tables_request, + build_migrate_table_to_autoscale_request, + build_migrate_table_to_manual_throughput_request, + build_retrieve_continuous_backup_information_request, + build_update_table_throughput_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class TableResourcesOperations: - """TableResourcesOperations async operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class TableResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.aio.CosmosDBManagementClient`'s + :attr:`table_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_tables( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.TableListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterable["_models.TableGetResults"]: """Lists the Tables under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either TableListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.TableListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either TableGetResults or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.TableGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.TableListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.TableListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_tables_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_tables.metadata['url'], + template_url=self.list_tables.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_tables_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -109,10 +131,8 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -122,111 +142,125 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_tables.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables"} # type: ignore + list_tables.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables"} # type: ignore @distributed_trace_async async def get_table( - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any - ) -> "_models.TableGetResults": + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any + ) -> _models.TableGetResults: """Gets the Tables under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: TableGetResults, or the result of cls(response) + :return: TableGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.TableGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.TableGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.TableGetResults] - request = build_get_table_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_table.metadata['url'], + template_url=self.get_table.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('TableGetResults', pipeline_response) + deserialized = self._deserialize("TableGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore - + get_table.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore async def _create_update_table_initial( self, resource_group_name: str, account_name: str, table_name: str, - create_update_table_parameters: "_models.TableCreateUpdateParameters", + create_update_table_parameters: Union[_models.TableCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.TableGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TableGetResults"]] + ) -> Optional[_models.TableGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_table_parameters, 'TableCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.TableGetResults]] - request = build_create_update_table_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_table_parameters, (IO, bytes)): + _content = create_update_table_parameters + else: + _json = self._serialize.body(create_update_table_parameters, "TableCreateUpdateParameters") + + request = build_create_update_table_request( resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_table_initial.metadata['url'], + content=_content, + template_url=self._create_update_table_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -235,35 +269,120 @@ async def _create_update_table_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('TableGetResults', pipeline_response) + deserialized = self._deserialize("TableGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore + _create_update_table_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore + @overload + async def begin_create_update_table( + self, + resource_group_name: str, + account_name: str, + table_name: str, + create_update_table_parameters: _models.TableCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.TableGetResults]: + """Create or update an Azure Cosmos DB Table. - @distributed_trace_async + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param create_update_table_parameters: The parameters to provide for the current Table. + Required. + :type create_update_table_parameters: ~azure.mgmt.cosmosdb.models.TableCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either TableGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.TableGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload async def begin_create_update_table( self, resource_group_name: str, account_name: str, table_name: str, - create_update_table_parameters: "_models.TableCreateUpdateParameters", + create_update_table_parameters: IO, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller["_models.TableGetResults"]: + ) -> AsyncLROPoller[_models.TableGetResults]: """Create or update an Azure Cosmos DB Table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :param create_update_table_parameters: The parameters to provide for the current Table. + Required. + :type create_update_table_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either TableGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.TableGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_update_table( + self, + resource_group_name: str, + account_name: str, + table_name: str, + create_update_table_parameters: Union[_models.TableCreateUpdateParameters, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.TableGetResults]: + """Create or update an Azure Cosmos DB Table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param create_update_table_parameters: The parameters to provide for the current Table. Is + either a model type or a IO type. Required. :type create_update_table_parameters: ~azure.mgmt.cosmosdb.models.TableCreateUpdateParameters + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -275,84 +394,89 @@ async def begin_create_update_table( :return: An instance of AsyncLROPoller that returns either TableGetResults or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.TableGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.TableGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.TableGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_update_table_initial( + raw_result = await self._create_update_table_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, create_update_table_parameters=create_update_table_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('TableGetResults', pipeline_response) + deserialized = self._deserialize("TableGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore + begin_create_update_table.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore async def _delete_table_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_table_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_table_request( resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_table_initial.metadata['url'], + template_url=self._delete_table_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -362,24 +486,20 @@ async def _delete_table_initial( # pylint: disable=inconsistent-return-statemen if cls: return cls(pipeline_response, None, {}) - _delete_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore - + _delete_table_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore @distributed_trace_async - async def begin_delete_table( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any + async def begin_delete_table( + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Azure Cosmos DB Table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -391,146 +511,166 @@ async def begin_delete_table( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_table_initial( + raw_result = await self._delete_table_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore + begin_delete_table.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore @distributed_trace_async async def get_table_throughput( - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_table_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_table_throughput.metadata['url'], + template_url=self.get_table_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_table_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default"} # type: ignore - + get_table_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default"} # type: ignore async def _update_table_throughput_initial( self, resource_group_name: str, account_name: str, table_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_table_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_table_throughput_request( resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_table_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_table_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -539,15 +679,97 @@ async def _update_table_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_table_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default"} # type: ignore + _update_table_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default"} # type: ignore + @overload + async def begin_update_table_throughput( + self, + resource_group_name: str, + account_name: str, + table_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param update_throughput_parameters: The parameters to provide for the RUs per second of the + current Table. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_table_throughput( + self, + resource_group_name: str, + account_name: str, + table_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param update_throughput_parameters: The parameters to provide for the RUs per second of the + current Table. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_update_table_throughput( @@ -555,21 +777,25 @@ async def begin_update_table_throughput( resource_group_name: str, account_name: str, table_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB Table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :param update_throughput_parameters: The parameters to provide for the RUs per second of the - current Table. + current Table. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -582,84 +808,89 @@ async def begin_update_table_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_table_throughput_initial( + raw_result = await self._update_table_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_table_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default"} # type: ignore + begin_update_table_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default"} # type: ignore async def _migrate_table_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_table_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_table_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_table_to_autoscale_initial.metadata['url'], + template_url=self._migrate_table_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -668,31 +899,27 @@ async def _migrate_table_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_table_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_table_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace_async async def begin_migrate_table_to_autoscale( - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Table from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -706,81 +933,86 @@ async def begin_migrate_table_to_autoscale( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_table_to_autoscale_initial( + raw_result = await self._migrate_table_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_table_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_table_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore async def _migrate_table_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_table_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_table_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_table_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_table_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -789,31 +1021,27 @@ async def _migrate_table_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_table_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_table_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace_async async def begin_migrate_table_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Table from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -827,86 +1055,103 @@ async def begin_migrate_table_to_manual_throughput( result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._migrate_table_to_manual_throughput_initial( + raw_result = await self._migrate_table_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_table_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_table_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore async def _retrieve_continuous_backup_information_initial( self, resource_group_name: str, account_name: str, table_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> Optional["_models.BackupInformation"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupInformation"]] + ) -> Optional[_models.BackupInformation]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(location, 'ContinuousBackupRestoreLocation') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.BackupInformation]] - request = build_retrieve_continuous_backup_information_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(location, (IO, bytes)): + _content = location + else: + _json = self._serialize.body(location, "ContinuousBackupRestoreLocation") + + request = build_retrieve_continuous_backup_information_request( resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._retrieve_continuous_backup_information_initial.metadata['url'], + content=_content, + template_url=self._retrieve_continuous_backup_information_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -915,15 +1160,92 @@ async def _retrieve_continuous_backup_information_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _retrieve_continuous_backup_information_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/retrieveContinuousBackupInformation"} # type: ignore + _retrieve_continuous_backup_information_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/retrieveContinuousBackupInformation"} # type: ignore + + @overload + async def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + table_name: str, + location: _models.ContinuousBackupRestoreLocation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + table_name: str, + location: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a table. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async async def begin_retrieve_continuous_backup_information( @@ -931,19 +1253,24 @@ async def begin_retrieve_continuous_backup_information( resource_group_name: str, account_name: str, table_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> AsyncLROPoller["_models.BackupInformation"]: + ) -> AsyncLROPoller[_models.BackupInformation]: """Retrieves continuous backup information for a table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str - :param location: The name of the continuous backup restore location. - :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :param location: The name of the continuous backup restore location. Is either a model type or + a IO type. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -955,48 +1282,53 @@ async def begin_retrieve_continuous_backup_information( :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupInformation] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = await self._retrieve_continuous_backup_information_initial( + raw_result = await self._retrieve_continuous_backup_information_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, location=location, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_retrieve_continuous_backup_information.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/retrieveContinuousBackupInformation"} # type: ignore + begin_retrieve_continuous_backup_information.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/retrieveContinuousBackupInformation"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/__init__.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/__init__.py index 7dcc9966773..d6f05320863 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/__init__.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/__init__.py @@ -8,6 +8,7 @@ from ._models_py3 import ARMProxyResource from ._models_py3 import ARMResourceProperties +from ._models_py3 import AccountKeyMetadata from ._models_py3 import AnalyticalStorageConfiguration from ._models_py3 import ApiProperties from ._models_py3 import AuthenticationMethodLdapProperties @@ -22,6 +23,7 @@ from ._models_py3 import BackupResourceProperties from ._models_py3 import Capability from ._models_py3 import Capacity +from ._models_py3 import CassandraClusterDataCenterNodeItem from ._models_py3 import CassandraClusterPublicStatus from ._models_py3 import CassandraClusterPublicStatusDataCentersItem from ._models_py3 import CassandraKeyspaceCreateUpdateParameters @@ -58,8 +60,6 @@ from ._models_py3 import Column from ._models_py3 import CommandOutput from ._models_py3 import CommandPostBody -from ._models_py3 import Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties -from ._models_py3 import ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems from ._models_py3 import CompositePath from ._models_py3 import ConflictResolutionPolicy from ._models_py3 import ConnectionError @@ -86,6 +86,7 @@ from ._models_py3 import DatabaseAccountConnectionString from ._models_py3 import DatabaseAccountCreateUpdateParameters from ._models_py3 import DatabaseAccountGetResults +from ._models_py3 import DatabaseAccountKeysMetadata from ._models_py3 import DatabaseAccountListConnectionStringsResult from ._models_py3 import DatabaseAccountListKeysResult from ._models_py3 import DatabaseAccountListReadOnlyKeysResult @@ -137,6 +138,7 @@ from ._models_py3 import ManagedCassandraManagedServiceIdentity from ._models_py3 import ManagedCassandraReaperStatus from ._models_py3 import ManagedServiceIdentity +from ._models_py3 import ManagedServiceIdentityUserAssignedIdentity from ._models_py3 import MaterializedViewsBuilderRegionalServiceResource from ._models_py3 import MaterializedViewsBuilderServiceResource from ._models_py3 import MaterializedViewsBuilderServiceResourceProperties @@ -208,6 +210,7 @@ from ._models_py3 import RegionForOnlineOffline from ._models_py3 import RegionalServiceResource from ._models_py3 import Resource +from ._models_py3 import ResourceRestoreParameters from ._models_py3 import RestorableDatabaseAccountGetResult from ._models_py3 import RestorableDatabaseAccountsListResult from ._models_py3 import RestorableGremlinDatabaseGetResult @@ -216,6 +219,7 @@ from ._models_py3 import RestorableGremlinGraphGetResult from ._models_py3 import RestorableGremlinGraphPropertiesResource from ._models_py3 import RestorableGremlinGraphsListResult +from ._models_py3 import RestorableGremlinResourcesGetResult from ._models_py3 import RestorableGremlinResourcesListResult from ._models_py3 import RestorableLocationResource from ._models_py3 import RestorableMongodbCollectionGetResult @@ -224,6 +228,7 @@ from ._models_py3 import RestorableMongodbDatabaseGetResult from ._models_py3 import RestorableMongodbDatabasePropertiesResource from ._models_py3 import RestorableMongodbDatabasesListResult +from ._models_py3 import RestorableMongodbResourcesGetResult from ._models_py3 import RestorableMongodbResourcesListResult from ._models_py3 import RestorableSqlContainerGetResult from ._models_py3 import RestorableSqlContainerPropertiesResource @@ -233,12 +238,15 @@ from ._models_py3 import RestorableSqlDatabasePropertiesResource from ._models_py3 import RestorableSqlDatabasePropertiesResourceDatabase from ._models_py3 import RestorableSqlDatabasesListResult +from ._models_py3 import RestorableSqlResourcesGetResult from ._models_py3 import RestorableSqlResourcesListResult from ._models_py3 import RestorableTableGetResult from ._models_py3 import RestorableTablePropertiesResource +from ._models_py3 import RestorableTableResourcesGetResult from ._models_py3 import RestorableTableResourcesListResult from ._models_py3 import RestorableTablesListResult from ._models_py3 import RestoreParameters +from ._models_py3 import RestoreParametersBase from ._models_py3 import RetrieveThroughputParameters from ._models_py3 import RetrieveThroughputPropertiesResource from ._models_py3 import Role @@ -302,392 +310,402 @@ from ._models_py3 import UsagesResult from ._models_py3 import VirtualNetworkRule - -from ._cosmos_db_management_client_enums import ( - AnalyticalStorageSchemaType, - ApiType, - AuthenticationMethod, - BackupPolicyMigrationStatus, - BackupPolicyType, - BackupStorageRedundancy, - CompositePathSortOrder, - ConflictResolutionMode, - ConnectionState, - ConnectorOffer, - ContinuousTier, - CreateMode, - CreatedByType, - DataTransferComponent, - DataType, - DatabaseAccountKind, - DefaultConsistencyLevel, - EnableFullTextQuery, - IndexKind, - IndexingMode, - KeyKind, - ManagedCassandraProvisioningState, - ManagedCassandraResourceIdentityType, - MongoRoleDefinitionType, - NetworkAclBypass, - NodeState, - NodeStatus, - NotebookWorkspaceName, - OperationType, - PartitionKind, - PrimaryAggregationType, - PublicNetworkAccess, - ResourceIdentityType, - RestoreMode, - RoleDefinitionType, - ServerVersion, - ServiceSize, - ServiceStatus, - ServiceType, - SpatialType, - ThroughputPolicyType, - TriggerOperation, - TriggerType, - UnitType, -) +from ._cosmos_db_management_client_enums import AnalyticalStorageSchemaType +from ._cosmos_db_management_client_enums import ApiType +from ._cosmos_db_management_client_enums import AuthenticationMethod +from ._cosmos_db_management_client_enums import BackupPolicyMigrationStatus +from ._cosmos_db_management_client_enums import BackupPolicyType +from ._cosmos_db_management_client_enums import BackupStorageRedundancy +from ._cosmos_db_management_client_enums import CompositePathSortOrder +from ._cosmos_db_management_client_enums import ConflictResolutionMode +from ._cosmos_db_management_client_enums import ConnectionState +from ._cosmos_db_management_client_enums import ConnectorOffer +from ._cosmos_db_management_client_enums import ContinuousTier +from ._cosmos_db_management_client_enums import CreateMode +from ._cosmos_db_management_client_enums import CreatedByType +from ._cosmos_db_management_client_enums import DataTransferComponent +from ._cosmos_db_management_client_enums import DataType +from ._cosmos_db_management_client_enums import DatabaseAccountKind +from ._cosmos_db_management_client_enums import DefaultConsistencyLevel +from ._cosmos_db_management_client_enums import EnableFullTextQuery +from ._cosmos_db_management_client_enums import IndexKind +from ._cosmos_db_management_client_enums import IndexingMode +from ._cosmos_db_management_client_enums import KeyKind +from ._cosmos_db_management_client_enums import ManagedCassandraProvisioningState +from ._cosmos_db_management_client_enums import ManagedCassandraResourceIdentityType +from ._cosmos_db_management_client_enums import MongoRoleDefinitionType +from ._cosmos_db_management_client_enums import NetworkAclBypass +from ._cosmos_db_management_client_enums import NodeState +from ._cosmos_db_management_client_enums import NodeStatus +from ._cosmos_db_management_client_enums import NotebookWorkspaceName +from ._cosmos_db_management_client_enums import OperationType +from ._cosmos_db_management_client_enums import PartitionKind +from ._cosmos_db_management_client_enums import PrimaryAggregationType +from ._cosmos_db_management_client_enums import PublicNetworkAccess +from ._cosmos_db_management_client_enums import ResourceIdentityType +from ._cosmos_db_management_client_enums import RestoreMode +from ._cosmos_db_management_client_enums import RoleDefinitionType +from ._cosmos_db_management_client_enums import ServerVersion +from ._cosmos_db_management_client_enums import ServiceSize +from ._cosmos_db_management_client_enums import ServiceStatus +from ._cosmos_db_management_client_enums import ServiceType +from ._cosmos_db_management_client_enums import SpatialType +from ._cosmos_db_management_client_enums import ThroughputPolicyType +from ._cosmos_db_management_client_enums import TriggerOperation +from ._cosmos_db_management_client_enums import TriggerType +from ._cosmos_db_management_client_enums import UnitType +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk __all__ = [ - 'ARMProxyResource', - 'ARMResourceProperties', - 'AnalyticalStorageConfiguration', - 'ApiProperties', - 'AuthenticationMethodLdapProperties', - 'AutoUpgradePolicyResource', - 'AutoscaleSettings', - 'AutoscaleSettingsResource', - 'AzureBlobDataTransferDataSourceSink', - 'BackupInformation', - 'BackupPolicy', - 'BackupPolicyMigrationState', - 'BackupResource', - 'BackupResourceProperties', - 'Capability', - 'Capacity', - 'CassandraClusterPublicStatus', - 'CassandraClusterPublicStatusDataCentersItem', - 'CassandraKeyspaceCreateUpdateParameters', - 'CassandraKeyspaceGetPropertiesOptions', - 'CassandraKeyspaceGetPropertiesResource', - 'CassandraKeyspaceGetResults', - 'CassandraKeyspaceListResult', - 'CassandraKeyspaceResource', - 'CassandraPartitionKey', - 'CassandraSchema', - 'CassandraTableCreateUpdateParameters', - 'CassandraTableGetPropertiesOptions', - 'CassandraTableGetPropertiesResource', - 'CassandraTableGetResults', - 'CassandraTableListResult', - 'CassandraTableResource', - 'CassandraViewCreateUpdateParameters', - 'CassandraViewGetPropertiesOptions', - 'CassandraViewGetPropertiesResource', - 'CassandraViewGetResults', - 'CassandraViewListResult', - 'CassandraViewResource', - 'Certificate', - 'ClientEncryptionIncludedPath', - 'ClientEncryptionKeyCreateUpdateParameters', - 'ClientEncryptionKeyGetPropertiesResource', - 'ClientEncryptionKeyGetResults', - 'ClientEncryptionKeyResource', - 'ClientEncryptionKeysListResult', - 'ClientEncryptionPolicy', - 'ClusterKey', - 'ClusterResource', - 'ClusterResourceProperties', - 'Column', - 'CommandOutput', - 'CommandPostBody', - 'Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties', - 'ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems', - 'CompositePath', - 'ConflictResolutionPolicy', - 'ConnectionError', - 'ConsistencyPolicy', - 'ContainerPartitionKey', - 'ContinuousBackupInformation', - 'ContinuousBackupRestoreLocation', - 'ContinuousModeBackupPolicy', - 'ContinuousModeProperties', - 'CorsPolicy', - 'CosmosCassandraDataTransferDataSourceSink', - 'CosmosSqlDataTransferDataSourceSink', - 'CreateJobRequest', - 'CreateUpdateOptions', - 'DataCenterResource', - 'DataCenterResourceProperties', - 'DataTransferDataSourceSink', - 'DataTransferJobFeedResults', - 'DataTransferJobGetResults', - 'DataTransferJobProperties', - 'DataTransferRegionalServiceResource', - 'DataTransferServiceResource', - 'DataTransferServiceResourceProperties', - 'DatabaseAccountConnectionString', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountGetResults', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountUpdateParameters', - 'DatabaseAccountsListResult', - 'DatabaseRestoreResource', - 'DiagnosticLogSettings', - 'ErrorResponse', - 'ExcludedPath', - 'ExtendedResourceProperties', - 'FailoverPolicies', - 'FailoverPolicy', - 'GraphAPIComputeRegionalServiceResource', - 'GraphAPIComputeServiceResource', - 'GraphAPIComputeServiceResourceProperties', - 'GraphResource', - 'GraphResourceCreateUpdateParameters', - 'GraphResourceGetPropertiesOptions', - 'GraphResourceGetPropertiesResource', - 'GraphResourceGetResults', - 'GraphResourcesListResult', - 'GremlinDatabaseCreateUpdateParameters', - 'GremlinDatabaseGetPropertiesOptions', - 'GremlinDatabaseGetPropertiesResource', - 'GremlinDatabaseGetResults', - 'GremlinDatabaseListResult', - 'GremlinDatabaseResource', - 'GremlinDatabaseRestoreResource', - 'GremlinGraphCreateUpdateParameters', - 'GremlinGraphGetPropertiesOptions', - 'GremlinGraphGetPropertiesResource', - 'GremlinGraphGetResults', - 'GremlinGraphListResult', - 'GremlinGraphResource', - 'IncludedPath', - 'Indexes', - 'IndexingPolicy', - 'IpAddressOrRange', - 'KeyWrapMetadata', - 'ListBackups', - 'ListClusters', - 'ListDataCenters', - 'Location', - 'LocationGetResult', - 'LocationListResult', - 'LocationProperties', - 'ManagedCassandraARMResourceProperties', - 'ManagedCassandraManagedServiceIdentity', - 'ManagedCassandraReaperStatus', - 'ManagedServiceIdentity', - 'MaterializedViewsBuilderRegionalServiceResource', - 'MaterializedViewsBuilderServiceResource', - 'MaterializedViewsBuilderServiceResourceProperties', - 'MergeParameters', - 'Metric', - 'MetricAvailability', - 'MetricDefinition', - 'MetricDefinitionsListResult', - 'MetricListResult', - 'MetricName', - 'MetricValue', - 'MongoDBCollectionCreateUpdateParameters', - 'MongoDBCollectionGetPropertiesOptions', - 'MongoDBCollectionGetPropertiesResource', - 'MongoDBCollectionGetResults', - 'MongoDBCollectionListResult', - 'MongoDBCollectionResource', - 'MongoDBDatabaseCreateUpdateParameters', - 'MongoDBDatabaseGetPropertiesOptions', - 'MongoDBDatabaseGetPropertiesResource', - 'MongoDBDatabaseGetResults', - 'MongoDBDatabaseListResult', - 'MongoDBDatabaseResource', - 'MongoIndex', - 'MongoIndexKeys', - 'MongoIndexOptions', - 'MongoRoleDefinitionCreateUpdateParameters', - 'MongoRoleDefinitionGetResults', - 'MongoRoleDefinitionListResult', - 'MongoUserDefinitionCreateUpdateParameters', - 'MongoUserDefinitionGetResults', - 'MongoUserDefinitionListResult', - 'NotebookWorkspace', - 'NotebookWorkspaceConnectionInfoResult', - 'NotebookWorkspaceCreateUpdateParameters', - 'NotebookWorkspaceListResult', - 'Operation', - 'OperationDisplay', - 'OperationListResult', - 'OptionsResource', - 'PartitionMetric', - 'PartitionMetricListResult', - 'PartitionUsage', - 'PartitionUsagesResult', - 'PercentileMetric', - 'PercentileMetricListResult', - 'PercentileMetricValue', - 'PeriodicModeBackupPolicy', - 'PeriodicModeProperties', - 'Permission', - 'PhysicalPartitionId', - 'PhysicalPartitionStorageInfo', - 'PhysicalPartitionStorageInfoCollection', - 'PhysicalPartitionThroughputInfoProperties', - 'PhysicalPartitionThroughputInfoResource', - 'PhysicalPartitionThroughputInfoResult', - 'PhysicalPartitionThroughputInfoResultPropertiesResource', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', - 'PrivateEndpointProperty', - 'PrivateLinkResource', - 'PrivateLinkResourceListResult', - 'PrivateLinkServiceConnectionStateProperty', - 'Privilege', - 'PrivilegeResource', - 'ProxyResource', - 'RedistributeThroughputParameters', - 'RedistributeThroughputPropertiesResource', - 'RegionForOnlineOffline', - 'RegionalServiceResource', - 'Resource', - 'RestorableDatabaseAccountGetResult', - 'RestorableDatabaseAccountsListResult', - 'RestorableGremlinDatabaseGetResult', - 'RestorableGremlinDatabasePropertiesResource', - 'RestorableGremlinDatabasesListResult', - 'RestorableGremlinGraphGetResult', - 'RestorableGremlinGraphPropertiesResource', - 'RestorableGremlinGraphsListResult', - 'RestorableGremlinResourcesListResult', - 'RestorableLocationResource', - 'RestorableMongodbCollectionGetResult', - 'RestorableMongodbCollectionPropertiesResource', - 'RestorableMongodbCollectionsListResult', - 'RestorableMongodbDatabaseGetResult', - 'RestorableMongodbDatabasePropertiesResource', - 'RestorableMongodbDatabasesListResult', - 'RestorableMongodbResourcesListResult', - 'RestorableSqlContainerGetResult', - 'RestorableSqlContainerPropertiesResource', - 'RestorableSqlContainerPropertiesResourceContainer', - 'RestorableSqlContainersListResult', - 'RestorableSqlDatabaseGetResult', - 'RestorableSqlDatabasePropertiesResource', - 'RestorableSqlDatabasePropertiesResourceDatabase', - 'RestorableSqlDatabasesListResult', - 'RestorableSqlResourcesListResult', - 'RestorableTableGetResult', - 'RestorableTablePropertiesResource', - 'RestorableTableResourcesListResult', - 'RestorableTablesListResult', - 'RestoreParameters', - 'RetrieveThroughputParameters', - 'RetrieveThroughputPropertiesResource', - 'Role', - 'SeedNode', - 'ServiceResource', - 'ServiceResourceCreateUpdateParameters', - 'ServiceResourceListResult', - 'ServiceResourceProperties', - 'SpatialSpec', - 'SqlContainerCreateUpdateParameters', - 'SqlContainerGetPropertiesOptions', - 'SqlContainerGetPropertiesResource', - 'SqlContainerGetResults', - 'SqlContainerListResult', - 'SqlContainerResource', - 'SqlDatabaseCreateUpdateParameters', - 'SqlDatabaseGetPropertiesOptions', - 'SqlDatabaseGetPropertiesResource', - 'SqlDatabaseGetResults', - 'SqlDatabaseListResult', - 'SqlDatabaseResource', - 'SqlDedicatedGatewayRegionalServiceResource', - 'SqlDedicatedGatewayServiceResource', - 'SqlDedicatedGatewayServiceResourceProperties', - 'SqlRoleAssignmentCreateUpdateParameters', - 'SqlRoleAssignmentGetResults', - 'SqlRoleAssignmentListResult', - 'SqlRoleDefinitionCreateUpdateParameters', - 'SqlRoleDefinitionGetResults', - 'SqlRoleDefinitionListResult', - 'SqlStoredProcedureCreateUpdateParameters', - 'SqlStoredProcedureGetPropertiesResource', - 'SqlStoredProcedureGetResults', - 'SqlStoredProcedureListResult', - 'SqlStoredProcedureResource', - 'SqlTriggerCreateUpdateParameters', - 'SqlTriggerGetPropertiesResource', - 'SqlTriggerGetResults', - 'SqlTriggerListResult', - 'SqlTriggerResource', - 'SqlUserDefinedFunctionCreateUpdateParameters', - 'SqlUserDefinedFunctionGetPropertiesResource', - 'SqlUserDefinedFunctionGetResults', - 'SqlUserDefinedFunctionListResult', - 'SqlUserDefinedFunctionResource', - 'SystemData', - 'TableCreateUpdateParameters', - 'TableGetPropertiesOptions', - 'TableGetPropertiesResource', - 'TableGetResults', - 'TableListResult', - 'TableResource', - 'ThroughputPolicyResource', - 'ThroughputSettingsGetPropertiesResource', - 'ThroughputSettingsGetResults', - 'ThroughputSettingsResource', - 'ThroughputSettingsUpdateParameters', - 'UniqueKey', - 'UniqueKeyPolicy', - 'Usage', - 'UsagesResult', - 'VirtualNetworkRule', - 'AnalyticalStorageSchemaType', - 'ApiType', - 'AuthenticationMethod', - 'BackupPolicyMigrationStatus', - 'BackupPolicyType', - 'BackupStorageRedundancy', - 'CompositePathSortOrder', - 'ConflictResolutionMode', - 'ConnectionState', - 'ConnectorOffer', - 'ContinuousTier', - 'CreateMode', - 'CreatedByType', - 'DataTransferComponent', - 'DataType', - 'DatabaseAccountKind', - 'DefaultConsistencyLevel', - 'EnableFullTextQuery', - 'IndexKind', - 'IndexingMode', - 'KeyKind', - 'ManagedCassandraProvisioningState', - 'ManagedCassandraResourceIdentityType', - 'MongoRoleDefinitionType', - 'NetworkAclBypass', - 'NodeState', - 'NodeStatus', - 'NotebookWorkspaceName', - 'OperationType', - 'PartitionKind', - 'PrimaryAggregationType', - 'PublicNetworkAccess', - 'ResourceIdentityType', - 'RestoreMode', - 'RoleDefinitionType', - 'ServerVersion', - 'ServiceSize', - 'ServiceStatus', - 'ServiceType', - 'SpatialType', - 'ThroughputPolicyType', - 'TriggerOperation', - 'TriggerType', - 'UnitType', + "ARMProxyResource", + "ARMResourceProperties", + "AccountKeyMetadata", + "AnalyticalStorageConfiguration", + "ApiProperties", + "AuthenticationMethodLdapProperties", + "AutoUpgradePolicyResource", + "AutoscaleSettings", + "AutoscaleSettingsResource", + "AzureBlobDataTransferDataSourceSink", + "BackupInformation", + "BackupPolicy", + "BackupPolicyMigrationState", + "BackupResource", + "BackupResourceProperties", + "Capability", + "Capacity", + "CassandraClusterDataCenterNodeItem", + "CassandraClusterPublicStatus", + "CassandraClusterPublicStatusDataCentersItem", + "CassandraKeyspaceCreateUpdateParameters", + "CassandraKeyspaceGetPropertiesOptions", + "CassandraKeyspaceGetPropertiesResource", + "CassandraKeyspaceGetResults", + "CassandraKeyspaceListResult", + "CassandraKeyspaceResource", + "CassandraPartitionKey", + "CassandraSchema", + "CassandraTableCreateUpdateParameters", + "CassandraTableGetPropertiesOptions", + "CassandraTableGetPropertiesResource", + "CassandraTableGetResults", + "CassandraTableListResult", + "CassandraTableResource", + "CassandraViewCreateUpdateParameters", + "CassandraViewGetPropertiesOptions", + "CassandraViewGetPropertiesResource", + "CassandraViewGetResults", + "CassandraViewListResult", + "CassandraViewResource", + "Certificate", + "ClientEncryptionIncludedPath", + "ClientEncryptionKeyCreateUpdateParameters", + "ClientEncryptionKeyGetPropertiesResource", + "ClientEncryptionKeyGetResults", + "ClientEncryptionKeyResource", + "ClientEncryptionKeysListResult", + "ClientEncryptionPolicy", + "ClusterKey", + "ClusterResource", + "ClusterResourceProperties", + "Column", + "CommandOutput", + "CommandPostBody", + "CompositePath", + "ConflictResolutionPolicy", + "ConnectionError", + "ConsistencyPolicy", + "ContainerPartitionKey", + "ContinuousBackupInformation", + "ContinuousBackupRestoreLocation", + "ContinuousModeBackupPolicy", + "ContinuousModeProperties", + "CorsPolicy", + "CosmosCassandraDataTransferDataSourceSink", + "CosmosSqlDataTransferDataSourceSink", + "CreateJobRequest", + "CreateUpdateOptions", + "DataCenterResource", + "DataCenterResourceProperties", + "DataTransferDataSourceSink", + "DataTransferJobFeedResults", + "DataTransferJobGetResults", + "DataTransferJobProperties", + "DataTransferRegionalServiceResource", + "DataTransferServiceResource", + "DataTransferServiceResourceProperties", + "DatabaseAccountConnectionString", + "DatabaseAccountCreateUpdateParameters", + "DatabaseAccountGetResults", + "DatabaseAccountKeysMetadata", + "DatabaseAccountListConnectionStringsResult", + "DatabaseAccountListKeysResult", + "DatabaseAccountListReadOnlyKeysResult", + "DatabaseAccountRegenerateKeyParameters", + "DatabaseAccountUpdateParameters", + "DatabaseAccountsListResult", + "DatabaseRestoreResource", + "DiagnosticLogSettings", + "ErrorResponse", + "ExcludedPath", + "ExtendedResourceProperties", + "FailoverPolicies", + "FailoverPolicy", + "GraphAPIComputeRegionalServiceResource", + "GraphAPIComputeServiceResource", + "GraphAPIComputeServiceResourceProperties", + "GraphResource", + "GraphResourceCreateUpdateParameters", + "GraphResourceGetPropertiesOptions", + "GraphResourceGetPropertiesResource", + "GraphResourceGetResults", + "GraphResourcesListResult", + "GremlinDatabaseCreateUpdateParameters", + "GremlinDatabaseGetPropertiesOptions", + "GremlinDatabaseGetPropertiesResource", + "GremlinDatabaseGetResults", + "GremlinDatabaseListResult", + "GremlinDatabaseResource", + "GremlinDatabaseRestoreResource", + "GremlinGraphCreateUpdateParameters", + "GremlinGraphGetPropertiesOptions", + "GremlinGraphGetPropertiesResource", + "GremlinGraphGetResults", + "GremlinGraphListResult", + "GremlinGraphResource", + "IncludedPath", + "Indexes", + "IndexingPolicy", + "IpAddressOrRange", + "KeyWrapMetadata", + "ListBackups", + "ListClusters", + "ListDataCenters", + "Location", + "LocationGetResult", + "LocationListResult", + "LocationProperties", + "ManagedCassandraARMResourceProperties", + "ManagedCassandraManagedServiceIdentity", + "ManagedCassandraReaperStatus", + "ManagedServiceIdentity", + "ManagedServiceIdentityUserAssignedIdentity", + "MaterializedViewsBuilderRegionalServiceResource", + "MaterializedViewsBuilderServiceResource", + "MaterializedViewsBuilderServiceResourceProperties", + "MergeParameters", + "Metric", + "MetricAvailability", + "MetricDefinition", + "MetricDefinitionsListResult", + "MetricListResult", + "MetricName", + "MetricValue", + "MongoDBCollectionCreateUpdateParameters", + "MongoDBCollectionGetPropertiesOptions", + "MongoDBCollectionGetPropertiesResource", + "MongoDBCollectionGetResults", + "MongoDBCollectionListResult", + "MongoDBCollectionResource", + "MongoDBDatabaseCreateUpdateParameters", + "MongoDBDatabaseGetPropertiesOptions", + "MongoDBDatabaseGetPropertiesResource", + "MongoDBDatabaseGetResults", + "MongoDBDatabaseListResult", + "MongoDBDatabaseResource", + "MongoIndex", + "MongoIndexKeys", + "MongoIndexOptions", + "MongoRoleDefinitionCreateUpdateParameters", + "MongoRoleDefinitionGetResults", + "MongoRoleDefinitionListResult", + "MongoUserDefinitionCreateUpdateParameters", + "MongoUserDefinitionGetResults", + "MongoUserDefinitionListResult", + "NotebookWorkspace", + "NotebookWorkspaceConnectionInfoResult", + "NotebookWorkspaceCreateUpdateParameters", + "NotebookWorkspaceListResult", + "Operation", + "OperationDisplay", + "OperationListResult", + "OptionsResource", + "PartitionMetric", + "PartitionMetricListResult", + "PartitionUsage", + "PartitionUsagesResult", + "PercentileMetric", + "PercentileMetricListResult", + "PercentileMetricValue", + "PeriodicModeBackupPolicy", + "PeriodicModeProperties", + "Permission", + "PhysicalPartitionId", + "PhysicalPartitionStorageInfo", + "PhysicalPartitionStorageInfoCollection", + "PhysicalPartitionThroughputInfoProperties", + "PhysicalPartitionThroughputInfoResource", + "PhysicalPartitionThroughputInfoResult", + "PhysicalPartitionThroughputInfoResultPropertiesResource", + "PrivateEndpointConnection", + "PrivateEndpointConnectionListResult", + "PrivateEndpointProperty", + "PrivateLinkResource", + "PrivateLinkResourceListResult", + "PrivateLinkServiceConnectionStateProperty", + "Privilege", + "PrivilegeResource", + "ProxyResource", + "RedistributeThroughputParameters", + "RedistributeThroughputPropertiesResource", + "RegionForOnlineOffline", + "RegionalServiceResource", + "Resource", + "ResourceRestoreParameters", + "RestorableDatabaseAccountGetResult", + "RestorableDatabaseAccountsListResult", + "RestorableGremlinDatabaseGetResult", + "RestorableGremlinDatabasePropertiesResource", + "RestorableGremlinDatabasesListResult", + "RestorableGremlinGraphGetResult", + "RestorableGremlinGraphPropertiesResource", + "RestorableGremlinGraphsListResult", + "RestorableGremlinResourcesGetResult", + "RestorableGremlinResourcesListResult", + "RestorableLocationResource", + "RestorableMongodbCollectionGetResult", + "RestorableMongodbCollectionPropertiesResource", + "RestorableMongodbCollectionsListResult", + "RestorableMongodbDatabaseGetResult", + "RestorableMongodbDatabasePropertiesResource", + "RestorableMongodbDatabasesListResult", + "RestorableMongodbResourcesGetResult", + "RestorableMongodbResourcesListResult", + "RestorableSqlContainerGetResult", + "RestorableSqlContainerPropertiesResource", + "RestorableSqlContainerPropertiesResourceContainer", + "RestorableSqlContainersListResult", + "RestorableSqlDatabaseGetResult", + "RestorableSqlDatabasePropertiesResource", + "RestorableSqlDatabasePropertiesResourceDatabase", + "RestorableSqlDatabasesListResult", + "RestorableSqlResourcesGetResult", + "RestorableSqlResourcesListResult", + "RestorableTableGetResult", + "RestorableTablePropertiesResource", + "RestorableTableResourcesGetResult", + "RestorableTableResourcesListResult", + "RestorableTablesListResult", + "RestoreParameters", + "RestoreParametersBase", + "RetrieveThroughputParameters", + "RetrieveThroughputPropertiesResource", + "Role", + "SeedNode", + "ServiceResource", + "ServiceResourceCreateUpdateParameters", + "ServiceResourceListResult", + "ServiceResourceProperties", + "SpatialSpec", + "SqlContainerCreateUpdateParameters", + "SqlContainerGetPropertiesOptions", + "SqlContainerGetPropertiesResource", + "SqlContainerGetResults", + "SqlContainerListResult", + "SqlContainerResource", + "SqlDatabaseCreateUpdateParameters", + "SqlDatabaseGetPropertiesOptions", + "SqlDatabaseGetPropertiesResource", + "SqlDatabaseGetResults", + "SqlDatabaseListResult", + "SqlDatabaseResource", + "SqlDedicatedGatewayRegionalServiceResource", + "SqlDedicatedGatewayServiceResource", + "SqlDedicatedGatewayServiceResourceProperties", + "SqlRoleAssignmentCreateUpdateParameters", + "SqlRoleAssignmentGetResults", + "SqlRoleAssignmentListResult", + "SqlRoleDefinitionCreateUpdateParameters", + "SqlRoleDefinitionGetResults", + "SqlRoleDefinitionListResult", + "SqlStoredProcedureCreateUpdateParameters", + "SqlStoredProcedureGetPropertiesResource", + "SqlStoredProcedureGetResults", + "SqlStoredProcedureListResult", + "SqlStoredProcedureResource", + "SqlTriggerCreateUpdateParameters", + "SqlTriggerGetPropertiesResource", + "SqlTriggerGetResults", + "SqlTriggerListResult", + "SqlTriggerResource", + "SqlUserDefinedFunctionCreateUpdateParameters", + "SqlUserDefinedFunctionGetPropertiesResource", + "SqlUserDefinedFunctionGetResults", + "SqlUserDefinedFunctionListResult", + "SqlUserDefinedFunctionResource", + "SystemData", + "TableCreateUpdateParameters", + "TableGetPropertiesOptions", + "TableGetPropertiesResource", + "TableGetResults", + "TableListResult", + "TableResource", + "ThroughputPolicyResource", + "ThroughputSettingsGetPropertiesResource", + "ThroughputSettingsGetResults", + "ThroughputSettingsResource", + "ThroughputSettingsUpdateParameters", + "UniqueKey", + "UniqueKeyPolicy", + "Usage", + "UsagesResult", + "VirtualNetworkRule", + "AnalyticalStorageSchemaType", + "ApiType", + "AuthenticationMethod", + "BackupPolicyMigrationStatus", + "BackupPolicyType", + "BackupStorageRedundancy", + "CompositePathSortOrder", + "ConflictResolutionMode", + "ConnectionState", + "ConnectorOffer", + "ContinuousTier", + "CreateMode", + "CreatedByType", + "DataTransferComponent", + "DataType", + "DatabaseAccountKind", + "DefaultConsistencyLevel", + "EnableFullTextQuery", + "IndexKind", + "IndexingMode", + "KeyKind", + "ManagedCassandraProvisioningState", + "ManagedCassandraResourceIdentityType", + "MongoRoleDefinitionType", + "NetworkAclBypass", + "NodeState", + "NodeStatus", + "NotebookWorkspaceName", + "OperationType", + "PartitionKind", + "PrimaryAggregationType", + "PublicNetworkAccess", + "ResourceIdentityType", + "RestoreMode", + "RoleDefinitionType", + "ServerVersion", + "ServiceSize", + "ServiceStatus", + "ServiceType", + "SpatialType", + "ThroughputPolicyType", + "TriggerOperation", + "TriggerType", + "UnitType", ] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_cosmos_db_management_client_enums.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_cosmos_db_management_client_enums.py index c8e6f111d4e..60fea4b04af 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_cosmos_db_management_client_enums.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_cosmos_db_management_client_enums.py @@ -7,20 +7,18 @@ # -------------------------------------------------------------------------- from enum import Enum -from six import with_metaclass from azure.core import CaseInsensitiveEnumMeta -class AnalyticalStorageSchemaType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describes the types of schema for analytical storage. - """ +class AnalyticalStorageSchemaType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Describes the types of schema for analytical storage.""" WELL_DEFINED = "WellDefined" FULL_FIDELITY = "FullFidelity" -class ApiType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enum to indicate the API type of the restorable database account. - """ + +class ApiType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to indicate the API type of the restorable database account.""" MONGO_DB = "MongoDB" GREMLIN = "Gremlin" @@ -29,7 +27,8 @@ class ApiType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): SQL = "Sql" GREMLIN_V2 = "GremlinV2" -class AuthenticationMethod(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + +class AuthenticationMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Which authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, so should not be used except in emergencies. 'Cassandra' is the default password based authentication. The default is 'Cassandra'. 'Ldap' is in preview. @@ -39,47 +38,47 @@ class AuthenticationMethod(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): CASSANDRA = "Cassandra" LDAP = "Ldap" -class BackupPolicyMigrationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describes the status of migration between backup policy types. - """ + +class BackupPolicyMigrationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Describes the status of migration between backup policy types.""" INVALID = "Invalid" IN_PROGRESS = "InProgress" COMPLETED = "Completed" FAILED = "Failed" -class BackupPolicyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describes the mode of backups. - """ + +class BackupPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Describes the mode of backups.""" PERIODIC = "Periodic" CONTINUOUS = "Continuous" -class BackupStorageRedundancy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enum to indicate type of backup storage redundancy. - """ + +class BackupStorageRedundancy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to indicate type of backup storage redundancy.""" GEO = "Geo" LOCAL = "Local" ZONE = "Zone" -class CompositePathSortOrder(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Sort order for composite paths. - """ + +class CompositePathSortOrder(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Sort order for composite paths.""" ASCENDING = "ascending" DESCENDING = "descending" -class ConflictResolutionMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Indicates the conflict resolution mode. - """ + +class ConflictResolutionMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates the conflict resolution mode.""" LAST_WRITER_WINS = "LastWriterWins" CUSTOM = "Custom" -class ConnectionState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of connection error that occurred. - """ + +class ConnectionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The kind of connection error that occurred.""" UNKNOWN = "Unknown" OK = "OK" @@ -88,52 +87,54 @@ class ConnectionState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): INTERNAL_OPERATOR_TO_DATA_CENTER_CERTIFICATE_ERROR = "InternalOperatorToDataCenterCertificateError" INTERNAL_ERROR = "InternalError" -class ConnectorOffer(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The cassandra connector offer type for the Cosmos DB C* database account. - """ + +class ConnectorOffer(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The cassandra connector offer type for the Cosmos DB C* database account.""" SMALL = "Small" -class ContinuousTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enum to indicate type of Continuous backup tier. - """ + +class ContinuousTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to indicate type of Continuous backup tier.""" CONTINUOUS7_DAYS = "Continuous7Days" CONTINUOUS30_DAYS = "Continuous30Days" -class CreatedByType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of identity that created the resource. - """ + +class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of identity that created the resource.""" USER = "User" APPLICATION = "Application" MANAGED_IDENTITY = "ManagedIdentity" KEY = "Key" -class CreateMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enum to indicate the mode of account creation. - """ + +class CreateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to indicate the mode of account creation.""" DEFAULT = "Default" RESTORE = "Restore" -class DatabaseAccountKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Indicates the type of database account. This can only be set at database account creation. - """ + +class DatabaseAccountKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates the type of database account. This can only be set at database account creation.""" GLOBAL_DOCUMENT_DB = "GlobalDocumentDB" MONGO_DB = "MongoDB" PARSE = "Parse" -class DataTransferComponent(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + +class DataTransferComponent(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """DataTransferComponent.""" COSMOS_DB_CASSANDRA = "CosmosDBCassandra" COSMOS_DB_SQL = "CosmosDBSql" AZURE_BLOB_STORAGE = "AzureBlobStorage" -class DataType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The datatype for which the indexing behavior is applied to. - """ + +class DataType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The datatype for which the indexing behavior is applied to.""" STRING = "String" NUMBER = "Number" @@ -142,9 +143,9 @@ class DataType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): LINE_STRING = "LineString" MULTI_POLYGON = "MultiPolygon" -class DefaultConsistencyLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The default consistency level and configuration settings of the Cosmos DB account. - """ + +class DefaultConsistencyLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The default consistency level and configuration settings of the Cosmos DB account.""" EVENTUAL = "Eventual" SESSION = "Session" @@ -152,42 +153,42 @@ class DefaultConsistencyLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum) STRONG = "Strong" CONSISTENT_PREFIX = "ConsistentPrefix" -class EnableFullTextQuery(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describe the level of detail with which queries are to be logged. - """ + +class EnableFullTextQuery(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Describe the level of detail with which queries are to be logged.""" NONE = "None" TRUE = "True" FALSE = "False" -class IndexingMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Indicates the indexing mode. - """ + +class IndexingMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates the indexing mode.""" CONSISTENT = "consistent" LAZY = "lazy" NONE = "none" -class IndexKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Indicates the type of index. - """ + +class IndexKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates the type of index.""" HASH = "Hash" RANGE = "Range" SPATIAL = "Spatial" -class KeyKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The access key to regenerate. - """ + +class KeyKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The access key to regenerate.""" PRIMARY = "primary" SECONDARY = "secondary" PRIMARY_READONLY = "primaryReadonly" SECONDARY_READONLY = "secondaryReadonly" -class ManagedCassandraProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The status of the resource at the time the operation was called. - """ + +class ManagedCassandraProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The status of the resource at the time the operation was called.""" CREATING = "Creating" UPDATING = "Updating" @@ -196,30 +197,30 @@ class ManagedCassandraProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, FAILED = "Failed" CANCELED = "Canceled" -class ManagedCassandraResourceIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of the resource. - """ + +class ManagedCassandraResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the resource.""" SYSTEM_ASSIGNED = "SystemAssigned" NONE = "None" -class MongoRoleDefinitionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Indicates whether the Role Definition was built-in or user created. - """ + +class MongoRoleDefinitionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates whether the Role Definition was built-in or user created.""" BUILT_IN_ROLE = "BuiltInRole" CUSTOM_ROLE = "CustomRole" -class NetworkAclBypass(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Indicates what services are allowed to bypass firewall checks. - """ + +class NetworkAclBypass(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates what services are allowed to bypass firewall checks.""" NONE = "None" AZURE_SERVICES = "AzureServices" -class NodeState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The state of the node in Cassandra ring. - """ + +class NodeState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The state of the node in Cassandra ring.""" NORMAL = "Normal" LEAVING = "Leaving" @@ -227,38 +228,42 @@ class NodeState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): MOVING = "Moving" STOPPED = "Stopped" -class NodeStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Indicates whether the node is functioning or not. - """ + +class NodeStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates whether the node is functioning or not.""" UP = "Up" DOWN = "Down" -class NotebookWorkspaceName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + +class NotebookWorkspaceName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """NotebookWorkspaceName.""" DEFAULT = "default" -class OperationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enum to indicate the operation type of the event. - """ + +class OperationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to indicate the operation type of the event.""" CREATE = "Create" REPLACE = "Replace" DELETE = "Delete" + RECREATE = "Recreate" SYSTEM_OPERATION = "SystemOperation" -class PartitionKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + +class PartitionKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys - (upto three maximum) are supported for container create + (upto three maximum) are supported for container create. """ HASH = "Hash" RANGE = "Range" MULTI_HASH = "MultiHash" -class PrimaryAggregationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The primary aggregation type of the metric. - """ + +class PrimaryAggregationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The primary aggregation type of the metric.""" NONE = "None" AVERAGE = "Average" @@ -267,14 +272,15 @@ class PrimaryAggregationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)) MAXIMUM = "Maximum" LAST = "Last" -class PublicNetworkAccess(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Whether requests from Public Network are allowed - """ + +class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Whether requests from Public Network are allowed.""" ENABLED = "Enabled" DISABLED = "Disabled" -class ResourceIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + +class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. @@ -285,39 +291,39 @@ class ResourceIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" NONE = "None" -class RestoreMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describes the mode of the restore. - """ + +class RestoreMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Describes the mode of the restore.""" POINT_IN_TIME = "PointInTime" -class RoleDefinitionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Indicates whether the Role Definition was built-in or user created. - """ + +class RoleDefinitionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates whether the Role Definition was built-in or user created.""" BUILT_IN_ROLE = "BuiltInRole" CUSTOM_ROLE = "CustomRole" -class ServerVersion(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describes the ServerVersion of an a MongoDB account. - """ + +class ServerVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Describes the ServerVersion of an a MongoDB account.""" THREE2 = "3.2" THREE6 = "3.6" FOUR0 = "4.0" FOUR2 = "4.2" -class ServiceSize(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Instance type for the service. - """ + +class ServiceSize(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Instance type for the service.""" COSMOS_D4_S = "Cosmos.D4s" COSMOS_D8_S = "Cosmos.D8s" COSMOS_D16_S = "Cosmos.D16s" -class ServiceStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describes the status of a service. - """ + +class ServiceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Describes the status of a service.""" CREATING = "Creating" RUNNING = "Running" @@ -326,35 +332,35 @@ class ServiceStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): ERROR = "Error" STOPPED = "Stopped" -class ServiceType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """ServiceType for the service. - """ + +class ServiceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """ServiceType for the service.""" SQL_DEDICATED_GATEWAY = "SqlDedicatedGateway" DATA_TRANSFER = "DataTransfer" GRAPH_API_COMPUTE = "GraphAPICompute" MATERIALIZED_VIEWS_BUILDER = "MaterializedViewsBuilder" -class SpatialType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Indicates the spatial type of index. - """ + +class SpatialType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates the spatial type of index.""" POINT = "Point" LINE_STRING = "LineString" POLYGON = "Polygon" MULTI_POLYGON = "MultiPolygon" -class ThroughputPolicyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """ThroughputPolicy to apply for throughput redistribution - """ + +class ThroughputPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """ThroughputPolicy to apply for throughput redistribution.""" NONE = "none" EQUAL = "equal" CUSTOM = "custom" -class TriggerOperation(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The operation the trigger is associated with - """ + +class TriggerOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The operation the trigger is associated with.""" ALL = "All" CREATE = "Create" @@ -362,16 +368,16 @@ class TriggerOperation(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): DELETE = "Delete" REPLACE = "Replace" -class TriggerType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Type of the Trigger - """ + +class TriggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of the Trigger.""" PRE = "Pre" POST = "Post" -class UnitType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The unit of the metric. - """ + +class UnitType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The unit of the metric.""" COUNT = "Count" BYTES = "Bytes" diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py index ae29bf02b43..8eb6317387b 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py @@ -1,4 +1,5 @@ # coding=utf-8 +# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -7,69 +8,91 @@ # -------------------------------------------------------------------------- import datetime -from typing import Any, Dict, List, Optional, Union +import sys +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union -from azure.core.exceptions import HttpResponseError -import msrest.serialization +from .. import _serialization -from ._cosmos_db_management_client_enums import * +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from .. import models as _models +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object -class AnalyticalStorageConfiguration(msrest.serialization.Model): +class AccountKeyMetadata(_serialization.Model): + """The metadata related to an access key for a given database account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar generation_time: Generation time in UTC of the key in ISO-8601 format. If the value is + missing from the object, it means that the last key regeneration was triggered before + 2022-06-18. + :vartype generation_time: ~datetime.datetime + """ + + _validation = { + "generation_time": {"readonly": True}, + } + + _attribute_map = { + "generation_time": {"key": "generationTime", "type": "iso-8601"}, + } + + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.generation_time = None + + +class AnalyticalStorageConfiguration(_serialization.Model): """Analytical storage specific properties. - :ivar schema_type: Describes the types of schema for analytical storage. Possible values - include: "WellDefined", "FullFidelity". + :ivar schema_type: Describes the types of schema for analytical storage. Known values are: + "WellDefined" and "FullFidelity". :vartype schema_type: str or ~azure.mgmt.cosmosdb.models.AnalyticalStorageSchemaType """ _attribute_map = { - 'schema_type': {'key': 'schemaType', 'type': 'str'}, + "schema_type": {"key": "schemaType", "type": "str"}, } - def __init__( - self, - *, - schema_type: Optional[Union[str, "AnalyticalStorageSchemaType"]] = None, - **kwargs - ): + def __init__(self, *, schema_type: Optional[Union[str, "_models.AnalyticalStorageSchemaType"]] = None, **kwargs): """ - :keyword schema_type: Describes the types of schema for analytical storage. Possible values - include: "WellDefined", "FullFidelity". + :keyword schema_type: Describes the types of schema for analytical storage. Known values are: + "WellDefined" and "FullFidelity". :paramtype schema_type: str or ~azure.mgmt.cosmosdb.models.AnalyticalStorageSchemaType """ - super(AnalyticalStorageConfiguration, self).__init__(**kwargs) + super().__init__(**kwargs) self.schema_type = schema_type -class ApiProperties(msrest.serialization.Model): +class ApiProperties(_serialization.Model): """ApiProperties. - :ivar server_version: Describes the ServerVersion of an a MongoDB account. Possible values - include: "3.2", "3.6", "4.0", "4.2". + :ivar server_version: Describes the ServerVersion of an a MongoDB account. Known values are: + "3.2", "3.6", "4.0", and "4.2". :vartype server_version: str or ~azure.mgmt.cosmosdb.models.ServerVersion """ _attribute_map = { - 'server_version': {'key': 'serverVersion', 'type': 'str'}, + "server_version": {"key": "serverVersion", "type": "str"}, } - def __init__( - self, - *, - server_version: Optional[Union[str, "ServerVersion"]] = None, - **kwargs - ): + def __init__(self, *, server_version: Optional[Union[str, "_models.ServerVersion"]] = None, **kwargs): """ - :keyword server_version: Describes the ServerVersion of an a MongoDB account. Possible values - include: "3.2", "3.6", "4.0", "4.2". + :keyword server_version: Describes the ServerVersion of an a MongoDB account. Known values are: + "3.2", "3.6", "4.0", and "4.2". :paramtype server_version: str or ~azure.mgmt.cosmosdb.models.ServerVersion """ - super(ApiProperties, self).__init__(**kwargs) + super().__init__(**kwargs) self.server_version = server_version -class ARMProxyResource(msrest.serialization.Model): +class ARMProxyResource(_serialization.Model): """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. Variables are only populated by the server, and will be ignored when sending a request. @@ -83,30 +106,26 @@ class ARMProxyResource(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(ARMProxyResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.id = None self.name = None self.type = None -class ARMResourceProperties(msrest.serialization.Model): +class ARMResourceProperties(_serialization.Model): """The core properties of ARM resources. Variables are only populated by the server, and will be ignored when sending a request. @@ -119,30 +138,30 @@ class ARMResourceProperties(msrest.serialization.Model): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, } def __init__( @@ -150,23 +169,23 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity """ - super(ARMResourceProperties, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = None self.name = None self.type = None @@ -175,7 +194,7 @@ def __init__( self.identity = identity -class AuthenticationMethodLdapProperties(msrest.serialization.Model): +class AuthenticationMethodLdapProperties(_serialization.Model): """Ldap authentication method properties. This feature is in preview. :ivar server_hostname: Hostname of the LDAP server. @@ -198,13 +217,13 @@ class AuthenticationMethodLdapProperties(msrest.serialization.Model): """ _attribute_map = { - 'server_hostname': {'key': 'serverHostname', 'type': 'str'}, - 'server_port': {'key': 'serverPort', 'type': 'int'}, - 'service_user_distinguished_name': {'key': 'serviceUserDistinguishedName', 'type': 'str'}, - 'service_user_password': {'key': 'serviceUserPassword', 'type': 'str'}, - 'search_base_distinguished_name': {'key': 'searchBaseDistinguishedName', 'type': 'str'}, - 'search_filter_template': {'key': 'searchFilterTemplate', 'type': 'str'}, - 'server_certificates': {'key': 'serverCertificates', 'type': '[Certificate]'}, + "server_hostname": {"key": "serverHostname", "type": "str"}, + "server_port": {"key": "serverPort", "type": "int"}, + "service_user_distinguished_name": {"key": "serviceUserDistinguishedName", "type": "str"}, + "service_user_password": {"key": "serviceUserPassword", "type": "str"}, + "search_base_distinguished_name": {"key": "searchBaseDistinguishedName", "type": "str"}, + "search_filter_template": {"key": "searchFilterTemplate", "type": "str"}, + "server_certificates": {"key": "serverCertificates", "type": "[Certificate]"}, } def __init__( @@ -216,7 +235,7 @@ def __init__( service_user_password: Optional[str] = None, search_base_distinguished_name: Optional[str] = None, search_filter_template: Optional[str] = None, - server_certificates: Optional[List["Certificate"]] = None, + server_certificates: Optional[List["_models.Certificate"]] = None, **kwargs ): """ @@ -238,7 +257,7 @@ def __init__( :keyword server_certificates: :paramtype server_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] """ - super(AuthenticationMethodLdapProperties, self).__init__(**kwargs) + super().__init__(**kwargs) self.server_hostname = server_hostname self.server_port = server_port self.service_user_distinguished_name = service_user_distinguished_name @@ -248,7 +267,7 @@ def __init__( self.server_certificates = server_certificates -class AutoscaleSettings(msrest.serialization.Model): +class AutoscaleSettings(_serialization.Model): """AutoscaleSettings. :ivar max_throughput: Represents maximum throughput, the resource can scale up to. @@ -256,31 +275,26 @@ class AutoscaleSettings(msrest.serialization.Model): """ _attribute_map = { - 'max_throughput': {'key': 'maxThroughput', 'type': 'int'}, + "max_throughput": {"key": "maxThroughput", "type": "int"}, } - def __init__( - self, - *, - max_throughput: Optional[int] = None, - **kwargs - ): + def __init__(self, *, max_throughput: Optional[int] = None, **kwargs): """ :keyword max_throughput: Represents maximum throughput, the resource can scale up to. :paramtype max_throughput: int """ - super(AutoscaleSettings, self).__init__(**kwargs) + super().__init__(**kwargs) self.max_throughput = max_throughput -class AutoscaleSettingsResource(msrest.serialization.Model): +class AutoscaleSettingsResource(_serialization.Model): """Cosmos DB provisioned throughput settings object. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar max_throughput: Required. Represents maximum throughput container can scale up to. + :ivar max_throughput: Represents maximum throughput container can scale up to. Required. :vartype max_throughput: int :ivar auto_upgrade_policy: Cosmos DB resource auto-upgrade policy. :vartype auto_upgrade_policy: ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource @@ -290,36 +304,36 @@ class AutoscaleSettingsResource(msrest.serialization.Model): """ _validation = { - 'max_throughput': {'required': True}, - 'target_max_throughput': {'readonly': True}, + "max_throughput": {"required": True}, + "target_max_throughput": {"readonly": True}, } _attribute_map = { - 'max_throughput': {'key': 'maxThroughput', 'type': 'int'}, - 'auto_upgrade_policy': {'key': 'autoUpgradePolicy', 'type': 'AutoUpgradePolicyResource'}, - 'target_max_throughput': {'key': 'targetMaxThroughput', 'type': 'int'}, + "max_throughput": {"key": "maxThroughput", "type": "int"}, + "auto_upgrade_policy": {"key": "autoUpgradePolicy", "type": "AutoUpgradePolicyResource"}, + "target_max_throughput": {"key": "targetMaxThroughput", "type": "int"}, } def __init__( self, *, max_throughput: int, - auto_upgrade_policy: Optional["AutoUpgradePolicyResource"] = None, + auto_upgrade_policy: Optional["_models.AutoUpgradePolicyResource"] = None, **kwargs ): """ - :keyword max_throughput: Required. Represents maximum throughput container can scale up to. + :keyword max_throughput: Represents maximum throughput container can scale up to. Required. :paramtype max_throughput: int :keyword auto_upgrade_policy: Cosmos DB resource auto-upgrade policy. :paramtype auto_upgrade_policy: ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource """ - super(AutoscaleSettingsResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.max_throughput = max_throughput self.auto_upgrade_policy = auto_upgrade_policy self.target_max_throughput = None -class AutoUpgradePolicyResource(msrest.serialization.Model): +class AutoUpgradePolicyResource(_serialization.Model): """Cosmos DB resource auto-upgrade policy. :ivar throughput_policy: Represents throughput policy which service must adhere to for @@ -328,56 +342,51 @@ class AutoUpgradePolicyResource(msrest.serialization.Model): """ _attribute_map = { - 'throughput_policy': {'key': 'throughputPolicy', 'type': 'ThroughputPolicyResource'}, + "throughput_policy": {"key": "throughputPolicy", "type": "ThroughputPolicyResource"}, } - def __init__( - self, - *, - throughput_policy: Optional["ThroughputPolicyResource"] = None, - **kwargs - ): + def __init__(self, *, throughput_policy: Optional["_models.ThroughputPolicyResource"] = None, **kwargs): """ :keyword throughput_policy: Represents throughput policy which service must adhere to for auto-upgrade. :paramtype throughput_policy: ~azure.mgmt.cosmosdb.models.ThroughputPolicyResource """ - super(AutoUpgradePolicyResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.throughput_policy = throughput_policy -class DataTransferDataSourceSink(msrest.serialization.Model): +class DataTransferDataSourceSink(_serialization.Model): """Base class for all DataTransfer source/sink. - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBlobDataTransferDataSourceSink, CosmosCassandraDataTransferDataSourceSink, CosmosSqlDataTransferDataSourceSink. + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + AzureBlobDataTransferDataSourceSink, CosmosCassandraDataTransferDataSourceSink, + CosmosSqlDataTransferDataSourceSink All required parameters must be populated in order to send to Azure. - :ivar component: Required. Constant filled by server. Possible values include: - "CosmosDBCassandra", "CosmosDBSql", "AzureBlobStorage". Default value: "CosmosDBCassandra". + :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent """ _validation = { - 'component': {'required': True}, + "component": {"required": True}, } _attribute_map = { - 'component': {'key': 'component', 'type': 'str'}, + "component": {"key": "component", "type": "str"}, } _subtype_map = { - 'component': {'AzureBlobStorage': 'AzureBlobDataTransferDataSourceSink', 'CosmosDBCassandra': 'CosmosCassandraDataTransferDataSourceSink', 'CosmosDBSql': 'CosmosSqlDataTransferDataSourceSink'} + "component": { + "AzureBlobStorage": "AzureBlobDataTransferDataSourceSink", + "CosmosDBCassandra": "CosmosCassandraDataTransferDataSourceSink", + "CosmosDBSql": "CosmosSqlDataTransferDataSourceSink", + } } - def __init__( - self, - **kwargs - ): - """ - """ - super(DataTransferDataSourceSink, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.component = None # type: Optional[str] @@ -386,8 +395,7 @@ class AzureBlobDataTransferDataSourceSink(DataTransferDataSourceSink): All required parameters must be populated in order to send to Azure. - :ivar component: Required. Constant filled by server. Possible values include: - "CosmosDBCassandra", "CosmosDBSql", "AzureBlobStorage". Default value: "CosmosDBCassandra". + :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent :ivar container_name: Required. :vartype container_name: str @@ -396,36 +404,30 @@ class AzureBlobDataTransferDataSourceSink(DataTransferDataSourceSink): """ _validation = { - 'component': {'required': True}, - 'container_name': {'required': True}, + "component": {"required": True}, + "container_name": {"required": True}, } _attribute_map = { - 'component': {'key': 'component', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + "component": {"key": "component", "type": "str"}, + "container_name": {"key": "containerName", "type": "str"}, + "endpoint_url": {"key": "endpointUrl", "type": "str"}, } - def __init__( - self, - *, - container_name: str, - endpoint_url: Optional[str] = None, - **kwargs - ): + def __init__(self, *, container_name: str, endpoint_url: Optional[str] = None, **kwargs): """ :keyword container_name: Required. :paramtype container_name: str :keyword endpoint_url: :paramtype endpoint_url: str """ - super(AzureBlobDataTransferDataSourceSink, self).__init__(**kwargs) - self.component = 'AzureBlobStorage' # type: str + super().__init__(**kwargs) + self.component = "AzureBlobStorage" # type: str self.container_name = container_name self.endpoint_url = endpoint_url -class BackupInformation(msrest.serialization.Model): +class BackupInformation(_serialization.Model): """Backup information of a resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -435,33 +437,29 @@ class BackupInformation(msrest.serialization.Model): """ _validation = { - 'continuous_backup_information': {'readonly': True}, + "continuous_backup_information": {"readonly": True}, } _attribute_map = { - 'continuous_backup_information': {'key': 'continuousBackupInformation', 'type': 'ContinuousBackupInformation'}, + "continuous_backup_information": {"key": "continuousBackupInformation", "type": "ContinuousBackupInformation"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(BackupInformation, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.continuous_backup_information = None -class BackupPolicy(msrest.serialization.Model): +class BackupPolicy(_serialization.Model): """The object representing the policy for taking backups on an account. - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ContinuousModeBackupPolicy, PeriodicModeBackupPolicy. + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + ContinuousModeBackupPolicy, PeriodicModeBackupPolicy All required parameters must be populated in order to send to Azure. - :ivar type: Required. Describes the mode of backups.Constant filled by server. Possible values - include: "Periodic", "Continuous". + :ivar type: Describes the mode of backups. Required. Known values are: "Periodic" and + "Continuous". :vartype type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType :ivar migration_state: The object representing the state of the migration between the backup policies. @@ -469,72 +467,65 @@ class BackupPolicy(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'migration_state': {'key': 'migrationState', 'type': 'BackupPolicyMigrationState'}, + "type": {"key": "type", "type": "str"}, + "migration_state": {"key": "migrationState", "type": "BackupPolicyMigrationState"}, } - _subtype_map = { - 'type': {'Continuous': 'ContinuousModeBackupPolicy', 'Periodic': 'PeriodicModeBackupPolicy'} - } + _subtype_map = {"type": {"Continuous": "ContinuousModeBackupPolicy", "Periodic": "PeriodicModeBackupPolicy"}} - def __init__( - self, - *, - migration_state: Optional["BackupPolicyMigrationState"] = None, - **kwargs - ): + def __init__(self, *, migration_state: Optional["_models.BackupPolicyMigrationState"] = None, **kwargs): """ :keyword migration_state: The object representing the state of the migration between the backup policies. :paramtype migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState """ - super(BackupPolicy, self).__init__(**kwargs) + super().__init__(**kwargs) self.type = None # type: Optional[str] self.migration_state = migration_state -class BackupPolicyMigrationState(msrest.serialization.Model): +class BackupPolicyMigrationState(_serialization.Model): """The object representing the state of the migration between the backup policies. - :ivar status: Describes the status of migration between backup policy types. Possible values - include: "Invalid", "InProgress", "Completed", "Failed". + :ivar status: Describes the status of migration between backup policy types. Known values are: + "Invalid", "InProgress", "Completed", and "Failed". :vartype status: str or ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationStatus :ivar target_type: Describes the target backup policy type of the backup policy migration. - Possible values include: "Periodic", "Continuous". + Known values are: "Periodic" and "Continuous". :vartype target_type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType :ivar start_time: Time at which the backup policy migration started (ISO-8601 format). :vartype start_time: ~datetime.datetime """ _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'target_type': {'key': 'targetType', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + "status": {"key": "status", "type": "str"}, + "target_type": {"key": "targetType", "type": "str"}, + "start_time": {"key": "startTime", "type": "iso-8601"}, } def __init__( self, *, - status: Optional[Union[str, "BackupPolicyMigrationStatus"]] = None, - target_type: Optional[Union[str, "BackupPolicyType"]] = None, + status: Optional[Union[str, "_models.BackupPolicyMigrationStatus"]] = None, + target_type: Optional[Union[str, "_models.BackupPolicyType"]] = None, start_time: Optional[datetime.datetime] = None, **kwargs ): """ - :keyword status: Describes the status of migration between backup policy types. Possible values - include: "Invalid", "InProgress", "Completed", "Failed". + :keyword status: Describes the status of migration between backup policy types. Known values + are: "Invalid", "InProgress", "Completed", and "Failed". :paramtype status: str or ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationStatus :keyword target_type: Describes the target backup policy type of the backup policy migration. - Possible values include: "Periodic", "Continuous". + Known values are: "Periodic" and "Continuous". :paramtype target_type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType :keyword start_time: Time at which the backup policy migration started (ISO-8601 format). :paramtype start_time: ~datetime.datetime """ - super(BackupPolicyMigrationState, self).__init__(**kwargs) + super().__init__(**kwargs) self.status = status self.target_type = target_type self.start_time = start_time @@ -556,33 +547,28 @@ class BackupResource(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BackupResourceProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "BackupResourceProperties"}, } - def __init__( - self, - *, - properties: Optional["BackupResourceProperties"] = None, - **kwargs - ): + def __init__(self, *, properties: Optional["_models.BackupResourceProperties"] = None, **kwargs): """ :keyword properties: :paramtype properties: ~azure.mgmt.cosmosdb.models.BackupResourceProperties """ - super(BackupResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.properties = properties -class BackupResourceProperties(msrest.serialization.Model): +class BackupResourceProperties(_serialization.Model): """BackupResourceProperties. :ivar timestamp: The time this backup was taken, formatted like 2021-01-21T17:35:21. @@ -590,24 +576,19 @@ class BackupResourceProperties(msrest.serialization.Model): """ _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + "timestamp": {"key": "timestamp", "type": "iso-8601"}, } - def __init__( - self, - *, - timestamp: Optional[datetime.datetime] = None, - **kwargs - ): + def __init__(self, *, timestamp: Optional[datetime.datetime] = None, **kwargs): """ :keyword timestamp: The time this backup was taken, formatted like 2021-01-21T17:35:21. :paramtype timestamp: ~datetime.datetime """ - super(BackupResourceProperties, self).__init__(**kwargs) + super().__init__(**kwargs) self.timestamp = timestamp -class Capability(msrest.serialization.Model): +class Capability(_serialization.Model): """Cosmos DB capability object. :ivar name: Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current @@ -616,25 +597,20 @@ class Capability(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - *, - name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, name: Optional[str] = None, **kwargs): """ :keyword name: Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin". :paramtype name: str """ - super(Capability, self).__init__(**kwargs) + super().__init__(**kwargs) self.name = name -class Capacity(msrest.serialization.Model): +class Capacity(_serialization.Model): """The object that represents all properties related to capacity enforcement on an account. :ivar total_throughput_limit: The total throughput limit imposed on the account. A @@ -645,19 +621,14 @@ class Capacity(msrest.serialization.Model): """ _validation = { - 'total_throughput_limit': {'minimum': -1}, + "total_throughput_limit": {"minimum": -1}, } _attribute_map = { - 'total_throughput_limit': {'key': 'totalThroughputLimit', 'type': 'int'}, + "total_throughput_limit": {"key": "totalThroughputLimit", "type": "int"}, } - def __init__( - self, - *, - total_throughput_limit: Optional[int] = None, - **kwargs - ): + def __init__(self, *, total_throughput_limit: Optional[int] = None, **kwargs): """ :keyword total_throughput_limit: The total throughput limit imposed on the account. A totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned @@ -665,11 +636,151 @@ def __init__( throughput. :paramtype total_throughput_limit: int """ - super(Capacity, self).__init__(**kwargs) + super().__init__(**kwargs) self.total_throughput_limit = total_throughput_limit -class CassandraClusterPublicStatus(msrest.serialization.Model): +class CassandraClusterDataCenterNodeItem(_serialization.Model): # pylint: disable=too-many-instance-attributes + """CassandraClusterDataCenterNodeItem. + + :ivar address: The node's IP address. + :vartype address: str + :ivar state: The state of the node in Cassandra ring. Known values are: "Normal", "Leaving", + "Joining", "Moving", and "Stopped". + :vartype state: str or ~azure.mgmt.cosmosdb.models.NodeState + :ivar status: + :vartype status: str + :ivar load: The amount of file system data in the data directory (e.g., 47.66 kB), excluding + all content in the snapshots subdirectories. Because all SSTable data files are included, any + data that is not cleaned up (such as TTL-expired cells or tombstones) is counted. + :vartype load: str + :ivar tokens: List of tokens this node covers. + :vartype tokens: list[str] + :ivar size: + :vartype size: int + :ivar host_id: The network ID of the node. + :vartype host_id: str + :ivar rack: The rack this node is part of. + :vartype rack: str + :ivar timestamp: The timestamp at which that snapshot of these usage statistics were taken. + :vartype timestamp: str + :ivar disk_used_kb: The amount of disk used, in kB, of the directory /var/lib/cassandra. + :vartype disk_used_kb: int + :ivar disk_free_kb: The amount of disk free, in kB, of the directory /var/lib/cassandra. + :vartype disk_free_kb: int + :ivar memory_used_kb: Used memory (calculated as total - free - buffers - cache), in kB. + :vartype memory_used_kb: int + :ivar memory_buffers_and_cached_kb: Memory used by kernel buffers (Buffers in /proc/meminfo) + and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB. + :vartype memory_buffers_and_cached_kb: int + :ivar memory_free_kb: Unused memory (MemFree and SwapFree in /proc/meminfo), in kB. + :vartype memory_free_kb: int + :ivar memory_total_kb: Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in kB. + :vartype memory_total_kb: int + :ivar cpu_usage: A float representing the current system-wide CPU utilization as a percentage. + :vartype cpu_usage: float + """ + + _attribute_map = { + "address": {"key": "address", "type": "str"}, + "state": {"key": "state", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "load": {"key": "load", "type": "str"}, + "tokens": {"key": "tokens", "type": "[str]"}, + "size": {"key": "size", "type": "int"}, + "host_id": {"key": "hostID", "type": "str"}, + "rack": {"key": "rack", "type": "str"}, + "timestamp": {"key": "timestamp", "type": "str"}, + "disk_used_kb": {"key": "diskUsedKB", "type": "int"}, + "disk_free_kb": {"key": "diskFreeKB", "type": "int"}, + "memory_used_kb": {"key": "memoryUsedKB", "type": "int"}, + "memory_buffers_and_cached_kb": {"key": "memoryBuffersAndCachedKB", "type": "int"}, + "memory_free_kb": {"key": "memoryFreeKB", "type": "int"}, + "memory_total_kb": {"key": "memoryTotalKB", "type": "int"}, + "cpu_usage": {"key": "cpuUsage", "type": "float"}, + } + + def __init__( + self, + *, + address: Optional[str] = None, + state: Optional[Union[str, "_models.NodeState"]] = None, + status: Optional[str] = None, + load: Optional[str] = None, + tokens: Optional[List[str]] = None, + size: Optional[int] = None, + host_id: Optional[str] = None, + rack: Optional[str] = None, + timestamp: Optional[str] = None, + disk_used_kb: Optional[int] = None, + disk_free_kb: Optional[int] = None, + memory_used_kb: Optional[int] = None, + memory_buffers_and_cached_kb: Optional[int] = None, + memory_free_kb: Optional[int] = None, + memory_total_kb: Optional[int] = None, + cpu_usage: Optional[float] = None, + **kwargs + ): + """ + :keyword address: The node's IP address. + :paramtype address: str + :keyword state: The state of the node in Cassandra ring. Known values are: "Normal", "Leaving", + "Joining", "Moving", and "Stopped". + :paramtype state: str or ~azure.mgmt.cosmosdb.models.NodeState + :keyword status: + :paramtype status: str + :keyword load: The amount of file system data in the data directory (e.g., 47.66 kB), excluding + all content in the snapshots subdirectories. Because all SSTable data files are included, any + data that is not cleaned up (such as TTL-expired cells or tombstones) is counted. + :paramtype load: str + :keyword tokens: List of tokens this node covers. + :paramtype tokens: list[str] + :keyword size: + :paramtype size: int + :keyword host_id: The network ID of the node. + :paramtype host_id: str + :keyword rack: The rack this node is part of. + :paramtype rack: str + :keyword timestamp: The timestamp at which that snapshot of these usage statistics were taken. + :paramtype timestamp: str + :keyword disk_used_kb: The amount of disk used, in kB, of the directory /var/lib/cassandra. + :paramtype disk_used_kb: int + :keyword disk_free_kb: The amount of disk free, in kB, of the directory /var/lib/cassandra. + :paramtype disk_free_kb: int + :keyword memory_used_kb: Used memory (calculated as total - free - buffers - cache), in kB. + :paramtype memory_used_kb: int + :keyword memory_buffers_and_cached_kb: Memory used by kernel buffers (Buffers in /proc/meminfo) + and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB. + :paramtype memory_buffers_and_cached_kb: int + :keyword memory_free_kb: Unused memory (MemFree and SwapFree in /proc/meminfo), in kB. + :paramtype memory_free_kb: int + :keyword memory_total_kb: Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in + kB. + :paramtype memory_total_kb: int + :keyword cpu_usage: A float representing the current system-wide CPU utilization as a + percentage. + :paramtype cpu_usage: float + """ + super().__init__(**kwargs) + self.address = address + self.state = state + self.status = status + self.load = load + self.tokens = tokens + self.size = size + self.host_id = host_id + self.rack = rack + self.timestamp = timestamp + self.disk_used_kb = disk_used_kb + self.disk_free_kb = disk_free_kb + self.memory_used_kb = memory_used_kb + self.memory_buffers_and_cached_kb = memory_buffers_and_cached_kb + self.memory_free_kb = memory_free_kb + self.memory_total_kb = memory_total_kb + self.cpu_usage = cpu_usage + + +class CassandraClusterPublicStatus(_serialization.Model): """Properties of a managed Cassandra cluster public status. :ivar e_tag: @@ -685,19 +796,19 @@ class CassandraClusterPublicStatus(msrest.serialization.Model): """ _attribute_map = { - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'reaper_status': {'key': 'reaperStatus', 'type': 'ManagedCassandraReaperStatus'}, - 'connection_errors': {'key': 'connectionErrors', 'type': '[ConnectionError]'}, - 'data_centers': {'key': 'dataCenters', 'type': '[CassandraClusterPublicStatusDataCentersItem]'}, + "e_tag": {"key": "eTag", "type": "str"}, + "reaper_status": {"key": "reaperStatus", "type": "ManagedCassandraReaperStatus"}, + "connection_errors": {"key": "connectionErrors", "type": "[ConnectionError]"}, + "data_centers": {"key": "dataCenters", "type": "[CassandraClusterPublicStatusDataCentersItem]"}, } def __init__( self, *, e_tag: Optional[str] = None, - reaper_status: Optional["ManagedCassandraReaperStatus"] = None, - connection_errors: Optional[List["ConnectionError"]] = None, - data_centers: Optional[List["CassandraClusterPublicStatusDataCentersItem"]] = None, + reaper_status: Optional["_models.ManagedCassandraReaperStatus"] = None, + connection_errors: Optional[List["_models.ConnectionError"]] = None, + data_centers: Optional[List["_models.CassandraClusterPublicStatusDataCentersItem"]] = None, **kwargs ): """ @@ -712,14 +823,14 @@ def __init__( :paramtype data_centers: list[~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatusDataCentersItem] """ - super(CassandraClusterPublicStatus, self).__init__(**kwargs) + super().__init__(**kwargs) self.e_tag = e_tag self.reaper_status = reaper_status self.connection_errors = connection_errors self.data_centers = data_centers -class CassandraClusterPublicStatusDataCentersItem(msrest.serialization.Model): +class CassandraClusterPublicStatusDataCentersItem(_serialization.Model): """CassandraClusterPublicStatusDataCentersItem. :ivar name: The name of this Datacenter. @@ -727,14 +838,13 @@ class CassandraClusterPublicStatusDataCentersItem(msrest.serialization.Model): :ivar seed_nodes: A list of all seed nodes in the cluster, managed and unmanaged. :vartype seed_nodes: list[str] :ivar nodes: - :vartype nodes: - list[~azure.mgmt.cosmosdb.models.ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems] + :vartype nodes: list[~azure.mgmt.cosmosdb.models.CassandraClusterDataCenterNodeItem] """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[str]'}, - 'nodes': {'key': 'nodes', 'type': '[ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems]'}, + "name": {"key": "name", "type": "str"}, + "seed_nodes": {"key": "seedNodes", "type": "[str]"}, + "nodes": {"key": "nodes", "type": "[CassandraClusterDataCenterNodeItem]"}, } def __init__( @@ -742,7 +852,7 @@ def __init__( *, name: Optional[str] = None, seed_nodes: Optional[List[str]] = None, - nodes: Optional[List["ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems"]] = None, + nodes: Optional[List["_models.CassandraClusterDataCenterNodeItem"]] = None, **kwargs ): """ @@ -751,10 +861,9 @@ def __init__( :keyword seed_nodes: A list of all seed nodes in the cluster, managed and unmanaged. :paramtype seed_nodes: list[str] :keyword nodes: - :paramtype nodes: - list[~azure.mgmt.cosmosdb.models.ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems] + :paramtype nodes: list[~azure.mgmt.cosmosdb.models.CassandraClusterDataCenterNodeItem] """ - super(CassandraClusterPublicStatusDataCentersItem, self).__init__(**kwargs) + super().__init__(**kwargs) self.name = name self.seed_nodes = seed_nodes self.nodes = nodes @@ -775,16 +884,16 @@ class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a Cassandra keyspace. + :ivar resource: The standard JSON format of a Cassandra keyspace. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -792,57 +901,57 @@ class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "CassandraKeyspaceResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "CassandraKeyspaceResource", + resource: "_models.CassandraKeyspaceResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a Cassandra keyspace. + :keyword resource: The standard JSON format of a Cassandra keyspace. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(CassandraKeyspaceCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class OptionsResource(msrest.serialization.Model): +class OptionsResource(_serialization.Model): """Cosmos DB options resource object. :ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the @@ -853,15 +962,15 @@ class OptionsResource(msrest.serialization.Model): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -871,7 +980,7 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(OptionsResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.throughput = throughput self.autoscale_settings = autoscale_settings @@ -887,15 +996,15 @@ class CassandraKeyspaceGetPropertiesOptions(OptionsResource): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -905,87 +1014,76 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(CassandraKeyspaceGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super().__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) -class CassandraKeyspaceResource(msrest.serialization.Model): - """Cosmos DB Cassandra keyspace resource object. +class ExtendedResourceProperties(_serialization.Model): + """The system generated resource properties associated with SQL databases, SQL containers, Gremlin databases and Gremlin graphs. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Required. Name of the Cosmos DB Cassandra keyspace. - :vartype id: str + :ivar rid: A system generated property. A unique identifier. + :vartype rid: str + :ivar ts: A system generated property that denotes the last updated timestamp of the resource. + :vartype ts: float + :ivar etag: A system generated property representing the resource etag required for optimistic + concurrency control. + :vartype etag: str """ _validation = { - 'id': {'required': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, } - def __init__( - self, - *, - id: str, - **kwargs - ): - """ - :keyword id: Required. Name of the Cosmos DB Cassandra keyspace. - :paramtype id: str - """ - super(CassandraKeyspaceResource, self).__init__(**kwargs) - self.id = id + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.rid = None + self.ts = None + self.etag = None -class ExtendedResourceProperties(msrest.serialization.Model): - """The system generated resource properties associated with SQL databases, SQL containers, Gremlin databases and Gremlin graphs. +class CassandraKeyspaceResource(_serialization.Model): + """Cosmos DB Cassandra keyspace resource object. - Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. - :ivar rid: A system generated property. A unique identifier. - :vartype rid: str - :ivar ts: A system generated property that denotes the last updated timestamp of the resource. - :vartype ts: float - :ivar etag: A system generated property representing the resource etag required for optimistic - concurrency control. - :vartype etag: str + :ivar id: Name of the Cosmos DB Cassandra keyspace. Required. + :vartype id: str """ _validation = { - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "id": {"required": True}, } _attribute_map = { - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, *, id: str, **kwargs): # pylint: disable=redefined-builtin """ + :keyword id: Name of the Cosmos DB Cassandra keyspace. Required. + :paramtype id: str """ - super(ExtendedResourceProperties, self).__init__(**kwargs) - self.rid = None - self.ts = None - self.etag = None + super().__init__(**kwargs) + self.id = id -class CassandraKeyspaceGetPropertiesResource(ExtendedResourceProperties, CassandraKeyspaceResource): +class CassandraKeyspaceGetPropertiesResource(CassandraKeyspaceResource, ExtendedResourceProperties): """CassandraKeyspaceGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB Cassandra keyspace. - :vartype id: str :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -993,37 +1091,34 @@ class CassandraKeyspaceGetPropertiesResource(ExtendedResourceProperties, Cassand :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :ivar id: Name of the Cosmos DB Cassandra keyspace. Required. + :vartype id: str """ _validation = { - 'id': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - *, - id: str, - **kwargs - ): + def __init__(self, *, id: str, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB Cassandra keyspace. + :keyword id: Name of the Cosmos DB Cassandra keyspace. Required. :paramtype id: str """ - super(CassandraKeyspaceGetPropertiesResource, self).__init__(id=id, **kwargs) - self.id = id + super().__init__(id=id, **kwargs) self.rid = None self.ts = None self.etag = None + self.id = id class CassandraKeyspaceGetResults(ARMResourceProperties): @@ -1039,12 +1134,12 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -1055,20 +1150,20 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'CassandraKeyspaceGetPropertiesOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "CassandraKeyspaceGetPropertiesResource"}, + "options": {"key": "properties.options", "type": "CassandraKeyspaceGetPropertiesOptions"}, } def __init__( @@ -1076,20 +1171,20 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["CassandraKeyspaceGetPropertiesResource"] = None, - options: Optional["CassandraKeyspaceGetPropertiesOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.CassandraKeyspaceGetPropertiesResource"] = None, + options: Optional["_models.CassandraKeyspaceGetPropertiesOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -1098,12 +1193,12 @@ def __init__( :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetPropertiesOptions """ - super(CassandraKeyspaceGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class CassandraKeyspaceListResult(msrest.serialization.Model): +class CassandraKeyspaceListResult(_serialization.Model): """The List operation response, that contains the Cassandra keyspaces and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -1113,24 +1208,20 @@ class CassandraKeyspaceListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[CassandraKeyspaceGetResults]'}, + "value": {"key": "value", "type": "[CassandraKeyspaceGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(CassandraKeyspaceListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class CassandraPartitionKey(msrest.serialization.Model): +class CassandraPartitionKey(_serialization.Model): """Cosmos DB Cassandra table partition key. :ivar name: Name of the Cosmos DB Cassandra table partition key. @@ -1138,24 +1229,19 @@ class CassandraPartitionKey(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - *, - name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, name: Optional[str] = None, **kwargs): """ :keyword name: Name of the Cosmos DB Cassandra table partition key. :paramtype name: str """ - super(CassandraPartitionKey, self).__init__(**kwargs) + super().__init__(**kwargs) self.name = name -class CassandraSchema(msrest.serialization.Model): +class CassandraSchema(_serialization.Model): """Cosmos DB Cassandra table schema. :ivar columns: List of Cassandra table columns. @@ -1167,17 +1253,17 @@ class CassandraSchema(msrest.serialization.Model): """ _attribute_map = { - 'columns': {'key': 'columns', 'type': '[Column]'}, - 'partition_keys': {'key': 'partitionKeys', 'type': '[CassandraPartitionKey]'}, - 'cluster_keys': {'key': 'clusterKeys', 'type': '[ClusterKey]'}, + "columns": {"key": "columns", "type": "[Column]"}, + "partition_keys": {"key": "partitionKeys", "type": "[CassandraPartitionKey]"}, + "cluster_keys": {"key": "clusterKeys", "type": "[ClusterKey]"}, } def __init__( self, *, - columns: Optional[List["Column"]] = None, - partition_keys: Optional[List["CassandraPartitionKey"]] = None, - cluster_keys: Optional[List["ClusterKey"]] = None, + columns: Optional[List["_models.Column"]] = None, + partition_keys: Optional[List["_models.CassandraPartitionKey"]] = None, + cluster_keys: Optional[List["_models.ClusterKey"]] = None, **kwargs ): """ @@ -1188,7 +1274,7 @@ def __init__( :keyword cluster_keys: List of cluster key. :paramtype cluster_keys: list[~azure.mgmt.cosmosdb.models.ClusterKey] """ - super(CassandraSchema, self).__init__(**kwargs) + super().__init__(**kwargs) self.columns = columns self.partition_keys = partition_keys self.cluster_keys = cluster_keys @@ -1209,16 +1295,16 @@ class CassandraTableCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a Cassandra table. + :ivar resource: The standard JSON format of a Cassandra table. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -1226,52 +1312,52 @@ class CassandraTableCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "CassandraTableResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "CassandraTableResource", + resource: "_models.CassandraTableResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a Cassandra table. + :keyword resource: The standard JSON format of a Cassandra table. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(CassandraTableCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options @@ -1287,15 +1373,15 @@ class CassandraTableGetPropertiesOptions(OptionsResource): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -1305,15 +1391,15 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(CassandraTableGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super().__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) -class CassandraTableResource(msrest.serialization.Model): +class CassandraTableResource(_serialization.Model): """Cosmos DB Cassandra table resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB Cassandra table. + :ivar id: Name of the Cosmos DB Cassandra table. Required. :vartype id: str :ivar default_ttl: Time to live of the Cosmos DB Cassandra table. :vartype default_ttl: int @@ -1324,27 +1410,27 @@ class CassandraTableResource(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'schema': {'key': 'schema', 'type': 'CassandraSchema'}, - 'analytical_storage_ttl': {'key': 'analyticalStorageTtl', 'type': 'int'}, + "id": {"key": "id", "type": "str"}, + "default_ttl": {"key": "defaultTtl", "type": "int"}, + "schema": {"key": "schema", "type": "CassandraSchema"}, + "analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"}, } def __init__( self, *, - id: str, + id: str, # pylint: disable=redefined-builtin default_ttl: Optional[int] = None, - schema: Optional["CassandraSchema"] = None, + schema: Optional["_models.CassandraSchema"] = None, analytical_storage_ttl: Optional[int] = None, **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB Cassandra table. + :keyword id: Name of the Cosmos DB Cassandra table. Required. :paramtype id: str :keyword default_ttl: Time to live of the Cosmos DB Cassandra table. :paramtype default_ttl: int @@ -1353,28 +1439,20 @@ def __init__( :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: int """ - super(CassandraTableResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id self.default_ttl = default_ttl self.schema = schema self.analytical_storage_ttl = analytical_storage_ttl -class CassandraTableGetPropertiesResource(ExtendedResourceProperties, CassandraTableResource): +class CassandraTableGetPropertiesResource(CassandraTableResource, ExtendedResourceProperties): """CassandraTableGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB Cassandra table. - :vartype id: str - :ivar default_ttl: Time to live of the Cosmos DB Cassandra table. - :vartype default_ttl: int - :ivar schema: Schema of the Cosmos DB Cassandra table. - :vartype schema: ~azure.mgmt.cosmosdb.models.CassandraSchema - :ivar analytical_storage_ttl: Analytical TTL. - :vartype analytical_storage_ttl: int :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -1382,36 +1460,44 @@ class CassandraTableGetPropertiesResource(ExtendedResourceProperties, CassandraT :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :ivar id: Name of the Cosmos DB Cassandra table. Required. + :vartype id: str + :ivar default_ttl: Time to live of the Cosmos DB Cassandra table. + :vartype default_ttl: int + :ivar schema: Schema of the Cosmos DB Cassandra table. + :vartype schema: ~azure.mgmt.cosmosdb.models.CassandraSchema + :ivar analytical_storage_ttl: Analytical TTL. + :vartype analytical_storage_ttl: int """ _validation = { - 'id': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'schema': {'key': 'schema', 'type': 'CassandraSchema'}, - 'analytical_storage_ttl': {'key': 'analyticalStorageTtl', 'type': 'int'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "default_ttl": {"key": "defaultTtl", "type": "int"}, + "schema": {"key": "schema", "type": "CassandraSchema"}, + "analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"}, } def __init__( self, *, - id: str, + id: str, # pylint: disable=redefined-builtin default_ttl: Optional[int] = None, - schema: Optional["CassandraSchema"] = None, + schema: Optional["_models.CassandraSchema"] = None, analytical_storage_ttl: Optional[int] = None, **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB Cassandra table. + :keyword id: Name of the Cosmos DB Cassandra table. Required. :paramtype id: str :keyword default_ttl: Time to live of the Cosmos DB Cassandra table. :paramtype default_ttl: int @@ -1420,14 +1506,16 @@ def __init__( :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: int """ - super(CassandraTableGetPropertiesResource, self).__init__(id=id, default_ttl=default_ttl, schema=schema, analytical_storage_ttl=analytical_storage_ttl, **kwargs) + super().__init__( + id=id, default_ttl=default_ttl, schema=schema, analytical_storage_ttl=analytical_storage_ttl, **kwargs + ) + self.rid = None + self.ts = None + self.etag = None self.id = id self.default_ttl = default_ttl self.schema = schema self.analytical_storage_ttl = analytical_storage_ttl - self.rid = None - self.ts = None - self.etag = None class CassandraTableGetResults(ARMResourceProperties): @@ -1443,12 +1531,12 @@ class CassandraTableGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -1459,20 +1547,20 @@ class CassandraTableGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraTableGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'CassandraTableGetPropertiesOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "CassandraTableGetPropertiesResource"}, + "options": {"key": "properties.options", "type": "CassandraTableGetPropertiesOptions"}, } def __init__( @@ -1480,20 +1568,20 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["CassandraTableGetPropertiesResource"] = None, - options: Optional["CassandraTableGetPropertiesOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.CassandraTableGetPropertiesResource"] = None, + options: Optional["_models.CassandraTableGetPropertiesOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -1502,12 +1590,12 @@ def __init__( :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesOptions """ - super(CassandraTableGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class CassandraTableListResult(msrest.serialization.Model): +class CassandraTableListResult(_serialization.Model): """The List operation response, that contains the Cassandra tables and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -1517,20 +1605,16 @@ class CassandraTableListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[CassandraTableGetResults]'}, + "value": {"key": "value", "type": "[CassandraTableGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(CassandraTableListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None @@ -1549,16 +1633,16 @@ class CassandraViewCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a Cassandra view. + :ivar resource: The standard JSON format of a Cassandra view. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.CassandraViewResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -1566,52 +1650,52 @@ class CassandraViewCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraViewResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "CassandraViewResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "CassandraViewResource", + resource: "_models.CassandraViewResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a Cassandra view. + :keyword resource: The standard JSON format of a Cassandra view. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.CassandraViewResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(CassandraViewCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options @@ -1627,15 +1711,15 @@ class CassandraViewGetPropertiesOptions(OptionsResource): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -1645,59 +1729,49 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(CassandraViewGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super().__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) -class CassandraViewResource(msrest.serialization.Model): +class CassandraViewResource(_serialization.Model): """Cosmos DB Cassandra view resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB Cassandra view. + :ivar id: Name of the Cosmos DB Cassandra view. Required. :vartype id: str - :ivar view_definition: Required. View Definition of the Cosmos DB Cassandra view. + :ivar view_definition: View Definition of the Cosmos DB Cassandra view. Required. :vartype view_definition: str """ _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, + "id": {"required": True}, + "view_definition": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "view_definition": {"key": "viewDefinition", "type": "str"}, } - def __init__( - self, - *, - id: str, - view_definition: str, - **kwargs - ): + def __init__(self, *, id: str, view_definition: str, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB Cassandra view. + :keyword id: Name of the Cosmos DB Cassandra view. Required. :paramtype id: str - :keyword view_definition: Required. View Definition of the Cosmos DB Cassandra view. + :keyword view_definition: View Definition of the Cosmos DB Cassandra view. Required. :paramtype view_definition: str """ - super(CassandraViewResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id self.view_definition = view_definition -class CassandraViewGetPropertiesResource(ExtendedResourceProperties, CassandraViewResource): +class CassandraViewGetPropertiesResource(CassandraViewResource, ExtendedResourceProperties): """CassandraViewGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB Cassandra view. - :vartype id: str - :ivar view_definition: Required. View Definition of the Cosmos DB Cassandra view. - :vartype view_definition: str :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -1705,43 +1779,41 @@ class CassandraViewGetPropertiesResource(ExtendedResourceProperties, CassandraVi :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :ivar id: Name of the Cosmos DB Cassandra view. Required. + :vartype id: str + :ivar view_definition: View Definition of the Cosmos DB Cassandra view. Required. + :vartype view_definition: str """ _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, + "view_definition": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "view_definition": {"key": "viewDefinition", "type": "str"}, } - def __init__( - self, - *, - id: str, - view_definition: str, - **kwargs - ): + def __init__(self, *, id: str, view_definition: str, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB Cassandra view. + :keyword id: Name of the Cosmos DB Cassandra view. Required. :paramtype id: str - :keyword view_definition: Required. View Definition of the Cosmos DB Cassandra view. + :keyword view_definition: View Definition of the Cosmos DB Cassandra view. Required. :paramtype view_definition: str """ - super(CassandraViewGetPropertiesResource, self).__init__(id=id, view_definition=view_definition, **kwargs) - self.id = id - self.view_definition = view_definition + super().__init__(id=id, view_definition=view_definition, **kwargs) self.rid = None self.ts = None self.etag = None + self.id = id + self.view_definition = view_definition class CassandraViewGetResults(ARMResourceProperties): @@ -1757,12 +1829,12 @@ class CassandraViewGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -1773,20 +1845,20 @@ class CassandraViewGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraViewGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'CassandraViewGetPropertiesOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "CassandraViewGetPropertiesResource"}, + "options": {"key": "properties.options", "type": "CassandraViewGetPropertiesOptions"}, } def __init__( @@ -1794,20 +1866,20 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["CassandraViewGetPropertiesResource"] = None, - options: Optional["CassandraViewGetPropertiesOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.CassandraViewGetPropertiesResource"] = None, + options: Optional["_models.CassandraViewGetPropertiesOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -1816,12 +1888,12 @@ def __init__( :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions """ - super(CassandraViewGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class CassandraViewListResult(msrest.serialization.Model): +class CassandraViewListResult(_serialization.Model): """The List operation response, that contains the Cassandra views and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -1831,24 +1903,20 @@ class CassandraViewListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[CassandraViewGetResults]'}, + "value": {"key": "value", "type": "[CassandraViewGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(CassandraViewListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class Certificate(msrest.serialization.Model): +class Certificate(_serialization.Model): """Certificate. :ivar pem: PEM formatted public key. @@ -1856,116 +1924,100 @@ class Certificate(msrest.serialization.Model): """ _attribute_map = { - 'pem': {'key': 'pem', 'type': 'str'}, + "pem": {"key": "pem", "type": "str"}, } - def __init__( - self, - *, - pem: Optional[str] = None, - **kwargs - ): + def __init__(self, *, pem: Optional[str] = None, **kwargs): """ :keyword pem: PEM formatted public key. :paramtype pem: str """ - super(Certificate, self).__init__(**kwargs) + super().__init__(**kwargs) self.pem = pem -class ClientEncryptionIncludedPath(msrest.serialization.Model): +class ClientEncryptionIncludedPath(_serialization.Model): """. All required parameters must be populated in order to send to Azure. - :ivar path: Required. Path that needs to be encrypted. + :ivar path: Path that needs to be encrypted. Required. :vartype path: str - :ivar client_encryption_key_id: Required. The identifier of the Client Encryption Key to be - used to encrypt the path. + :ivar client_encryption_key_id: The identifier of the Client Encryption Key to be used to + encrypt the path. Required. :vartype client_encryption_key_id: str - :ivar encryption_type: Required. The type of encryption to be performed. Eg - Deterministic, - Randomized. + :ivar encryption_type: The type of encryption to be performed. Eg - Deterministic, Randomized. + Required. :vartype encryption_type: str - :ivar encryption_algorithm: Required. The encryption algorithm which will be used. Eg - - AEAD_AES_256_CBC_HMAC_SHA256. + :ivar encryption_algorithm: The encryption algorithm which will be used. Eg - + AEAD_AES_256_CBC_HMAC_SHA256. Required. :vartype encryption_algorithm: str """ _validation = { - 'path': {'required': True}, - 'client_encryption_key_id': {'required': True}, - 'encryption_type': {'required': True}, - 'encryption_algorithm': {'required': True}, + "path": {"required": True}, + "client_encryption_key_id": {"required": True}, + "encryption_type": {"required": True}, + "encryption_algorithm": {"required": True}, } _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'client_encryption_key_id': {'key': 'clientEncryptionKeyId', 'type': 'str'}, - 'encryption_type': {'key': 'encryptionType', 'type': 'str'}, - 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, + "path": {"key": "path", "type": "str"}, + "client_encryption_key_id": {"key": "clientEncryptionKeyId", "type": "str"}, + "encryption_type": {"key": "encryptionType", "type": "str"}, + "encryption_algorithm": {"key": "encryptionAlgorithm", "type": "str"}, } def __init__( - self, - *, - path: str, - client_encryption_key_id: str, - encryption_type: str, - encryption_algorithm: str, - **kwargs + self, *, path: str, client_encryption_key_id: str, encryption_type: str, encryption_algorithm: str, **kwargs ): """ - :keyword path: Required. Path that needs to be encrypted. + :keyword path: Path that needs to be encrypted. Required. :paramtype path: str - :keyword client_encryption_key_id: Required. The identifier of the Client Encryption Key to be - used to encrypt the path. + :keyword client_encryption_key_id: The identifier of the Client Encryption Key to be used to + encrypt the path. Required. :paramtype client_encryption_key_id: str - :keyword encryption_type: Required. The type of encryption to be performed. Eg - Deterministic, - Randomized. + :keyword encryption_type: The type of encryption to be performed. Eg - Deterministic, + Randomized. Required. :paramtype encryption_type: str - :keyword encryption_algorithm: Required. The encryption algorithm which will be used. Eg - - AEAD_AES_256_CBC_HMAC_SHA256. + :keyword encryption_algorithm: The encryption algorithm which will be used. Eg - + AEAD_AES_256_CBC_HMAC_SHA256. Required. :paramtype encryption_algorithm: str """ - super(ClientEncryptionIncludedPath, self).__init__(**kwargs) + super().__init__(**kwargs) self.path = path self.client_encryption_key_id = client_encryption_key_id self.encryption_type = encryption_type self.encryption_algorithm = encryption_algorithm -class ClientEncryptionKeyCreateUpdateParameters(msrest.serialization.Model): +class ClientEncryptionKeyCreateUpdateParameters(_serialization.Model): """Parameters to create and update ClientEncryptionKey. All required parameters must be populated in order to send to Azure. - :ivar resource: Required. The standard JSON format of a ClientEncryptionKey. + :ivar resource: The standard JSON format of a ClientEncryptionKey. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyResource """ _validation = { - 'resource': {'required': True}, + "resource": {"required": True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'ClientEncryptionKeyResource'}, + "resource": {"key": "properties.resource", "type": "ClientEncryptionKeyResource"}, } - def __init__( - self, - *, - resource: "ClientEncryptionKeyResource", - **kwargs - ): + def __init__(self, *, resource: "_models.ClientEncryptionKeyResource", **kwargs): """ - :keyword resource: Required. The standard JSON format of a ClientEncryptionKey. + :keyword resource: The standard JSON format of a ClientEncryptionKey. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyResource """ - super(ClientEncryptionKeyCreateUpdateParameters, self).__init__(**kwargs) + super().__init__(**kwargs) self.resource = resource -class ClientEncryptionKeyResource(msrest.serialization.Model): +class ClientEncryptionKeyResource(_serialization.Model): """Cosmos DB client encryption key resource object. :ivar id: Name of the ClientEncryptionKey. @@ -1975,26 +2027,26 @@ class ClientEncryptionKeyResource(msrest.serialization.Model): :vartype encryption_algorithm: str :ivar wrapped_data_encryption_key: Wrapped (encrypted) form of the key represented as a byte array. - :vartype wrapped_data_encryption_key: bytearray + :vartype wrapped_data_encryption_key: bytes :ivar key_wrap_metadata: Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. :vartype key_wrap_metadata: ~azure.mgmt.cosmosdb.models.KeyWrapMetadata """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, - 'wrapped_data_encryption_key': {'key': 'wrappedDataEncryptionKey', 'type': 'bytearray'}, - 'key_wrap_metadata': {'key': 'keyWrapMetadata', 'type': 'KeyWrapMetadata'}, + "id": {"key": "id", "type": "str"}, + "encryption_algorithm": {"key": "encryptionAlgorithm", "type": "str"}, + "wrapped_data_encryption_key": {"key": "wrappedDataEncryptionKey", "type": "bytearray"}, + "key_wrap_metadata": {"key": "keyWrapMetadata", "type": "KeyWrapMetadata"}, } def __init__( self, *, - id: Optional[str] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin encryption_algorithm: Optional[str] = None, - wrapped_data_encryption_key: Optional[bytearray] = None, - key_wrap_metadata: Optional["KeyWrapMetadata"] = None, + wrapped_data_encryption_key: Optional[bytes] = None, + key_wrap_metadata: Optional["_models.KeyWrapMetadata"] = None, **kwargs ): """ @@ -2005,23 +2057,30 @@ def __init__( :paramtype encryption_algorithm: str :keyword wrapped_data_encryption_key: Wrapped (encrypted) form of the key represented as a byte array. - :paramtype wrapped_data_encryption_key: bytearray + :paramtype wrapped_data_encryption_key: bytes :keyword key_wrap_metadata: Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. :paramtype key_wrap_metadata: ~azure.mgmt.cosmosdb.models.KeyWrapMetadata """ - super(ClientEncryptionKeyResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id self.encryption_algorithm = encryption_algorithm self.wrapped_data_encryption_key = wrapped_data_encryption_key self.key_wrap_metadata = key_wrap_metadata -class ClientEncryptionKeyGetPropertiesResource(ExtendedResourceProperties, ClientEncryptionKeyResource): +class ClientEncryptionKeyGetPropertiesResource(ClientEncryptionKeyResource, ExtendedResourceProperties): """ClientEncryptionKeyGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. + :ivar rid: A system generated property. A unique identifier. + :vartype rid: str + :ivar ts: A system generated property that denotes the last updated timestamp of the resource. + :vartype ts: float + :ivar etag: A system generated property representing the resource etag required for optimistic + concurrency control. + :vartype etag: str :ivar id: Name of the ClientEncryptionKey. :vartype id: str :ivar encryption_algorithm: Encryption algorithm that will be used along with this client @@ -2029,42 +2088,35 @@ class ClientEncryptionKeyGetPropertiesResource(ExtendedResourceProperties, Clien :vartype encryption_algorithm: str :ivar wrapped_data_encryption_key: Wrapped (encrypted) form of the key represented as a byte array. - :vartype wrapped_data_encryption_key: bytearray + :vartype wrapped_data_encryption_key: bytes :ivar key_wrap_metadata: Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. :vartype key_wrap_metadata: ~azure.mgmt.cosmosdb.models.KeyWrapMetadata - :ivar rid: A system generated property. A unique identifier. - :vartype rid: str - :ivar ts: A system generated property that denotes the last updated timestamp of the resource. - :vartype ts: float - :ivar etag: A system generated property representing the resource etag required for optimistic - concurrency control. - :vartype etag: str """ _validation = { - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, - 'wrapped_data_encryption_key': {'key': 'wrappedDataEncryptionKey', 'type': 'bytearray'}, - 'key_wrap_metadata': {'key': 'keyWrapMetadata', 'type': 'KeyWrapMetadata'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "encryption_algorithm": {"key": "encryptionAlgorithm", "type": "str"}, + "wrapped_data_encryption_key": {"key": "wrappedDataEncryptionKey", "type": "bytearray"}, + "key_wrap_metadata": {"key": "keyWrapMetadata", "type": "KeyWrapMetadata"}, } def __init__( self, *, - id: Optional[str] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin encryption_algorithm: Optional[str] = None, - wrapped_data_encryption_key: Optional[bytearray] = None, - key_wrap_metadata: Optional["KeyWrapMetadata"] = None, + wrapped_data_encryption_key: Optional[bytes] = None, + key_wrap_metadata: Optional["_models.KeyWrapMetadata"] = None, **kwargs ): """ @@ -2075,19 +2127,25 @@ def __init__( :paramtype encryption_algorithm: str :keyword wrapped_data_encryption_key: Wrapped (encrypted) form of the key represented as a byte array. - :paramtype wrapped_data_encryption_key: bytearray + :paramtype wrapped_data_encryption_key: bytes :keyword key_wrap_metadata: Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. :paramtype key_wrap_metadata: ~azure.mgmt.cosmosdb.models.KeyWrapMetadata """ - super(ClientEncryptionKeyGetPropertiesResource, self).__init__(id=id, encryption_algorithm=encryption_algorithm, wrapped_data_encryption_key=wrapped_data_encryption_key, key_wrap_metadata=key_wrap_metadata, **kwargs) + super().__init__( + id=id, + encryption_algorithm=encryption_algorithm, + wrapped_data_encryption_key=wrapped_data_encryption_key, + key_wrap_metadata=key_wrap_metadata, + **kwargs + ) + self.rid = None + self.ts = None + self.etag = None self.id = id self.encryption_algorithm = encryption_algorithm self.wrapped_data_encryption_key = wrapped_data_encryption_key self.key_wrap_metadata = key_wrap_metadata - self.rid = None - self.ts = None - self.etag = None class ClientEncryptionKeyGetResults(ARMProxyResource): @@ -2106,33 +2164,28 @@ class ClientEncryptionKeyGetResults(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'resource': {'key': 'properties.resource', 'type': 'ClientEncryptionKeyGetPropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "resource": {"key": "properties.resource", "type": "ClientEncryptionKeyGetPropertiesResource"}, } - def __init__( - self, - *, - resource: Optional["ClientEncryptionKeyGetPropertiesResource"] = None, - **kwargs - ): + def __init__(self, *, resource: Optional["_models.ClientEncryptionKeyGetPropertiesResource"] = None, **kwargs): """ :keyword resource: :paramtype resource: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetPropertiesResource """ - super(ClientEncryptionKeyGetResults, self).__init__(**kwargs) + super().__init__(**kwargs) self.resource = resource -class ClientEncryptionKeysListResult(msrest.serialization.Model): +class ClientEncryptionKeysListResult(_serialization.Model): """The List operation response, that contains the client encryption keys and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -2142,30 +2195,26 @@ class ClientEncryptionKeysListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[ClientEncryptionKeyGetResults]'}, + "value": {"key": "value", "type": "[ClientEncryptionKeyGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(ClientEncryptionKeysListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class ClientEncryptionPolicy(msrest.serialization.Model): +class ClientEncryptionPolicy(_serialization.Model): """Cosmos DB client encryption policy. All required parameters must be populated in order to send to Azure. - :ivar included_paths: Required. Paths of the item that need encryption along with path-specific - settings. + :ivar included_paths: Paths of the item that need encryption along with path-specific settings. + Required. :vartype included_paths: list[~azure.mgmt.cosmosdb.models.ClientEncryptionIncludedPath] :ivar policy_format_version: Version of the client encryption policy definition. Please note, user passed value is ignored. Default policy version is 1. @@ -2173,35 +2222,31 @@ class ClientEncryptionPolicy(msrest.serialization.Model): """ _validation = { - 'included_paths': {'required': True}, + "included_paths": {"required": True}, } _attribute_map = { - 'included_paths': {'key': 'includedPaths', 'type': '[ClientEncryptionIncludedPath]'}, - 'policy_format_version': {'key': 'policyFormatVersion', 'type': 'int'}, + "included_paths": {"key": "includedPaths", "type": "[ClientEncryptionIncludedPath]"}, + "policy_format_version": {"key": "policyFormatVersion", "type": "int"}, } def __init__( - self, - *, - included_paths: List["ClientEncryptionIncludedPath"], - policy_format_version: Optional[int] = 1, - **kwargs + self, *, included_paths: List["_models.ClientEncryptionIncludedPath"], policy_format_version: int = 1, **kwargs ): """ - :keyword included_paths: Required. Paths of the item that need encryption along with - path-specific settings. + :keyword included_paths: Paths of the item that need encryption along with path-specific + settings. Required. :paramtype included_paths: list[~azure.mgmt.cosmosdb.models.ClientEncryptionIncludedPath] :keyword policy_format_version: Version of the client encryption policy definition. Please note, user passed value is ignored. Default policy version is 1. :paramtype policy_format_version: int """ - super(ClientEncryptionPolicy, self).__init__(**kwargs) + super().__init__(**kwargs) self.included_paths = included_paths self.policy_format_version = policy_format_version -class ClusterKey(msrest.serialization.Model): +class ClusterKey(_serialization.Model): """Cosmos DB Cassandra table cluster key. :ivar name: Name of the Cosmos DB Cassandra table cluster key. @@ -2212,17 +2257,11 @@ class ClusterKey(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'order_by': {'key': 'orderBy', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "order_by": {"key": "orderBy", "type": "str"}, } - def __init__( - self, - *, - name: Optional[str] = None, - order_by: Optional[str] = None, - **kwargs - ): + def __init__(self, *, name: Optional[str] = None, order_by: Optional[str] = None, **kwargs): """ :keyword name: Name of the Cosmos DB Cassandra table cluster key. :paramtype name: str @@ -2230,12 +2269,12 @@ def __init__( "Desc". :paramtype order_by: str """ - super(ClusterKey, self).__init__(**kwargs) + super().__init__(**kwargs) self.name = name self.order_by = order_by -class ManagedCassandraARMResourceProperties(msrest.serialization.Model): +class ManagedCassandraARMResourceProperties(_serialization.Model): """The core properties of ARM resources. Variables are only populated by the server, and will be ignored when sending a request. @@ -2248,30 +2287,30 @@ class ManagedCassandraARMResourceProperties(msrest.serialization.Model): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedCassandraManagedServiceIdentity """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedCassandraManagedServiceIdentity'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedCassandraManagedServiceIdentity"}, } def __init__( @@ -2279,23 +2318,23 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedCassandraManagedServiceIdentity"] = None, + identity: Optional["_models.ManagedCassandraManagedServiceIdentity"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedCassandraManagedServiceIdentity """ - super(ManagedCassandraARMResourceProperties, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = None self.name = None self.type = None @@ -2317,12 +2356,12 @@ class ClusterResource(ManagedCassandraARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedCassandraManagedServiceIdentity @@ -2331,19 +2370,19 @@ class ClusterResource(ManagedCassandraARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedCassandraManagedServiceIdentity'}, - 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedCassandraManagedServiceIdentity"}, + "properties": {"key": "properties", "type": "ClusterResourceProperties"}, } def __init__( @@ -2351,36 +2390,36 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedCassandraManagedServiceIdentity"] = None, - properties: Optional["ClusterResourceProperties"] = None, + identity: Optional["_models.ManagedCassandraManagedServiceIdentity"] = None, + properties: Optional["_models.ClusterResourceProperties"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedCassandraManagedServiceIdentity :keyword properties: Properties of a managed Cassandra cluster. :paramtype properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties """ - super(ClusterResource, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.properties = properties -class ClusterResourceProperties(msrest.serialization.Model): +class ClusterResourceProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes """Properties of a managed Cassandra cluster. Variables are only populated by the server, and will be ignored when sending a request. :ivar provisioning_state: The status of the resource at the time the operation was called. - Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". :vartype provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState :ivar restore_from_backup_id: To create an empty cluster, omit this field or set it to null. To @@ -2402,7 +2441,7 @@ class ClusterResourceProperties(msrest.serialization.Model): :ivar authentication_method: Which authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, so should not be used except in emergencies. 'Cassandra' is the default password based authentication. The default is 'Cassandra'. 'Ldap' is - in preview. Possible values include: "None", "Cassandra", "Ldap". + in preview. Known values are: "None", "Cassandra", and "Ldap". :vartype authentication_method: str or ~azure.mgmt.cosmosdb.models.AuthenticationMethod :ivar initial_cassandra_admin_password: Initial password for clients connecting as admin to the cluster. Should be changed after cluster creation. Returns null on GET. This field only applies @@ -2444,45 +2483,45 @@ class ClusterResourceProperties(msrest.serialization.Model): """ _validation = { - 'gossip_certificates': {'readonly': True}, - 'seed_nodes': {'readonly': True}, + "gossip_certificates": {"readonly": True}, + "seed_nodes": {"readonly": True}, } _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'restore_from_backup_id': {'key': 'restoreFromBackupId', 'type': 'str'}, - 'delegated_management_subnet_id': {'key': 'delegatedManagementSubnetId', 'type': 'str'}, - 'cassandra_version': {'key': 'cassandraVersion', 'type': 'str'}, - 'cluster_name_override': {'key': 'clusterNameOverride', 'type': 'str'}, - 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, - 'initial_cassandra_admin_password': {'key': 'initialCassandraAdminPassword', 'type': 'str'}, - 'prometheus_endpoint': {'key': 'prometheusEndpoint', 'type': 'SeedNode'}, - 'repair_enabled': {'key': 'repairEnabled', 'type': 'bool'}, - 'client_certificates': {'key': 'clientCertificates', 'type': '[Certificate]'}, - 'external_gossip_certificates': {'key': 'externalGossipCertificates', 'type': '[Certificate]'}, - 'gossip_certificates': {'key': 'gossipCertificates', 'type': '[Certificate]'}, - 'external_seed_nodes': {'key': 'externalSeedNodes', 'type': '[SeedNode]'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, - 'hours_between_backups': {'key': 'hoursBetweenBackups', 'type': 'int'}, - 'deallocated': {'key': 'deallocated', 'type': 'bool'}, - 'cassandra_audit_logging_enabled': {'key': 'cassandraAuditLoggingEnabled', 'type': 'bool'}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "restore_from_backup_id": {"key": "restoreFromBackupId", "type": "str"}, + "delegated_management_subnet_id": {"key": "delegatedManagementSubnetId", "type": "str"}, + "cassandra_version": {"key": "cassandraVersion", "type": "str"}, + "cluster_name_override": {"key": "clusterNameOverride", "type": "str"}, + "authentication_method": {"key": "authenticationMethod", "type": "str"}, + "initial_cassandra_admin_password": {"key": "initialCassandraAdminPassword", "type": "str"}, + "prometheus_endpoint": {"key": "prometheusEndpoint", "type": "SeedNode"}, + "repair_enabled": {"key": "repairEnabled", "type": "bool"}, + "client_certificates": {"key": "clientCertificates", "type": "[Certificate]"}, + "external_gossip_certificates": {"key": "externalGossipCertificates", "type": "[Certificate]"}, + "gossip_certificates": {"key": "gossipCertificates", "type": "[Certificate]"}, + "external_seed_nodes": {"key": "externalSeedNodes", "type": "[SeedNode]"}, + "seed_nodes": {"key": "seedNodes", "type": "[SeedNode]"}, + "hours_between_backups": {"key": "hoursBetweenBackups", "type": "int"}, + "deallocated": {"key": "deallocated", "type": "bool"}, + "cassandra_audit_logging_enabled": {"key": "cassandraAuditLoggingEnabled", "type": "bool"}, } def __init__( self, *, - provisioning_state: Optional[Union[str, "ManagedCassandraProvisioningState"]] = None, + provisioning_state: Optional[Union[str, "_models.ManagedCassandraProvisioningState"]] = None, restore_from_backup_id: Optional[str] = None, delegated_management_subnet_id: Optional[str] = None, cassandra_version: Optional[str] = None, cluster_name_override: Optional[str] = None, - authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, + authentication_method: Optional[Union[str, "_models.AuthenticationMethod"]] = None, initial_cassandra_admin_password: Optional[str] = None, - prometheus_endpoint: Optional["SeedNode"] = None, + prometheus_endpoint: Optional["_models.SeedNode"] = None, repair_enabled: Optional[bool] = None, - client_certificates: Optional[List["Certificate"]] = None, - external_gossip_certificates: Optional[List["Certificate"]] = None, - external_seed_nodes: Optional[List["SeedNode"]] = None, + client_certificates: Optional[List["_models.Certificate"]] = None, + external_gossip_certificates: Optional[List["_models.Certificate"]] = None, + external_seed_nodes: Optional[List["_models.SeedNode"]] = None, hours_between_backups: Optional[int] = None, deallocated: Optional[bool] = None, cassandra_audit_logging_enabled: Optional[bool] = None, @@ -2490,7 +2529,7 @@ def __init__( ): """ :keyword provisioning_state: The status of the resource at the time the operation was called. - Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". :paramtype provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState :keyword restore_from_backup_id: To create an empty cluster, omit this field or set it to null. @@ -2512,7 +2551,7 @@ def __init__( :keyword authentication_method: Which authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, so should not be used except in emergencies. 'Cassandra' is the default password based authentication. The default is - 'Cassandra'. 'Ldap' is in preview. Possible values include: "None", "Cassandra", "Ldap". + 'Cassandra'. 'Ldap' is in preview. Known values are: "None", "Cassandra", and "Ldap". :paramtype authentication_method: str or ~azure.mgmt.cosmosdb.models.AuthenticationMethod :keyword initial_cassandra_admin_password: Initial password for clients connecting as admin to the cluster. Should be changed after cluster creation. Returns null on GET. This field only @@ -2545,7 +2584,7 @@ def __init__( :keyword cassandra_audit_logging_enabled: Whether Cassandra audit logging is enabled. :paramtype cassandra_audit_logging_enabled: bool """ - super(ClusterResourceProperties, self).__init__(**kwargs) + super().__init__(**kwargs) self.provisioning_state = provisioning_state self.restore_from_backup_id = restore_from_backup_id self.delegated_management_subnet_id = delegated_management_subnet_id @@ -2565,7 +2604,7 @@ def __init__( self.cassandra_audit_logging_enabled = cassandra_audit_logging_enabled -class Column(msrest.serialization.Model): +class Column(_serialization.Model): """Cosmos DB Cassandra table column. :ivar name: Name of the Cosmos DB Cassandra table column. @@ -2575,29 +2614,23 @@ class Column(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - *, - name: Optional[str] = None, - type: Optional[str] = None, - **kwargs - ): + def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs): """ :keyword name: Name of the Cosmos DB Cassandra table column. :paramtype name: str :keyword type: Type of the Cosmos DB Cassandra table column. :paramtype type: str """ - super(Column, self).__init__(**kwargs) + super().__init__(**kwargs) self.name = name self.type = type -class CommandOutput(msrest.serialization.Model): +class CommandOutput(_serialization.Model): """Response of /command api. :ivar command_output: Output of the command. @@ -2605,33 +2638,28 @@ class CommandOutput(msrest.serialization.Model): """ _attribute_map = { - 'command_output': {'key': 'commandOutput', 'type': 'str'}, + "command_output": {"key": "commandOutput", "type": "str"}, } - def __init__( - self, - *, - command_output: Optional[str] = None, - **kwargs - ): + def __init__(self, *, command_output: Optional[str] = None, **kwargs): """ :keyword command_output: Output of the command. :paramtype command_output: str """ - super(CommandOutput, self).__init__(**kwargs) + super().__init__(**kwargs) self.command_output = command_output -class CommandPostBody(msrest.serialization.Model): +class CommandPostBody(_serialization.Model): """Specification of which command to run where. All required parameters must be populated in order to send to Azure. - :ivar command: Required. The command which should be run. + :ivar command: The command which should be run. Required. :vartype command: str :ivar arguments: The arguments for the command to be run. :vartype arguments: dict[str, str] - :ivar host: Required. IP address of the cassandra host to run the command on. + :ivar host: IP address of the cassandra host to run the command on. Required. :vartype host: str :ivar cassandra_stop_start: If true, stops cassandra before executing the command and then start it again. @@ -2642,16 +2670,16 @@ class CommandPostBody(msrest.serialization.Model): """ _validation = { - 'command': {'required': True}, - 'host': {'required': True}, + "command": {"required": True}, + "host": {"required": True}, } _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - 'arguments': {'key': 'arguments', 'type': '{str}'}, - 'host': {'key': 'host', 'type': 'str'}, - 'cassandra_stop_start': {'key': 'cassandra-stop-start', 'type': 'bool'}, - 'readwrite': {'key': 'readwrite', 'type': 'bool'}, + "command": {"key": "command", "type": "str"}, + "arguments": {"key": "arguments", "type": "{str}"}, + "host": {"key": "host", "type": "str"}, + "cassandra_stop_start": {"key": "cassandra-stop-start", "type": "bool"}, + "readwrite": {"key": "readwrite", "type": "bool"}, } def __init__( @@ -2665,11 +2693,11 @@ def __init__( **kwargs ): """ - :keyword command: Required. The command which should be run. + :keyword command: The command which should be run. Required. :paramtype command: str :keyword arguments: The arguments for the command to be run. :paramtype arguments: dict[str, str] - :keyword host: Required. IP address of the cassandra host to run the command on. + :keyword host: IP address of the cassandra host to run the command on. Required. :paramtype host: str :keyword cassandra_stop_start: If true, stops cassandra before executing the command and then start it again. @@ -2678,7 +2706,7 @@ def __init__( otherwise read-only. :paramtype readwrite: bool """ - super(CommandPostBody, self).__init__(**kwargs) + super().__init__(**kwargs) self.command = command self.arguments = arguments self.host = host @@ -2686,219 +2714,45 @@ def __init__( self.readwrite = readwrite -class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): - """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems(msrest.serialization.Model): - """ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems. - - :ivar address: The node's IP address. - :vartype address: str - :ivar state: The state of the node in Cassandra ring. Possible values include: "Normal", - "Leaving", "Joining", "Moving", "Stopped". - :vartype state: str or ~azure.mgmt.cosmosdb.models.NodeState - :ivar status: - :vartype status: str - :ivar load: The amount of file system data in the data directory (e.g., 47.66 kB), excluding - all content in the snapshots subdirectories. Because all SSTable data files are included, any - data that is not cleaned up (such as TTL-expired cells or tombstones) is counted. - :vartype load: str - :ivar tokens: List of tokens this node covers. - :vartype tokens: list[str] - :ivar size: - :vartype size: int - :ivar host_id: The network ID of the node. - :vartype host_id: str - :ivar rack: The rack this node is part of. - :vartype rack: str - :ivar timestamp: The timestamp at which that snapshot of these usage statistics were taken. - :vartype timestamp: str - :ivar disk_used_kb: The amount of disk used, in kB, of the directory /var/lib/cassandra. - :vartype disk_used_kb: long - :ivar disk_free_kb: The amount of disk free, in kB, of the directory /var/lib/cassandra. - :vartype disk_free_kb: long - :ivar memory_used_kb: Used memory (calculated as total - free - buffers - cache), in kB. - :vartype memory_used_kb: long - :ivar memory_buffers_and_cached_kb: Memory used by kernel buffers (Buffers in /proc/meminfo) - and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB. - :vartype memory_buffers_and_cached_kb: long - :ivar memory_free_kb: Unused memory (MemFree and SwapFree in /proc/meminfo), in kB. - :vartype memory_free_kb: long - :ivar memory_total_kb: Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in kB. - :vartype memory_total_kb: long - :ivar cpu_usage: A float representing the current system-wide CPU utilization as a percentage. - :vartype cpu_usage: float - """ - - _attribute_map = { - 'address': {'key': 'address', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'load': {'key': 'load', 'type': 'str'}, - 'tokens': {'key': 'tokens', 'type': '[str]'}, - 'size': {'key': 'size', 'type': 'int'}, - 'host_id': {'key': 'hostID', 'type': 'str'}, - 'rack': {'key': 'rack', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'disk_used_kb': {'key': 'diskUsedKB', 'type': 'long'}, - 'disk_free_kb': {'key': 'diskFreeKB', 'type': 'long'}, - 'memory_used_kb': {'key': 'memoryUsedKB', 'type': 'long'}, - 'memory_buffers_and_cached_kb': {'key': 'memoryBuffersAndCachedKB', 'type': 'long'}, - 'memory_free_kb': {'key': 'memoryFreeKB', 'type': 'long'}, - 'memory_total_kb': {'key': 'memoryTotalKB', 'type': 'long'}, - 'cpu_usage': {'key': 'cpuUsage', 'type': 'float'}, - } - - def __init__( - self, - *, - address: Optional[str] = None, - state: Optional[Union[str, "NodeState"]] = None, - status: Optional[str] = None, - load: Optional[str] = None, - tokens: Optional[List[str]] = None, - size: Optional[int] = None, - host_id: Optional[str] = None, - rack: Optional[str] = None, - timestamp: Optional[str] = None, - disk_used_kb: Optional[int] = None, - disk_free_kb: Optional[int] = None, - memory_used_kb: Optional[int] = None, - memory_buffers_and_cached_kb: Optional[int] = None, - memory_free_kb: Optional[int] = None, - memory_total_kb: Optional[int] = None, - cpu_usage: Optional[float] = None, - **kwargs - ): - """ - :keyword address: The node's IP address. - :paramtype address: str - :keyword state: The state of the node in Cassandra ring. Possible values include: "Normal", - "Leaving", "Joining", "Moving", "Stopped". - :paramtype state: str or ~azure.mgmt.cosmosdb.models.NodeState - :keyword status: - :paramtype status: str - :keyword load: The amount of file system data in the data directory (e.g., 47.66 kB), excluding - all content in the snapshots subdirectories. Because all SSTable data files are included, any - data that is not cleaned up (such as TTL-expired cells or tombstones) is counted. - :paramtype load: str - :keyword tokens: List of tokens this node covers. - :paramtype tokens: list[str] - :keyword size: - :paramtype size: int - :keyword host_id: The network ID of the node. - :paramtype host_id: str - :keyword rack: The rack this node is part of. - :paramtype rack: str - :keyword timestamp: The timestamp at which that snapshot of these usage statistics were taken. - :paramtype timestamp: str - :keyword disk_used_kb: The amount of disk used, in kB, of the directory /var/lib/cassandra. - :paramtype disk_used_kb: long - :keyword disk_free_kb: The amount of disk free, in kB, of the directory /var/lib/cassandra. - :paramtype disk_free_kb: long - :keyword memory_used_kb: Used memory (calculated as total - free - buffers - cache), in kB. - :paramtype memory_used_kb: long - :keyword memory_buffers_and_cached_kb: Memory used by kernel buffers (Buffers in /proc/meminfo) - and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB. - :paramtype memory_buffers_and_cached_kb: long - :keyword memory_free_kb: Unused memory (MemFree and SwapFree in /proc/meminfo), in kB. - :paramtype memory_free_kb: long - :keyword memory_total_kb: Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in - kB. - :paramtype memory_total_kb: long - :keyword cpu_usage: A float representing the current system-wide CPU utilization as a - percentage. - :paramtype cpu_usage: float - """ - super(ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems, self).__init__(**kwargs) - self.address = address - self.state = state - self.status = status - self.load = load - self.tokens = tokens - self.size = size - self.host_id = host_id - self.rack = rack - self.timestamp = timestamp - self.disk_used_kb = disk_used_kb - self.disk_free_kb = disk_free_kb - self.memory_used_kb = memory_used_kb - self.memory_buffers_and_cached_kb = memory_buffers_and_cached_kb - self.memory_free_kb = memory_free_kb - self.memory_total_kb = memory_total_kb - self.cpu_usage = cpu_usage - - -class CompositePath(msrest.serialization.Model): +class CompositePath(_serialization.Model): """CompositePath. :ivar path: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*). :vartype path: str - :ivar order: Sort order for composite paths. Possible values include: "ascending", - "descending". + :ivar order: Sort order for composite paths. Known values are: "ascending" and "descending". :vartype order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder """ _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'str'}, + "path": {"key": "path", "type": "str"}, + "order": {"key": "order", "type": "str"}, } def __init__( self, *, path: Optional[str] = None, - order: Optional[Union[str, "CompositePathSortOrder"]] = None, + order: Optional[Union[str, "_models.CompositePathSortOrder"]] = None, **kwargs ): """ :keyword path: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*). :paramtype path: str - :keyword order: Sort order for composite paths. Possible values include: "ascending", - "descending". + :keyword order: Sort order for composite paths. Known values are: "ascending" and "descending". :paramtype order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder """ - super(CompositePath, self).__init__(**kwargs) + super().__init__(**kwargs) self.path = path self.order = order -class ConflictResolutionPolicy(msrest.serialization.Model): +class ConflictResolutionPolicy(_serialization.Model): """The conflict resolution policy for the container. - :ivar mode: Indicates the conflict resolution mode. Possible values include: "LastWriterWins", - "Custom". Default value: "LastWriterWins". + :ivar mode: Indicates the conflict resolution mode. Known values are: "LastWriterWins" and + "Custom". :vartype mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode :ivar conflict_resolution_path: The conflict resolution path in the case of LastWriterWins mode. @@ -2909,22 +2763,22 @@ class ConflictResolutionPolicy(msrest.serialization.Model): """ _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'conflict_resolution_path': {'key': 'conflictResolutionPath', 'type': 'str'}, - 'conflict_resolution_procedure': {'key': 'conflictResolutionProcedure', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, + "conflict_resolution_path": {"key": "conflictResolutionPath", "type": "str"}, + "conflict_resolution_procedure": {"key": "conflictResolutionProcedure", "type": "str"}, } def __init__( self, *, - mode: Optional[Union[str, "ConflictResolutionMode"]] = "LastWriterWins", + mode: Union[str, "_models.ConflictResolutionMode"] = "LastWriterWins", conflict_resolution_path: Optional[str] = None, conflict_resolution_procedure: Optional[str] = None, **kwargs ): """ - :keyword mode: Indicates the conflict resolution mode. Possible values include: - "LastWriterWins", "Custom". Default value: "LastWriterWins". + :keyword mode: Indicates the conflict resolution mode. Known values are: "LastWriterWins" and + "Custom". :paramtype mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode :keyword conflict_resolution_path: The conflict resolution path in the case of LastWriterWins mode. @@ -2933,18 +2787,18 @@ def __init__( custom mode. :paramtype conflict_resolution_procedure: str """ - super(ConflictResolutionPolicy, self).__init__(**kwargs) + super().__init__(**kwargs) self.mode = mode self.conflict_resolution_path = conflict_resolution_path self.conflict_resolution_procedure = conflict_resolution_procedure -class ConnectionError(msrest.serialization.Model): +class ConnectionError(_serialization.Model): """ConnectionError. - :ivar connection_state: The kind of connection error that occurred. Possible values include: + :ivar connection_state: The kind of connection error that occurred. Known values are: "Unknown", "OK", "OperatorToDataCenterNetworkError", "DatacenterToDatacenterNetworkError", - "InternalOperatorToDataCenterCertificateError", "InternalError". + "InternalOperatorToDataCenterCertificateError", and "InternalError". :vartype connection_state: str or ~azure.mgmt.cosmosdb.models.ConnectionState :ivar i_p_from: The IP of host that originated the failed connection. :vartype i_p_from: str @@ -2957,17 +2811,17 @@ class ConnectionError(msrest.serialization.Model): """ _attribute_map = { - 'connection_state': {'key': 'connectionState', 'type': 'str'}, - 'i_p_from': {'key': 'iPFrom', 'type': 'str'}, - 'i_p_to': {'key': 'iPTo', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'exception': {'key': 'exception', 'type': 'str'}, + "connection_state": {"key": "connectionState", "type": "str"}, + "i_p_from": {"key": "iPFrom", "type": "str"}, + "i_p_to": {"key": "iPTo", "type": "str"}, + "port": {"key": "port", "type": "int"}, + "exception": {"key": "exception", "type": "str"}, } def __init__( self, *, - connection_state: Optional[Union[str, "ConnectionState"]] = None, + connection_state: Optional[Union[str, "_models.ConnectionState"]] = None, i_p_from: Optional[str] = None, i_p_to: Optional[str] = None, port: Optional[int] = None, @@ -2975,9 +2829,9 @@ def __init__( **kwargs ): """ - :keyword connection_state: The kind of connection error that occurred. Possible values include: + :keyword connection_state: The kind of connection error that occurred. Known values are: "Unknown", "OK", "OperatorToDataCenterNetworkError", "DatacenterToDatacenterNetworkError", - "InternalOperatorToDataCenterCertificateError", "InternalError". + "InternalOperatorToDataCenterCertificateError", and "InternalError". :paramtype connection_state: str or ~azure.mgmt.cosmosdb.models.ConnectionState :keyword i_p_from: The IP of host that originated the failed connection. :paramtype i_p_from: str @@ -2988,7 +2842,7 @@ def __init__( :keyword exception: Detailed error message about the failed connection. :paramtype exception: str """ - super(ConnectionError, self).__init__(**kwargs) + super().__init__(**kwargs) self.connection_state = connection_state self.i_p_from = i_p_from self.i_p_to = i_p_to @@ -2996,19 +2850,19 @@ def __init__( self.exception = exception -class ConsistencyPolicy(msrest.serialization.Model): +class ConsistencyPolicy(_serialization.Model): """The consistency policy for the Cosmos DB database account. All required parameters must be populated in order to send to Azure. - :ivar default_consistency_level: Required. The default consistency level and configuration - settings of the Cosmos DB account. Possible values include: "Eventual", "Session", - "BoundedStaleness", "Strong", "ConsistentPrefix". + :ivar default_consistency_level: The default consistency level and configuration settings of + the Cosmos DB account. Required. Known values are: "Eventual", "Session", "BoundedStaleness", + "Strong", and "ConsistentPrefix". :vartype default_consistency_level: str or ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel :ivar max_staleness_prefix: When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :vartype max_staleness_prefix: long + :vartype max_staleness_prefix: int :ivar max_interval_in_seconds: When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. @@ -3016,47 +2870,47 @@ class ConsistencyPolicy(msrest.serialization.Model): """ _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 86400, 'minimum': 5}, + "default_consistency_level": {"required": True}, + "max_staleness_prefix": {"maximum": 2147483647, "minimum": 1}, + "max_interval_in_seconds": {"maximum": 86400, "minimum": 5}, } _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'str'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + "default_consistency_level": {"key": "defaultConsistencyLevel", "type": "str"}, + "max_staleness_prefix": {"key": "maxStalenessPrefix", "type": "int"}, + "max_interval_in_seconds": {"key": "maxIntervalInSeconds", "type": "int"}, } def __init__( self, *, - default_consistency_level: Union[str, "DefaultConsistencyLevel"], + default_consistency_level: Union[str, "_models.DefaultConsistencyLevel"], max_staleness_prefix: Optional[int] = None, max_interval_in_seconds: Optional[int] = None, **kwargs ): """ - :keyword default_consistency_level: Required. The default consistency level and configuration - settings of the Cosmos DB account. Possible values include: "Eventual", "Session", - "BoundedStaleness", "Strong", "ConsistentPrefix". + :keyword default_consistency_level: The default consistency level and configuration settings of + the Cosmos DB account. Required. Known values are: "Eventual", "Session", "BoundedStaleness", + "Strong", and "ConsistentPrefix". :paramtype default_consistency_level: str or ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel :keyword max_staleness_prefix: When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :paramtype max_staleness_prefix: long + :paramtype max_staleness_prefix: int :keyword max_interval_in_seconds: When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. :paramtype max_interval_in_seconds: int """ - super(ConsistencyPolicy, self).__init__(**kwargs) + super().__init__(**kwargs) self.default_consistency_level = default_consistency_level self.max_staleness_prefix = max_staleness_prefix self.max_interval_in_seconds = max_interval_in_seconds -class ContainerPartitionKey(msrest.serialization.Model): +class ContainerPartitionKey(_serialization.Model): """The configuration of the partition key to be used for partitioning data into multiple partitions. Variables are only populated by the server, and will be ignored when sending a request. @@ -3064,8 +2918,8 @@ class ContainerPartitionKey(msrest.serialization.Model): :ivar paths: List of paths using which data within the container can be partitioned. :vartype paths: list[str] :ivar kind: Indicates the kind of algorithm used for partitioning. For MultiHash, multiple - partition keys (upto three maximum) are supported for container create. Possible values - include: "Hash", "Range", "MultiHash". Default value: "Hash". + partition keys (upto three maximum) are supported for container create. Known values are: + "Hash", "Range", and "MultiHash". :vartype kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind :ivar version: Indicates the version of the partition key definition. :vartype version: int @@ -3074,22 +2928,22 @@ class ContainerPartitionKey(msrest.serialization.Model): """ _validation = { - 'version': {'maximum': 2, 'minimum': 1}, - 'system_key': {'readonly': True}, + "version": {"maximum": 2, "minimum": 1}, + "system_key": {"readonly": True}, } _attribute_map = { - 'paths': {'key': 'paths', 'type': '[str]'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'int'}, - 'system_key': {'key': 'systemKey', 'type': 'bool'}, + "paths": {"key": "paths", "type": "[str]"}, + "kind": {"key": "kind", "type": "str"}, + "version": {"key": "version", "type": "int"}, + "system_key": {"key": "systemKey", "type": "bool"}, } def __init__( self, *, paths: Optional[List[str]] = None, - kind: Optional[Union[str, "PartitionKind"]] = "Hash", + kind: Union[str, "_models.PartitionKind"] = "Hash", version: Optional[int] = None, **kwargs ): @@ -3097,20 +2951,20 @@ def __init__( :keyword paths: List of paths using which data within the container can be partitioned. :paramtype paths: list[str] :keyword kind: Indicates the kind of algorithm used for partitioning. For MultiHash, multiple - partition keys (upto three maximum) are supported for container create. Possible values - include: "Hash", "Range", "MultiHash". Default value: "Hash". + partition keys (upto three maximum) are supported for container create. Known values are: + "Hash", "Range", and "MultiHash". :paramtype kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind :keyword version: Indicates the version of the partition key definition. :paramtype version: int """ - super(ContainerPartitionKey, self).__init__(**kwargs) + super().__init__(**kwargs) self.paths = paths self.kind = kind self.version = version self.system_key = None -class ContinuousBackupInformation(msrest.serialization.Model): +class ContinuousBackupInformation(_serialization.Model): """Information about the status of continuous backups. :ivar latest_restorable_timestamp: The latest restorable timestamp for a resource. @@ -3118,24 +2972,19 @@ class ContinuousBackupInformation(msrest.serialization.Model): """ _attribute_map = { - 'latest_restorable_timestamp': {'key': 'latestRestorableTimestamp', 'type': 'str'}, + "latest_restorable_timestamp": {"key": "latestRestorableTimestamp", "type": "str"}, } - def __init__( - self, - *, - latest_restorable_timestamp: Optional[str] = None, - **kwargs - ): + def __init__(self, *, latest_restorable_timestamp: Optional[str] = None, **kwargs): """ :keyword latest_restorable_timestamp: The latest restorable timestamp for a resource. :paramtype latest_restorable_timestamp: str """ - super(ContinuousBackupInformation, self).__init__(**kwargs) + super().__init__(**kwargs) self.latest_restorable_timestamp = latest_restorable_timestamp -class ContinuousBackupRestoreLocation(msrest.serialization.Model): +class ContinuousBackupRestoreLocation(_serialization.Model): """Properties of the regional restorable account. :ivar location: The name of the continuous backup restore location. @@ -3143,20 +2992,15 @@ class ContinuousBackupRestoreLocation(msrest.serialization.Model): """ _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, + "location": {"key": "location", "type": "str"}, } - def __init__( - self, - *, - location: Optional[str] = None, - **kwargs - ): + def __init__(self, *, location: Optional[str] = None, **kwargs): """ :keyword location: The name of the continuous backup restore location. :paramtype location: str """ - super(ContinuousBackupRestoreLocation, self).__init__(**kwargs) + super().__init__(**kwargs) self.location = location @@ -3165,8 +3009,8 @@ class ContinuousModeBackupPolicy(BackupPolicy): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Describes the mode of backups.Constant filled by server. Possible values - include: "Periodic", "Continuous". + :ivar type: Describes the mode of backups. Required. Known values are: "Periodic" and + "Continuous". :vartype type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType :ivar migration_state: The object representing the state of the migration between the backup policies. @@ -3176,20 +3020,20 @@ class ContinuousModeBackupPolicy(BackupPolicy): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'migration_state': {'key': 'migrationState', 'type': 'BackupPolicyMigrationState'}, - 'continuous_mode_properties': {'key': 'continuousModeProperties', 'type': 'ContinuousModeProperties'}, + "type": {"key": "type", "type": "str"}, + "migration_state": {"key": "migrationState", "type": "BackupPolicyMigrationState"}, + "continuous_mode_properties": {"key": "continuousModeProperties", "type": "ContinuousModeProperties"}, } def __init__( self, *, - migration_state: Optional["BackupPolicyMigrationState"] = None, - continuous_mode_properties: Optional["ContinuousModeProperties"] = None, + migration_state: Optional["_models.BackupPolicyMigrationState"] = None, + continuous_mode_properties: Optional["_models.ContinuousModeProperties"] = None, **kwargs ): """ @@ -3199,45 +3043,40 @@ def __init__( :keyword continuous_mode_properties: Configuration values for continuous mode backup. :paramtype continuous_mode_properties: ~azure.mgmt.cosmosdb.models.ContinuousModeProperties """ - super(ContinuousModeBackupPolicy, self).__init__(migration_state=migration_state, **kwargs) - self.type = 'Continuous' # type: str + super().__init__(migration_state=migration_state, **kwargs) + self.type = "Continuous" # type: str self.continuous_mode_properties = continuous_mode_properties -class ContinuousModeProperties(msrest.serialization.Model): +class ContinuousModeProperties(_serialization.Model): """Configuration values for periodic mode backup. - :ivar tier: Enum to indicate type of Continuos backup mode. Possible values include: - "Continuous7Days", "Continuous30Days". + :ivar tier: Enum to indicate type of Continuos backup mode. Known values are: "Continuous7Days" + and "Continuous30Days". :vartype tier: str or ~azure.mgmt.cosmosdb.models.ContinuousTier """ _attribute_map = { - 'tier': {'key': 'tier', 'type': 'str'}, + "tier": {"key": "tier", "type": "str"}, } - def __init__( - self, - *, - tier: Optional[Union[str, "ContinuousTier"]] = None, - **kwargs - ): + def __init__(self, *, tier: Optional[Union[str, "_models.ContinuousTier"]] = None, **kwargs): """ - :keyword tier: Enum to indicate type of Continuos backup mode. Possible values include: - "Continuous7Days", "Continuous30Days". + :keyword tier: Enum to indicate type of Continuos backup mode. Known values are: + "Continuous7Days" and "Continuous30Days". :paramtype tier: str or ~azure.mgmt.cosmosdb.models.ContinuousTier """ - super(ContinuousModeProperties, self).__init__(**kwargs) + super().__init__(**kwargs) self.tier = tier -class CorsPolicy(msrest.serialization.Model): +class CorsPolicy(_serialization.Model): """The CORS policy for the Cosmos DB database account. All required parameters must be populated in order to send to Azure. - :ivar allowed_origins: Required. The origin domains that are permitted to make a request - against the service via CORS. + :ivar allowed_origins: The origin domains that are permitted to make a request against the + service via CORS. Required. :vartype allowed_origins: str :ivar allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a CORS request. @@ -3250,20 +3089,20 @@ class CorsPolicy(msrest.serialization.Model): :vartype exposed_headers: str :ivar max_age_in_seconds: The maximum amount time that a browser should cache the preflight OPTIONS request. - :vartype max_age_in_seconds: long + :vartype max_age_in_seconds: int """ _validation = { - 'allowed_origins': {'required': True}, - 'max_age_in_seconds': {'maximum': 2147483647, 'minimum': 1}, + "allowed_origins": {"required": True}, + "max_age_in_seconds": {"maximum": 2147483647, "minimum": 1}, } _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': 'str'}, - 'allowed_methods': {'key': 'allowedMethods', 'type': 'str'}, - 'allowed_headers': {'key': 'allowedHeaders', 'type': 'str'}, - 'exposed_headers': {'key': 'exposedHeaders', 'type': 'str'}, - 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'long'}, + "allowed_origins": {"key": "allowedOrigins", "type": "str"}, + "allowed_methods": {"key": "allowedMethods", "type": "str"}, + "allowed_headers": {"key": "allowedHeaders", "type": "str"}, + "exposed_headers": {"key": "exposedHeaders", "type": "str"}, + "max_age_in_seconds": {"key": "maxAgeInSeconds", "type": "int"}, } def __init__( @@ -3277,8 +3116,8 @@ def __init__( **kwargs ): """ - :keyword allowed_origins: Required. The origin domains that are permitted to make a request - against the service via CORS. + :keyword allowed_origins: The origin domains that are permitted to make a request against the + service via CORS. Required. :paramtype allowed_origins: str :keyword allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a CORS request. @@ -3291,9 +3130,9 @@ def __init__( :paramtype exposed_headers: str :keyword max_age_in_seconds: The maximum amount time that a browser should cache the preflight OPTIONS request. - :paramtype max_age_in_seconds: long + :paramtype max_age_in_seconds: int """ - super(CorsPolicy, self).__init__(**kwargs) + super().__init__(**kwargs) self.allowed_origins = allowed_origins self.allowed_methods = allowed_methods self.allowed_headers = allowed_headers @@ -3306,8 +3145,7 @@ class CosmosCassandraDataTransferDataSourceSink(DataTransferDataSourceSink): All required parameters must be populated in order to send to Azure. - :ivar component: Required. Constant filled by server. Possible values include: - "CosmosDBCassandra", "CosmosDBSql", "AzureBlobStorage". Default value: "CosmosDBCassandra". + :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent :ivar keyspace_name: Required. :vartype keyspace_name: str @@ -3316,32 +3154,26 @@ class CosmosCassandraDataTransferDataSourceSink(DataTransferDataSourceSink): """ _validation = { - 'component': {'required': True}, - 'keyspace_name': {'required': True}, - 'table_name': {'required': True}, + "component": {"required": True}, + "keyspace_name": {"required": True}, + "table_name": {"required": True}, } _attribute_map = { - 'component': {'key': 'component', 'type': 'str'}, - 'keyspace_name': {'key': 'keyspaceName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, + "component": {"key": "component", "type": "str"}, + "keyspace_name": {"key": "keyspaceName", "type": "str"}, + "table_name": {"key": "tableName", "type": "str"}, } - def __init__( - self, - *, - keyspace_name: str, - table_name: str, - **kwargs - ): + def __init__(self, *, keyspace_name: str, table_name: str, **kwargs): """ :keyword keyspace_name: Required. :paramtype keyspace_name: str :keyword table_name: Required. :paramtype table_name: str """ - super(CosmosCassandraDataTransferDataSourceSink, self).__init__(**kwargs) - self.component = 'CosmosDBCassandra' # type: str + super().__init__(**kwargs) + self.component = "CosmosDBCassandra" # type: str self.keyspace_name = keyspace_name self.table_name = table_name @@ -3351,8 +3183,7 @@ class CosmosSqlDataTransferDataSourceSink(DataTransferDataSourceSink): All required parameters must be populated in order to send to Azure. - :ivar component: Required. Constant filled by server. Possible values include: - "CosmosDBCassandra", "CosmosDBSql", "AzureBlobStorage". Default value: "CosmosDBCassandra". + :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent :ivar database_name: Required. :vartype database_name: str @@ -3361,32 +3192,26 @@ class CosmosSqlDataTransferDataSourceSink(DataTransferDataSourceSink): """ _validation = { - 'component': {'required': True}, - 'database_name': {'required': True}, - 'container_name': {'required': True}, + "component": {"required": True}, + "database_name": {"required": True}, + "container_name": {"required": True}, } _attribute_map = { - 'component': {'key': 'component', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, + "component": {"key": "component", "type": "str"}, + "database_name": {"key": "databaseName", "type": "str"}, + "container_name": {"key": "containerName", "type": "str"}, } - def __init__( - self, - *, - database_name: str, - container_name: str, - **kwargs - ): + def __init__(self, *, database_name: str, container_name: str, **kwargs): """ :keyword database_name: Required. :paramtype database_name: str :keyword container_name: Required. :paramtype container_name: str """ - super(CosmosSqlDataTransferDataSourceSink, self).__init__(**kwargs) - self.component = 'CosmosDBSql' # type: str + super().__init__(**kwargs) + self.component = "CosmosDBSql" # type: str self.database_name = database_name self.container_name = container_name @@ -3404,39 +3229,34 @@ class CreateJobRequest(ARMProxyResource): :vartype name: str :ivar type: The type of Azure resource. :vartype type: str - :ivar properties: Required. Data Transfer Create Job Properties. + :ivar properties: Data Transfer Create Job Properties. Required. :vartype properties: ~azure.mgmt.cosmosdb.models.DataTransferJobProperties """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DataTransferJobProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "DataTransferJobProperties"}, } - def __init__( - self, - *, - properties: "DataTransferJobProperties", - **kwargs - ): + def __init__(self, *, properties: "_models.DataTransferJobProperties", **kwargs): """ - :keyword properties: Required. Data Transfer Create Job Properties. + :keyword properties: Data Transfer Create Job Properties. Required. :paramtype properties: ~azure.mgmt.cosmosdb.models.DataTransferJobProperties """ - super(CreateJobRequest, self).__init__(**kwargs) + super().__init__(**kwargs) self.properties = properties -class CreateUpdateOptions(msrest.serialization.Model): +class CreateUpdateOptions(_serialization.Model): """CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput". :ivar throughput: Request Units per second. For example, "throughput": 10000. @@ -3446,15 +3266,15 @@ class CreateUpdateOptions(msrest.serialization.Model): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -3463,12 +3283,12 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(CreateUpdateOptions, self).__init__(**kwargs) + super().__init__(**kwargs) self.throughput = throughput self.autoscale_settings = autoscale_settings -class DatabaseAccountConnectionString(msrest.serialization.Model): +class DatabaseAccountConnectionString(_serialization.Model): """Connection string for the Cosmos DB account. Variables are only populated by the server, and will be ignored when sending a request. @@ -3480,27 +3300,23 @@ class DatabaseAccountConnectionString(msrest.serialization.Model): """ _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, + "connection_string": {"readonly": True}, + "description": {"readonly": True}, } _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + "connection_string": {"key": "connectionString", "type": "str"}, + "description": {"key": "description", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(DatabaseAccountConnectionString, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.connection_string = None self.description = None -class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): +class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): # pylint: disable=too-many-instance-attributes """Parameters to create and update Cosmos DB database accounts. Variables are only populated by the server, and will be ignored when sending a request. @@ -3515,24 +3331,24 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar kind: Indicates the type of database account. This can only be set at database account - creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". + creation. Known values are: "GlobalDocumentDB", "MongoDB", and "Parse". :vartype kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind :ivar consistency_policy: The consistency policy for the Cosmos DB account. :vartype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :ivar locations: Required. An array that contains the georeplication locations enabled for the - Cosmos DB account. + :ivar locations: An array that contains the georeplication locations enabled for the Cosmos DB + account. Required. :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: The offer type for the database. Has constant value: + :ivar database_account_offer_type: The offer type for the database. Required. Default value is "Standard". :vartype database_account_offer_type: str :ivar ip_rules: List of IpRules. @@ -3555,7 +3371,7 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :ivar enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :vartype enable_cassandra_connector: bool :ivar connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". + account. "Small" :vartype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :ivar disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. @@ -3566,8 +3382,8 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :vartype default_identity: str - :ivar public_network_access: Whether requests from Public Network are allowed. Possible values - include: "Enabled", "Disabled". + :ivar public_network_access: Whether requests from Public Network are allowed. Known values + are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :ivar enable_free_tier: Flag to indicate whether Free Tier is enabled. :vartype enable_free_tier: bool @@ -3578,15 +3394,15 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :ivar analytical_storage_configuration: Analytical storage specific properties. :vartype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :ivar create_mode: Enum to indicate the mode of account creation. Possible values include: - "Default", "Restore". Default value: "Default". + :ivar create_mode: Enum to indicate the mode of account creation. Known values are: "Default" + and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :ivar backup_policy: The object representing the policy for taking backups on an account. :vartype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :ivar cors: The CORS policy for the Cosmos DB database account. :vartype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :ivar network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". + :ivar network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known + values are: "None" and "AzureServices". :vartype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :ivar network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. @@ -3605,113 +3421,130 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :ivar enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :vartype enable_materialized_views: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, - 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, - 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, - 'enable_materialized_views': {'key': 'properties.enableMaterializedViews', 'type': 'bool'}, + :ivar keys_metadata: This property is ignored during the update/create operation, as the + metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB + account. + :vartype keys_metadata: ~azure.mgmt.cosmosdb.models.DatabaseAccountKeysMetadata + :ivar enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on + the account. + :vartype enable_partition_merge: bool + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "locations": {"required": True}, + "database_account_offer_type": {"required": True, "constant": True}, + "keys_metadata": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "consistency_policy": {"key": "properties.consistencyPolicy", "type": "ConsistencyPolicy"}, + "locations": {"key": "properties.locations", "type": "[Location]"}, + "database_account_offer_type": {"key": "properties.databaseAccountOfferType", "type": "str"}, + "ip_rules": {"key": "properties.ipRules", "type": "[IpAddressOrRange]"}, + "is_virtual_network_filter_enabled": {"key": "properties.isVirtualNetworkFilterEnabled", "type": "bool"}, + "enable_automatic_failover": {"key": "properties.enableAutomaticFailover", "type": "bool"}, + "capabilities": {"key": "properties.capabilities", "type": "[Capability]"}, + "virtual_network_rules": {"key": "properties.virtualNetworkRules", "type": "[VirtualNetworkRule]"}, + "enable_multiple_write_locations": {"key": "properties.enableMultipleWriteLocations", "type": "bool"}, + "enable_cassandra_connector": {"key": "properties.enableCassandraConnector", "type": "bool"}, + "connector_offer": {"key": "properties.connectorOffer", "type": "str"}, + "disable_key_based_metadata_write_access": { + "key": "properties.disableKeyBasedMetadataWriteAccess", + "type": "bool", + }, + "key_vault_key_uri": {"key": "properties.keyVaultKeyUri", "type": "str"}, + "default_identity": {"key": "properties.defaultIdentity", "type": "str"}, + "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, + "enable_free_tier": {"key": "properties.enableFreeTier", "type": "bool"}, + "api_properties": {"key": "properties.apiProperties", "type": "ApiProperties"}, + "enable_analytical_storage": {"key": "properties.enableAnalyticalStorage", "type": "bool"}, + "analytical_storage_configuration": { + "key": "properties.analyticalStorageConfiguration", + "type": "AnalyticalStorageConfiguration", + }, + "create_mode": {"key": "properties.createMode", "type": "str"}, + "backup_policy": {"key": "properties.backupPolicy", "type": "BackupPolicy"}, + "cors": {"key": "properties.cors", "type": "[CorsPolicy]"}, + "network_acl_bypass": {"key": "properties.networkAclBypass", "type": "str"}, + "network_acl_bypass_resource_ids": {"key": "properties.networkAclBypassResourceIds", "type": "[str]"}, + "diagnostic_log_settings": {"key": "properties.diagnosticLogSettings", "type": "DiagnosticLogSettings"}, + "disable_local_auth": {"key": "properties.disableLocalAuth", "type": "bool"}, + "restore_parameters": {"key": "properties.restoreParameters", "type": "RestoreParameters"}, + "capacity": {"key": "properties.capacity", "type": "Capacity"}, + "enable_materialized_views": {"key": "properties.enableMaterializedViews", "type": "bool"}, + "keys_metadata": {"key": "properties.keysMetadata", "type": "DatabaseAccountKeysMetadata"}, + "enable_partition_merge": {"key": "properties.enablePartitionMerge", "type": "bool"}, } database_account_offer_type = "Standard" - def __init__( + def __init__( # pylint: disable=too-many-locals self, *, - locations: List["Location"], + locations: List["_models.Location"], location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - kind: Optional[Union[str, "DatabaseAccountKind"]] = None, - consistency_policy: Optional["ConsistencyPolicy"] = None, - ip_rules: Optional[List["IpAddressOrRange"]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + kind: Optional[Union[str, "_models.DatabaseAccountKind"]] = None, + consistency_policy: Optional["_models.ConsistencyPolicy"] = None, + ip_rules: Optional[List["_models.IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, enable_automatic_failover: Optional[bool] = None, - capabilities: Optional[List["Capability"]] = None, - virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, + capabilities: Optional[List["_models.Capability"]] = None, + virtual_network_rules: Optional[List["_models.VirtualNetworkRule"]] = None, enable_multiple_write_locations: Optional[bool] = None, enable_cassandra_connector: Optional[bool] = None, - connector_offer: Optional[Union[str, "ConnectorOffer"]] = None, + connector_offer: Optional[Union[str, "_models.ConnectorOffer"]] = None, disable_key_based_metadata_write_access: Optional[bool] = None, key_vault_key_uri: Optional[str] = None, default_identity: Optional[str] = None, - public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, enable_free_tier: Optional[bool] = None, - api_properties: Optional["ApiProperties"] = None, + api_properties: Optional["_models.ApiProperties"] = None, enable_analytical_storage: Optional[bool] = None, - analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, - create_mode: Optional[Union[str, "CreateMode"]] = "Default", - backup_policy: Optional["BackupPolicy"] = None, - cors: Optional[List["CorsPolicy"]] = None, - network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, + analytical_storage_configuration: Optional["_models.AnalyticalStorageConfiguration"] = None, + create_mode: Union[str, "_models.CreateMode"] = "Default", + backup_policy: Optional["_models.BackupPolicy"] = None, + cors: Optional[List["_models.CorsPolicy"]] = None, + network_acl_bypass: Optional[Union[str, "_models.NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, - diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, + diagnostic_log_settings: Optional["_models.DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, - restore_parameters: Optional["RestoreParameters"] = None, - capacity: Optional["Capacity"] = None, + restore_parameters: Optional["_models.RestoreParameters"] = None, + capacity: Optional["_models.Capacity"] = None, enable_materialized_views: Optional[bool] = None, + enable_partition_merge: Optional[bool] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword kind: Indicates the type of database account. This can only be set at database account - creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". + creation. Known values are: "GlobalDocumentDB", "MongoDB", and "Parse". :paramtype kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind :keyword consistency_policy: The consistency policy for the Cosmos DB account. :paramtype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :keyword locations: Required. An array that contains the georeplication locations enabled for - the Cosmos DB account. + :keyword locations: An array that contains the georeplication locations enabled for the Cosmos + DB account. Required. :paramtype locations: list[~azure.mgmt.cosmosdb.models.Location] :keyword ip_rules: List of IpRules. :paramtype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] @@ -3734,7 +3567,7 @@ def __init__( account. :paramtype enable_cassandra_connector: bool :keyword connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". + account. "Small" :paramtype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :keyword disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. @@ -3745,8 +3578,8 @@ def __init__( customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :paramtype default_identity: str - :keyword public_network_access: Whether requests from Public Network are allowed. Possible - values include: "Enabled", "Disabled". + :keyword public_network_access: Whether requests from Public Network are allowed. Known values + are: "Enabled" and "Disabled". :paramtype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :keyword enable_free_tier: Flag to indicate whether Free Tier is enabled. :paramtype enable_free_tier: bool @@ -3757,15 +3590,15 @@ def __init__( :keyword analytical_storage_configuration: Analytical storage specific properties. :paramtype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :keyword create_mode: Enum to indicate the mode of account creation. Possible values include: - "Default", "Restore". Default value: "Default". + :keyword create_mode: Enum to indicate the mode of account creation. Known values are: + "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :keyword backup_policy: The object representing the policy for taking backups on an account. :paramtype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :keyword cors: The CORS policy for the Cosmos DB database account. :paramtype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :keyword network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". + Known values are: "None" and "AzureServices". :paramtype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :keyword network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. @@ -3784,8 +3617,11 @@ def __init__( :keyword enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :paramtype enable_materialized_views: bool + :keyword enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature + on the account. + :paramtype enable_partition_merge: bool """ - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.kind = kind self.consistency_policy = consistency_policy self.locations = locations @@ -3815,9 +3651,11 @@ def __init__( self.restore_parameters = restore_parameters self.capacity = capacity self.enable_materialized_views = enable_materialized_views + self.keys_metadata = None + self.enable_partition_merge = enable_partition_merge -class DatabaseAccountGetResults(ARMResourceProperties): +class DatabaseAccountGetResults(ARMResourceProperties): # pylint: disable=too-many-instance-attributes """An Azure Cosmos DB database account. Variables are only populated by the server, and will be ignored when sending a request. @@ -3830,17 +3668,17 @@ class DatabaseAccountGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar kind: Indicates the type of database account. This can only be set at database account - creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". + creation. Known values are: "GlobalDocumentDB", "MongoDB", and "Parse". :vartype kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData @@ -3855,8 +3693,7 @@ class DatabaseAccountGetResults(ARMResourceProperties): :ivar document_endpoint: The connection endpoint for the Cosmos DB database account. :vartype document_endpoint: str :ivar database_account_offer_type: The offer type for the Cosmos DB database account. Default - value: Standard. The only acceptable values to pass in are None and "Standard". The default - value is None. + value: Standard. Default value is "Standard". :vartype database_account_offer_type: str :ivar ip_rules: List of IpRules. :vartype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] @@ -3894,7 +3731,7 @@ class DatabaseAccountGetResults(ARMResourceProperties): :ivar enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :vartype enable_cassandra_connector: bool :ivar connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". + account. "Small" :vartype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :ivar disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. @@ -3905,8 +3742,8 @@ class DatabaseAccountGetResults(ARMResourceProperties): customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :vartype default_identity: str - :ivar public_network_access: Whether requests from Public Network are allowed. Possible values - include: "Enabled", "Disabled". + :ivar public_network_access: Whether requests from Public Network are allowed. Known values + are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :ivar enable_free_tier: Flag to indicate whether Free Tier is enabled. :vartype enable_free_tier: bool @@ -3919,8 +3756,8 @@ class DatabaseAccountGetResults(ARMResourceProperties): ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :ivar instance_id: A unique identifier assigned to the database account. :vartype instance_id: str - :ivar create_mode: Enum to indicate the mode of account creation. Possible values include: - "Default", "Restore". Default value: "Default". + :ivar create_mode: Enum to indicate the mode of account creation. Known values are: "Default" + and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters @@ -3928,8 +3765,8 @@ class DatabaseAccountGetResults(ARMResourceProperties): :vartype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :ivar cors: The CORS policy for the Cosmos DB database account. :vartype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :ivar network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". + :ivar network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known + values are: "None" and "AzureServices". :vartype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :ivar network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. @@ -3946,121 +3783,140 @@ class DatabaseAccountGetResults(ARMResourceProperties): :ivar enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :vartype enable_materialized_views: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, - 'instance_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, - 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, - 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, - 'enable_materialized_views': {'key': 'properties.enableMaterializedViews', 'type': 'bool'}, - } - - def __init__( + :ivar keys_metadata: The object that represents the metadata for the Account Keys of the Cosmos + DB account. + :vartype keys_metadata: ~azure.mgmt.cosmosdb.models.DatabaseAccountKeysMetadata + :ivar enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on + the account. + :vartype enable_partition_merge: bool + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "document_endpoint": {"readonly": True}, + "database_account_offer_type": {"readonly": True}, + "write_locations": {"readonly": True}, + "read_locations": {"readonly": True}, + "locations": {"readonly": True}, + "failover_policies": {"readonly": True}, + "private_endpoint_connections": {"readonly": True}, + "instance_id": {"readonly": True}, + "keys_metadata": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "document_endpoint": {"key": "properties.documentEndpoint", "type": "str"}, + "database_account_offer_type": {"key": "properties.databaseAccountOfferType", "type": "str"}, + "ip_rules": {"key": "properties.ipRules", "type": "[IpAddressOrRange]"}, + "is_virtual_network_filter_enabled": {"key": "properties.isVirtualNetworkFilterEnabled", "type": "bool"}, + "enable_automatic_failover": {"key": "properties.enableAutomaticFailover", "type": "bool"}, + "consistency_policy": {"key": "properties.consistencyPolicy", "type": "ConsistencyPolicy"}, + "capabilities": {"key": "properties.capabilities", "type": "[Capability]"}, + "write_locations": {"key": "properties.writeLocations", "type": "[Location]"}, + "read_locations": {"key": "properties.readLocations", "type": "[Location]"}, + "locations": {"key": "properties.locations", "type": "[Location]"}, + "failover_policies": {"key": "properties.failoverPolicies", "type": "[FailoverPolicy]"}, + "virtual_network_rules": {"key": "properties.virtualNetworkRules", "type": "[VirtualNetworkRule]"}, + "private_endpoint_connections": { + "key": "properties.privateEndpointConnections", + "type": "[PrivateEndpointConnection]", + }, + "enable_multiple_write_locations": {"key": "properties.enableMultipleWriteLocations", "type": "bool"}, + "enable_cassandra_connector": {"key": "properties.enableCassandraConnector", "type": "bool"}, + "connector_offer": {"key": "properties.connectorOffer", "type": "str"}, + "disable_key_based_metadata_write_access": { + "key": "properties.disableKeyBasedMetadataWriteAccess", + "type": "bool", + }, + "key_vault_key_uri": {"key": "properties.keyVaultKeyUri", "type": "str"}, + "default_identity": {"key": "properties.defaultIdentity", "type": "str"}, + "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, + "enable_free_tier": {"key": "properties.enableFreeTier", "type": "bool"}, + "api_properties": {"key": "properties.apiProperties", "type": "ApiProperties"}, + "enable_analytical_storage": {"key": "properties.enableAnalyticalStorage", "type": "bool"}, + "analytical_storage_configuration": { + "key": "properties.analyticalStorageConfiguration", + "type": "AnalyticalStorageConfiguration", + }, + "instance_id": {"key": "properties.instanceId", "type": "str"}, + "create_mode": {"key": "properties.createMode", "type": "str"}, + "restore_parameters": {"key": "properties.restoreParameters", "type": "RestoreParameters"}, + "backup_policy": {"key": "properties.backupPolicy", "type": "BackupPolicy"}, + "cors": {"key": "properties.cors", "type": "[CorsPolicy]"}, + "network_acl_bypass": {"key": "properties.networkAclBypass", "type": "str"}, + "network_acl_bypass_resource_ids": {"key": "properties.networkAclBypassResourceIds", "type": "[str]"}, + "diagnostic_log_settings": {"key": "properties.diagnosticLogSettings", "type": "DiagnosticLogSettings"}, + "disable_local_auth": {"key": "properties.disableLocalAuth", "type": "bool"}, + "capacity": {"key": "properties.capacity", "type": "Capacity"}, + "enable_materialized_views": {"key": "properties.enableMaterializedViews", "type": "bool"}, + "keys_metadata": {"key": "properties.keysMetadata", "type": "DatabaseAccountKeysMetadata"}, + "enable_partition_merge": {"key": "properties.enablePartitionMerge", "type": "bool"}, + } + + def __init__( # pylint: disable=too-many-locals self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - kind: Optional[Union[str, "DatabaseAccountKind"]] = None, - ip_rules: Optional[List["IpAddressOrRange"]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + kind: Optional[Union[str, "_models.DatabaseAccountKind"]] = None, + ip_rules: Optional[List["_models.IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, enable_automatic_failover: Optional[bool] = None, - consistency_policy: Optional["ConsistencyPolicy"] = None, - capabilities: Optional[List["Capability"]] = None, - virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, + consistency_policy: Optional["_models.ConsistencyPolicy"] = None, + capabilities: Optional[List["_models.Capability"]] = None, + virtual_network_rules: Optional[List["_models.VirtualNetworkRule"]] = None, enable_multiple_write_locations: Optional[bool] = None, enable_cassandra_connector: Optional[bool] = None, - connector_offer: Optional[Union[str, "ConnectorOffer"]] = None, + connector_offer: Optional[Union[str, "_models.ConnectorOffer"]] = None, disable_key_based_metadata_write_access: Optional[bool] = None, key_vault_key_uri: Optional[str] = None, default_identity: Optional[str] = None, - public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, enable_free_tier: Optional[bool] = None, - api_properties: Optional["ApiProperties"] = None, + api_properties: Optional["_models.ApiProperties"] = None, enable_analytical_storage: Optional[bool] = None, - analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, - create_mode: Optional[Union[str, "CreateMode"]] = "Default", - restore_parameters: Optional["RestoreParameters"] = None, - backup_policy: Optional["BackupPolicy"] = None, - cors: Optional[List["CorsPolicy"]] = None, - network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, + analytical_storage_configuration: Optional["_models.AnalyticalStorageConfiguration"] = None, + create_mode: Union[str, "_models.CreateMode"] = "Default", + restore_parameters: Optional["_models.RestoreParameters"] = None, + backup_policy: Optional["_models.BackupPolicy"] = None, + cors: Optional[List["_models.CorsPolicy"]] = None, + network_acl_bypass: Optional[Union[str, "_models.NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, - diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, + diagnostic_log_settings: Optional["_models.DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, - capacity: Optional["Capacity"] = None, + capacity: Optional["_models.Capacity"] = None, enable_materialized_views: Optional[bool] = None, + enable_partition_merge: Optional[bool] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword kind: Indicates the type of database account. This can only be set at database account - creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". + creation. Known values are: "GlobalDocumentDB", "MongoDB", and "Parse". :paramtype kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind :keyword ip_rules: List of IpRules. :paramtype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] @@ -4085,7 +3941,7 @@ def __init__( account. :paramtype enable_cassandra_connector: bool :keyword connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". + account. "Small" :paramtype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :keyword disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. @@ -4096,8 +3952,8 @@ def __init__( customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :paramtype default_identity: str - :keyword public_network_access: Whether requests from Public Network are allowed. Possible - values include: "Enabled", "Disabled". + :keyword public_network_access: Whether requests from Public Network are allowed. Known values + are: "Enabled" and "Disabled". :paramtype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :keyword enable_free_tier: Flag to indicate whether Free Tier is enabled. :paramtype enable_free_tier: bool @@ -4108,8 +3964,8 @@ def __init__( :keyword analytical_storage_configuration: Analytical storage specific properties. :paramtype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :keyword create_mode: Enum to indicate the mode of account creation. Possible values include: - "Default", "Restore". Default value: "Default". + :keyword create_mode: Enum to indicate the mode of account creation. Known values are: + "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters @@ -4118,7 +3974,7 @@ def __init__( :keyword cors: The CORS policy for the Cosmos DB database account. :paramtype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :keyword network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". + Known values are: "None" and "AzureServices". :paramtype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :keyword network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. @@ -4135,8 +3991,11 @@ def __init__( :keyword enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :paramtype enable_materialized_views: bool + :keyword enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature + on the account. + :paramtype enable_partition_merge: bool """ - super(DatabaseAccountGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.kind = kind self.system_data = None self.provisioning_state = None @@ -4175,9 +4034,53 @@ def __init__( self.disable_local_auth = disable_local_auth self.capacity = capacity self.enable_materialized_views = enable_materialized_views + self.keys_metadata = None + self.enable_partition_merge = enable_partition_merge + + +class DatabaseAccountKeysMetadata(_serialization.Model): + """The metadata related to each access key for the given Cosmos DB database account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar primary_master_key: The metadata related to the Primary Read-Write Key for the given + Cosmos DB database account. + :vartype primary_master_key: ~azure.mgmt.cosmosdb.models.AccountKeyMetadata + :ivar secondary_master_key: The metadata related to the Secondary Read-Write Key for the given + Cosmos DB database account. + :vartype secondary_master_key: ~azure.mgmt.cosmosdb.models.AccountKeyMetadata + :ivar primary_readonly_master_key: The metadata related to the Primary Read-Only Key for the + given Cosmos DB database account. + :vartype primary_readonly_master_key: ~azure.mgmt.cosmosdb.models.AccountKeyMetadata + :ivar secondary_readonly_master_key: The metadata related to the Secondary Read-Only Key for + the given Cosmos DB database account. + :vartype secondary_readonly_master_key: ~azure.mgmt.cosmosdb.models.AccountKeyMetadata + """ + + _validation = { + "primary_master_key": {"readonly": True}, + "secondary_master_key": {"readonly": True}, + "primary_readonly_master_key": {"readonly": True}, + "secondary_readonly_master_key": {"readonly": True}, + } + + _attribute_map = { + "primary_master_key": {"key": "primaryMasterKey", "type": "AccountKeyMetadata"}, + "secondary_master_key": {"key": "secondaryMasterKey", "type": "AccountKeyMetadata"}, + "primary_readonly_master_key": {"key": "primaryReadonlyMasterKey", "type": "AccountKeyMetadata"}, + "secondary_readonly_master_key": {"key": "secondaryReadonlyMasterKey", "type": "AccountKeyMetadata"}, + } + + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None -class DatabaseAccountListConnectionStringsResult(msrest.serialization.Model): +class DatabaseAccountListConnectionStringsResult(_serialization.Model): """The connection strings for the given database account. :ivar connection_strings: An array that contains the connection strings for the Cosmos DB @@ -4186,14 +4089,11 @@ class DatabaseAccountListConnectionStringsResult(msrest.serialization.Model): """ _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + "connection_strings": {"key": "connectionStrings", "type": "[DatabaseAccountConnectionString]"}, } def __init__( - self, - *, - connection_strings: Optional[List["DatabaseAccountConnectionString"]] = None, - **kwargs + self, *, connection_strings: Optional[List["_models.DatabaseAccountConnectionString"]] = None, **kwargs ): """ :keyword connection_strings: An array that contains the connection strings for the Cosmos DB @@ -4201,11 +4101,11 @@ def __init__( :paramtype connection_strings: list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] """ - super(DatabaseAccountListConnectionStringsResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.connection_strings = connection_strings -class DatabaseAccountListReadOnlyKeysResult(msrest.serialization.Model): +class DatabaseAccountListReadOnlyKeysResult(_serialization.Model): """The read-only access keys for the given database account. Variables are only populated by the server, and will be ignored when sending a request. @@ -4217,22 +4117,18 @@ class DatabaseAccountListReadOnlyKeysResult(msrest.serialization.Model): """ _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, + "primary_readonly_master_key": {"readonly": True}, + "secondary_readonly_master_key": {"readonly": True}, } _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + "primary_readonly_master_key": {"key": "primaryReadonlyMasterKey", "type": "str"}, + "secondary_readonly_master_key": {"key": "secondaryReadonlyMasterKey", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(DatabaseAccountListReadOnlyKeysResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.primary_readonly_master_key = None self.secondary_readonly_master_key = None @@ -4253,64 +4149,55 @@ class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult): """ _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, + "primary_readonly_master_key": {"readonly": True}, + "secondary_readonly_master_key": {"readonly": True}, + "primary_master_key": {"readonly": True}, + "secondary_master_key": {"readonly": True}, } _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + "primary_readonly_master_key": {"key": "primaryReadonlyMasterKey", "type": "str"}, + "secondary_readonly_master_key": {"key": "secondaryReadonlyMasterKey", "type": "str"}, + "primary_master_key": {"key": "primaryMasterKey", "type": "str"}, + "secondary_master_key": {"key": "secondaryMasterKey", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(DatabaseAccountListKeysResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.primary_master_key = None self.secondary_master_key = None -class DatabaseAccountRegenerateKeyParameters(msrest.serialization.Model): +class DatabaseAccountRegenerateKeyParameters(_serialization.Model): """Parameters to regenerate the keys within the database account. All required parameters must be populated in order to send to Azure. - :ivar key_kind: Required. The access key to regenerate. Possible values include: "primary", - "secondary", "primaryReadonly", "secondaryReadonly". + :ivar key_kind: The access key to regenerate. Required. Known values are: "primary", + "secondary", "primaryReadonly", and "secondaryReadonly". :vartype key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind """ _validation = { - 'key_kind': {'required': True}, + "key_kind": {"required": True}, } _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, + "key_kind": {"key": "keyKind", "type": "str"}, } - def __init__( - self, - *, - key_kind: Union[str, "KeyKind"], - **kwargs - ): + def __init__(self, *, key_kind: Union[str, "_models.KeyKind"], **kwargs): """ - :keyword key_kind: Required. The access key to regenerate. Possible values include: "primary", - "secondary", "primaryReadonly", "secondaryReadonly". + :keyword key_kind: The access key to regenerate. Required. Known values are: "primary", + "secondary", "primaryReadonly", and "secondaryReadonly". :paramtype key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind """ - super(DatabaseAccountRegenerateKeyParameters, self).__init__(**kwargs) + super().__init__(**kwargs) self.key_kind = key_kind -class DatabaseAccountsListResult(msrest.serialization.Model): +class DatabaseAccountsListResult(_serialization.Model): """The List operation response, that contains the database accounts and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -4320,32 +4207,30 @@ class DatabaseAccountsListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[DatabaseAccountGetResults]'}, + "value": {"key": "value", "type": "[DatabaseAccountGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(DatabaseAccountsListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class DatabaseAccountUpdateParameters(msrest.serialization.Model): +class DatabaseAccountUpdateParameters(_serialization.Model): # pylint: disable=too-many-instance-attributes """Parameters for patching Azure Cosmos DB database account properties. - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar location: The location of the resource group to which the resource belongs. :vartype location: str @@ -4376,7 +4261,7 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): :ivar enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :vartype enable_cassandra_connector: bool :ivar connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". + account. "Small" :vartype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :ivar disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. @@ -4387,8 +4272,8 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :vartype default_identity: str - :ivar public_network_access: Whether requests from Public Network are allowed. Possible values - include: "Enabled", "Disabled". + :ivar public_network_access: Whether requests from Public Network are allowed. Known values + are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :ivar enable_free_tier: Flag to indicate whether Free Tier is enabled. :vartype enable_free_tier: bool @@ -4403,8 +4288,8 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): :vartype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :ivar cors: The CORS policy for the Cosmos DB database account. :vartype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :ivar network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". + :ivar network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known + values are: "None" and "AzureServices". :vartype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :ivar network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. @@ -4421,81 +4306,100 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): :ivar enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :vartype enable_materialized_views: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, - 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, - 'enable_materialized_views': {'key': 'properties.enableMaterializedViews', 'type': 'bool'}, - } - - def __init__( + :ivar keys_metadata: This property is ignored during the update operation, as the metadata is + read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. + :vartype keys_metadata: ~azure.mgmt.cosmosdb.models.DatabaseAccountKeysMetadata + :ivar enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on + the account. + :vartype enable_partition_merge: bool + """ + + _validation = { + "keys_metadata": {"readonly": True}, + } + + _attribute_map = { + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "consistency_policy": {"key": "properties.consistencyPolicy", "type": "ConsistencyPolicy"}, + "locations": {"key": "properties.locations", "type": "[Location]"}, + "ip_rules": {"key": "properties.ipRules", "type": "[IpAddressOrRange]"}, + "is_virtual_network_filter_enabled": {"key": "properties.isVirtualNetworkFilterEnabled", "type": "bool"}, + "enable_automatic_failover": {"key": "properties.enableAutomaticFailover", "type": "bool"}, + "capabilities": {"key": "properties.capabilities", "type": "[Capability]"}, + "virtual_network_rules": {"key": "properties.virtualNetworkRules", "type": "[VirtualNetworkRule]"}, + "enable_multiple_write_locations": {"key": "properties.enableMultipleWriteLocations", "type": "bool"}, + "enable_cassandra_connector": {"key": "properties.enableCassandraConnector", "type": "bool"}, + "connector_offer": {"key": "properties.connectorOffer", "type": "str"}, + "disable_key_based_metadata_write_access": { + "key": "properties.disableKeyBasedMetadataWriteAccess", + "type": "bool", + }, + "key_vault_key_uri": {"key": "properties.keyVaultKeyUri", "type": "str"}, + "default_identity": {"key": "properties.defaultIdentity", "type": "str"}, + "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, + "enable_free_tier": {"key": "properties.enableFreeTier", "type": "bool"}, + "api_properties": {"key": "properties.apiProperties", "type": "ApiProperties"}, + "enable_analytical_storage": {"key": "properties.enableAnalyticalStorage", "type": "bool"}, + "analytical_storage_configuration": { + "key": "properties.analyticalStorageConfiguration", + "type": "AnalyticalStorageConfiguration", + }, + "backup_policy": {"key": "properties.backupPolicy", "type": "BackupPolicy"}, + "cors": {"key": "properties.cors", "type": "[CorsPolicy]"}, + "network_acl_bypass": {"key": "properties.networkAclBypass", "type": "str"}, + "network_acl_bypass_resource_ids": {"key": "properties.networkAclBypassResourceIds", "type": "[str]"}, + "diagnostic_log_settings": {"key": "properties.diagnosticLogSettings", "type": "DiagnosticLogSettings"}, + "disable_local_auth": {"key": "properties.disableLocalAuth", "type": "bool"}, + "capacity": {"key": "properties.capacity", "type": "Capacity"}, + "enable_materialized_views": {"key": "properties.enableMaterializedViews", "type": "bool"}, + "keys_metadata": {"key": "properties.keysMetadata", "type": "DatabaseAccountKeysMetadata"}, + "enable_partition_merge": {"key": "properties.enablePartitionMerge", "type": "bool"}, + } + + def __init__( # pylint: disable=too-many-locals self, *, tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, - identity: Optional["ManagedServiceIdentity"] = None, - consistency_policy: Optional["ConsistencyPolicy"] = None, - locations: Optional[List["Location"]] = None, - ip_rules: Optional[List["IpAddressOrRange"]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + consistency_policy: Optional["_models.ConsistencyPolicy"] = None, + locations: Optional[List["_models.Location"]] = None, + ip_rules: Optional[List["_models.IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, enable_automatic_failover: Optional[bool] = None, - capabilities: Optional[List["Capability"]] = None, - virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, + capabilities: Optional[List["_models.Capability"]] = None, + virtual_network_rules: Optional[List["_models.VirtualNetworkRule"]] = None, enable_multiple_write_locations: Optional[bool] = None, enable_cassandra_connector: Optional[bool] = None, - connector_offer: Optional[Union[str, "ConnectorOffer"]] = None, + connector_offer: Optional[Union[str, "_models.ConnectorOffer"]] = None, disable_key_based_metadata_write_access: Optional[bool] = None, key_vault_key_uri: Optional[str] = None, default_identity: Optional[str] = None, - public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, enable_free_tier: Optional[bool] = None, - api_properties: Optional["ApiProperties"] = None, + api_properties: Optional["_models.ApiProperties"] = None, enable_analytical_storage: Optional[bool] = None, - analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, - backup_policy: Optional["BackupPolicy"] = None, - cors: Optional[List["CorsPolicy"]] = None, - network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, + analytical_storage_configuration: Optional["_models.AnalyticalStorageConfiguration"] = None, + backup_policy: Optional["_models.BackupPolicy"] = None, + cors: Optional[List["_models.CorsPolicy"]] = None, + network_acl_bypass: Optional[Union[str, "_models.NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, - diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, + diagnostic_log_settings: Optional["_models.DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, - capacity: Optional["Capacity"] = None, + capacity: Optional["_models.Capacity"] = None, enable_materialized_views: Optional[bool] = None, + enable_partition_merge: Optional[bool] = None, **kwargs ): """ - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str @@ -4527,7 +4431,7 @@ def __init__( account. :paramtype enable_cassandra_connector: bool :keyword connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". + account. "Small" :paramtype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :keyword disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. @@ -4538,8 +4442,8 @@ def __init__( customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :paramtype default_identity: str - :keyword public_network_access: Whether requests from Public Network are allowed. Possible - values include: "Enabled", "Disabled". + :keyword public_network_access: Whether requests from Public Network are allowed. Known values + are: "Enabled" and "Disabled". :paramtype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :keyword enable_free_tier: Flag to indicate whether Free Tier is enabled. :paramtype enable_free_tier: bool @@ -4555,7 +4459,7 @@ def __init__( :keyword cors: The CORS policy for the Cosmos DB database account. :paramtype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :keyword network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". + Known values are: "None" and "AzureServices". :paramtype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :keyword network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. @@ -4572,8 +4476,11 @@ def __init__( :keyword enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :paramtype enable_materialized_views: bool + :keyword enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature + on the account. + :paramtype enable_partition_merge: bool """ - super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) + super().__init__(**kwargs) self.tags = tags self.location = location self.identity = identity @@ -4603,9 +4510,11 @@ def __init__( self.disable_local_auth = disable_local_auth self.capacity = capacity self.enable_materialized_views = enable_materialized_views + self.keys_metadata = None + self.enable_partition_merge = enable_partition_merge -class DatabaseRestoreResource(msrest.serialization.Model): +class DatabaseRestoreResource(_serialization.Model): """Specific Databases to restore. :ivar database_name: The name of the database available for restore. @@ -4615,24 +4524,18 @@ class DatabaseRestoreResource(msrest.serialization.Model): """ _attribute_map = { - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'collection_names': {'key': 'collectionNames', 'type': '[str]'}, + "database_name": {"key": "databaseName", "type": "str"}, + "collection_names": {"key": "collectionNames", "type": "[str]"}, } - def __init__( - self, - *, - database_name: Optional[str] = None, - collection_names: Optional[List[str]] = None, - **kwargs - ): + def __init__(self, *, database_name: Optional[str] = None, collection_names: Optional[List[str]] = None, **kwargs): """ :keyword database_name: The name of the database available for restore. :paramtype database_name: str :keyword collection_names: The names of the collections available for restore. :paramtype collection_names: list[str] """ - super(DatabaseRestoreResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.database_name = database_name self.collection_names = collection_names @@ -4653,39 +4556,34 @@ class DataCenterResource(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DataCenterResourceProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "DataCenterResourceProperties"}, } - def __init__( - self, - *, - properties: Optional["DataCenterResourceProperties"] = None, - **kwargs - ): + def __init__(self, *, properties: Optional["_models.DataCenterResourceProperties"] = None, **kwargs): """ :keyword properties: Properties of a managed Cassandra data center. :paramtype properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties """ - super(DataCenterResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.properties = properties -class DataCenterResourceProperties(msrest.serialization.Model): +class DataCenterResourceProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes """Properties of a managed Cassandra data center. Variables are only populated by the server, and will be ignored when sending a request. :ivar provisioning_state: The status of the resource at the time the operation was called. - Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". :vartype provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState :ivar data_center_location: The region this data center should be created in. @@ -4733,29 +4631,32 @@ class DataCenterResourceProperties(msrest.serialization.Model): """ _validation = { - 'seed_nodes': {'readonly': True}, + "seed_nodes": {"readonly": True}, } _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'data_center_location': {'key': 'dataCenterLocation', 'type': 'str'}, - 'delegated_subnet_id': {'key': 'delegatedSubnetId', 'type': 'str'}, - 'node_count': {'key': 'nodeCount', 'type': 'int'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, - 'base64_encoded_cassandra_yaml_fragment': {'key': 'base64EncodedCassandraYamlFragment', 'type': 'str'}, - 'managed_disk_customer_key_uri': {'key': 'managedDiskCustomerKeyUri', 'type': 'str'}, - 'backup_storage_customer_key_uri': {'key': 'backupStorageCustomerKeyUri', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'disk_sku': {'key': 'diskSku', 'type': 'str'}, - 'disk_capacity': {'key': 'diskCapacity', 'type': 'int'}, - 'availability_zone': {'key': 'availabilityZone', 'type': 'bool'}, - 'authentication_method_ldap_properties': {'key': 'authenticationMethodLdapProperties', 'type': 'AuthenticationMethodLdapProperties'}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "data_center_location": {"key": "dataCenterLocation", "type": "str"}, + "delegated_subnet_id": {"key": "delegatedSubnetId", "type": "str"}, + "node_count": {"key": "nodeCount", "type": "int"}, + "seed_nodes": {"key": "seedNodes", "type": "[SeedNode]"}, + "base64_encoded_cassandra_yaml_fragment": {"key": "base64EncodedCassandraYamlFragment", "type": "str"}, + "managed_disk_customer_key_uri": {"key": "managedDiskCustomerKeyUri", "type": "str"}, + "backup_storage_customer_key_uri": {"key": "backupStorageCustomerKeyUri", "type": "str"}, + "sku": {"key": "sku", "type": "str"}, + "disk_sku": {"key": "diskSku", "type": "str"}, + "disk_capacity": {"key": "diskCapacity", "type": "int"}, + "availability_zone": {"key": "availabilityZone", "type": "bool"}, + "authentication_method_ldap_properties": { + "key": "authenticationMethodLdapProperties", + "type": "AuthenticationMethodLdapProperties", + }, } def __init__( self, *, - provisioning_state: Optional[Union[str, "ManagedCassandraProvisioningState"]] = None, + provisioning_state: Optional[Union[str, "_models.ManagedCassandraProvisioningState"]] = None, data_center_location: Optional[str] = None, delegated_subnet_id: Optional[str] = None, node_count: Optional[int] = None, @@ -4766,12 +4667,12 @@ def __init__( disk_sku: Optional[str] = None, disk_capacity: Optional[int] = None, availability_zone: Optional[bool] = None, - authentication_method_ldap_properties: Optional["AuthenticationMethodLdapProperties"] = None, + authentication_method_ldap_properties: Optional["_models.AuthenticationMethodLdapProperties"] = None, **kwargs ): """ :keyword provisioning_state: The status of the resource at the time the operation was called. - Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". :paramtype provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState :keyword data_center_location: The region this data center should be created in. @@ -4813,7 +4714,7 @@ def __init__( :paramtype authentication_method_ldap_properties: ~azure.mgmt.cosmosdb.models.AuthenticationMethodLdapProperties """ - super(DataCenterResourceProperties, self).__init__(**kwargs) + super().__init__(**kwargs) self.provisioning_state = provisioning_state self.data_center_location = data_center_location self.delegated_subnet_id = delegated_subnet_id @@ -4829,7 +4730,7 @@ def __init__( self.authentication_method_ldap_properties = authentication_method_ldap_properties -class DataTransferJobFeedResults(msrest.serialization.Model): +class DataTransferJobFeedResults(_serialization.Model): """The List operation response, that contains the Data Transfer jobs and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -4841,27 +4742,23 @@ class DataTransferJobFeedResults(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, + "value": {"readonly": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[DataTransferJobGetResults]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[DataTransferJobGetResults]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(DataTransferJobFeedResults, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None self.next_link = None -class DataTransferJobGetResults(ARMProxyResource): +class DataTransferJobGetResults(ARMProxyResource): # pylint: disable=too-many-instance-attributes """A Cosmos DB Data Transfer Job. Variables are only populated by the server, and will be ignored when sending a request. @@ -4881,9 +4778,9 @@ class DataTransferJobGetResults(ARMProxyResource): :ivar status: Job Status. :vartype status: str :ivar processed_count: Processed Count. - :vartype processed_count: long + :vartype processed_count: int :ivar total_count: Total Count. - :vartype total_count: long + :vartype total_count: int :ivar last_updated_utc_time: Last Updated Time (ISO-8601 format). :vartype last_updated_utc_time: ~datetime.datetime :ivar worker_count: Worker count. @@ -4893,38 +4790,38 @@ class DataTransferJobGetResults(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_name': {'readonly': True}, - 'status': {'readonly': True}, - 'processed_count': {'readonly': True}, - 'total_count': {'readonly': True}, - 'last_updated_utc_time': {'readonly': True}, - 'worker_count': {'minimum': 0}, - 'error': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "job_name": {"readonly": True}, + "status": {"readonly": True}, + "processed_count": {"readonly": True}, + "total_count": {"readonly": True}, + "last_updated_utc_time": {"readonly": True}, + "worker_count": {"minimum": 0}, + "error": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_name': {'key': 'properties.jobName', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'DataTransferDataSourceSink'}, - 'destination': {'key': 'properties.destination', 'type': 'DataTransferDataSourceSink'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'processed_count': {'key': 'properties.processedCount', 'type': 'long'}, - 'total_count': {'key': 'properties.totalCount', 'type': 'long'}, - 'last_updated_utc_time': {'key': 'properties.lastUpdatedUtcTime', 'type': 'iso-8601'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'error': {'key': 'properties.error', 'type': 'ErrorResponse'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "job_name": {"key": "properties.jobName", "type": "str"}, + "source": {"key": "properties.source", "type": "DataTransferDataSourceSink"}, + "destination": {"key": "properties.destination", "type": "DataTransferDataSourceSink"}, + "status": {"key": "properties.status", "type": "str"}, + "processed_count": {"key": "properties.processedCount", "type": "int"}, + "total_count": {"key": "properties.totalCount", "type": "int"}, + "last_updated_utc_time": {"key": "properties.lastUpdatedUtcTime", "type": "iso-8601"}, + "worker_count": {"key": "properties.workerCount", "type": "int"}, + "error": {"key": "properties.error", "type": "ErrorResponse"}, } def __init__( self, *, - source: Optional["DataTransferDataSourceSink"] = None, - destination: Optional["DataTransferDataSourceSink"] = None, + source: Optional["_models.DataTransferDataSourceSink"] = None, + destination: Optional["_models.DataTransferDataSourceSink"] = None, worker_count: Optional[int] = None, **kwargs ): @@ -4936,7 +4833,7 @@ def __init__( :keyword worker_count: Worker count. :paramtype worker_count: int """ - super(DataTransferJobGetResults, self).__init__(**kwargs) + super().__init__(**kwargs) self.job_name = None self.source = source self.destination = destination @@ -4948,7 +4845,7 @@ def __init__( self.error = None -class DataTransferJobProperties(msrest.serialization.Model): +class DataTransferJobProperties(_serialization.Model): """The properties of a DataTransfer Job. Variables are only populated by the server, and will be ignored when sending a request. @@ -4957,16 +4854,16 @@ class DataTransferJobProperties(msrest.serialization.Model): :ivar job_name: Job Name. :vartype job_name: str - :ivar source: Required. Source DataStore details. + :ivar source: Source DataStore details. Required. :vartype source: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink - :ivar destination: Required. Destination DataStore details. + :ivar destination: Destination DataStore details. Required. :vartype destination: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :ivar status: Job Status. :vartype status: str :ivar processed_count: Processed Count. - :vartype processed_count: long + :vartype processed_count: int :ivar total_count: Total Count. - :vartype total_count: long + :vartype total_count: int :ivar last_updated_utc_time: Last Updated Time (ISO-8601 format). :vartype last_updated_utc_time: ~datetime.datetime :ivar worker_count: Worker count. @@ -4976,46 +4873,46 @@ class DataTransferJobProperties(msrest.serialization.Model): """ _validation = { - 'job_name': {'readonly': True}, - 'source': {'required': True}, - 'destination': {'required': True}, - 'status': {'readonly': True}, - 'processed_count': {'readonly': True}, - 'total_count': {'readonly': True}, - 'last_updated_utc_time': {'readonly': True}, - 'worker_count': {'minimum': 0}, - 'error': {'readonly': True}, + "job_name": {"readonly": True}, + "source": {"required": True}, + "destination": {"required": True}, + "status": {"readonly": True}, + "processed_count": {"readonly": True}, + "total_count": {"readonly": True}, + "last_updated_utc_time": {"readonly": True}, + "worker_count": {"minimum": 0}, + "error": {"readonly": True}, } _attribute_map = { - 'job_name': {'key': 'jobName', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'DataTransferDataSourceSink'}, - 'destination': {'key': 'destination', 'type': 'DataTransferDataSourceSink'}, - 'status': {'key': 'status', 'type': 'str'}, - 'processed_count': {'key': 'processedCount', 'type': 'long'}, - 'total_count': {'key': 'totalCount', 'type': 'long'}, - 'last_updated_utc_time': {'key': 'lastUpdatedUtcTime', 'type': 'iso-8601'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'error': {'key': 'error', 'type': 'ErrorResponse'}, + "job_name": {"key": "jobName", "type": "str"}, + "source": {"key": "source", "type": "DataTransferDataSourceSink"}, + "destination": {"key": "destination", "type": "DataTransferDataSourceSink"}, + "status": {"key": "status", "type": "str"}, + "processed_count": {"key": "processedCount", "type": "int"}, + "total_count": {"key": "totalCount", "type": "int"}, + "last_updated_utc_time": {"key": "lastUpdatedUtcTime", "type": "iso-8601"}, + "worker_count": {"key": "workerCount", "type": "int"}, + "error": {"key": "error", "type": "ErrorResponse"}, } def __init__( self, *, - source: "DataTransferDataSourceSink", - destination: "DataTransferDataSourceSink", + source: "_models.DataTransferDataSourceSink", + destination: "_models.DataTransferDataSourceSink", worker_count: Optional[int] = None, **kwargs ): """ - :keyword source: Required. Source DataStore details. + :keyword source: Source DataStore details. Required. :paramtype source: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink - :keyword destination: Required. Destination DataStore details. + :keyword destination: Destination DataStore details. Required. :paramtype destination: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :keyword worker_count: Worker count. :paramtype worker_count: int """ - super(DataTransferJobProperties, self).__init__(**kwargs) + super().__init__(**kwargs) self.job_name = None self.source = source self.destination = destination @@ -5027,7 +4924,7 @@ def __init__( self.error = None -class RegionalServiceResource(msrest.serialization.Model): +class RegionalServiceResource(_serialization.Model): """Resource for a regional service location. Variables are only populated by the server, and will be ignored when sending a request. @@ -5036,30 +4933,26 @@ class RegionalServiceResource(msrest.serialization.Model): :vartype name: str :ivar location: The location name. :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". + :ivar status: Describes the status of a service. Known values are: "Creating", "Running", + "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus """ _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, + "name": {"readonly": True}, + "location": {"readonly": True}, + "status": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RegionalServiceResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.name = None self.location = None self.status = None @@ -5074,33 +4967,29 @@ class DataTransferRegionalServiceResource(RegionalServiceResource): :vartype name: str :ivar location: The location name. :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". + :ivar status: Describes the status of a service. Known values are: "Creating", "Running", + "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus """ _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, + "name": {"readonly": True}, + "location": {"readonly": True}, + "status": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(DataTransferRegionalServiceResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) -class DataTransferServiceResource(msrest.serialization.Model): +class DataTransferServiceResource(_serialization.Model): """Describes the service response property. :ivar properties: Properties for DataTransferServiceResource. @@ -5108,28 +4997,24 @@ class DataTransferServiceResource(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'DataTransferServiceResourceProperties'}, + "properties": {"key": "properties", "type": "DataTransferServiceResourceProperties"}, } - def __init__( - self, - *, - properties: Optional["DataTransferServiceResourceProperties"] = None, - **kwargs - ): + def __init__(self, *, properties: Optional["_models.DataTransferServiceResourceProperties"] = None, **kwargs): """ :keyword properties: Properties for DataTransferServiceResource. :paramtype properties: ~azure.mgmt.cosmosdb.models.DataTransferServiceResourceProperties """ - super(DataTransferServiceResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.properties = properties -class ServiceResourceProperties(msrest.serialization.Model): +class ServiceResourceProperties(_serialization.Model): """Services response resource. - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataTransferServiceResourceProperties, GraphAPIComputeServiceResourceProperties, MaterializedViewsBuilderServiceResourceProperties, SqlDedicatedGatewayServiceResourceProperties. + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + DataTransferServiceResourceProperties, GraphAPIComputeServiceResourceProperties, + MaterializedViewsBuilderServiceResourceProperties, SqlDedicatedGatewayServiceResourceProperties Variables are only populated by the server, and will be ignored when sending a request. @@ -5137,67 +5022,71 @@ class ServiceResourceProperties(msrest.serialization.Model): :ivar additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] + :vartype additional_properties: dict[str, JSON] :ivar creation_time: Time of the last state change (ISO-8601 format). :vartype creation_time: ~datetime.datetime - :ivar instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". + :ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s", + "Cosmos.D8s", and "Cosmos.D16s". :vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :ivar instance_count: Instance count for the service. :vartype instance_count: int - :ivar service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", - "MaterializedViewsBuilder". + :ivar service_type: ServiceType for the service. Required. Known values are: + "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder". :vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". + :ivar status: Describes the status of a service. Known values are: "Creating", "Running", + "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus """ _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, + "creation_time": {"readonly": True}, + "instance_count": {"minimum": 0}, + "service_type": {"required": True}, + "status": {"readonly": True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, + "additional_properties": {"key": "", "type": "{object}"}, + "creation_time": {"key": "creationTime", "type": "iso-8601"}, + "instance_size": {"key": "instanceSize", "type": "str"}, + "instance_count": {"key": "instanceCount", "type": "int"}, + "service_type": {"key": "serviceType", "type": "str"}, + "status": {"key": "status", "type": "str"}, } _subtype_map = { - 'service_type': {'DataTransfer': 'DataTransferServiceResourceProperties', 'GraphAPICompute': 'GraphAPIComputeServiceResourceProperties', 'MaterializedViewsBuilder': 'MaterializedViewsBuilderServiceResourceProperties', 'SqlDedicatedGateway': 'SqlDedicatedGatewayServiceResourceProperties'} + "service_type": { + "DataTransfer": "DataTransferServiceResourceProperties", + "GraphAPICompute": "GraphAPIComputeServiceResourceProperties", + "MaterializedViewsBuilder": "MaterializedViewsBuilderServiceResourceProperties", + "SqlDedicatedGateway": "SqlDedicatedGatewayServiceResourceProperties", + } } def __init__( self, *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, + additional_properties: Optional[Dict[str, JSON]] = None, + instance_size: Optional[Union[str, "_models.ServiceSize"]] = None, instance_count: Optional[int] = None, **kwargs ): """ :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :paramtype additional_properties: dict[str, any] - :keyword instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". + :paramtype additional_properties: dict[str, JSON] + :keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s", + "Cosmos.D8s", and "Cosmos.D16s". :paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :keyword instance_count: Instance count for the service. :paramtype instance_count: int """ - super(ServiceResourceProperties, self).__init__(**kwargs) + super().__init__(**kwargs) self.additional_properties = additional_properties self.creation_time = None self.instance_size = instance_size self.instance_count = instance_count - self.service_type = 'ServiceResourceProperties' # type: str + self.service_type = None # type: Optional[str] self.status = None @@ -5210,94 +5099,93 @@ class DataTransferServiceResourceProperties(ServiceResourceProperties): :ivar additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] + :vartype additional_properties: dict[str, JSON] :ivar creation_time: Time of the last state change (ISO-8601 format). :vartype creation_time: ~datetime.datetime - :ivar instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". + :ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s", + "Cosmos.D8s", and "Cosmos.D16s". :vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :ivar instance_count: Instance count for the service. :vartype instance_count: int - :ivar service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", - "MaterializedViewsBuilder". + :ivar service_type: ServiceType for the service. Required. Known values are: + "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder". :vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". + :ivar status: Describes the status of a service. Known values are: "Creating", "Running", + "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus :ivar locations: An array that contains all of the locations for the service. :vartype locations: list[~azure.mgmt.cosmosdb.models.DataTransferRegionalServiceResource] """ _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, + "creation_time": {"readonly": True}, + "instance_count": {"minimum": 0}, + "service_type": {"required": True}, + "status": {"readonly": True}, + "locations": {"readonly": True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[DataTransferRegionalServiceResource]'}, + "additional_properties": {"key": "", "type": "{object}"}, + "creation_time": {"key": "creationTime", "type": "iso-8601"}, + "instance_size": {"key": "instanceSize", "type": "str"}, + "instance_count": {"key": "instanceCount", "type": "int"}, + "service_type": {"key": "serviceType", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "locations": {"key": "locations", "type": "[DataTransferRegionalServiceResource]"}, } def __init__( self, *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, + additional_properties: Optional[Dict[str, JSON]] = None, + instance_size: Optional[Union[str, "_models.ServiceSize"]] = None, instance_count: Optional[int] = None, **kwargs ): """ :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :paramtype additional_properties: dict[str, any] - :keyword instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". + :paramtype additional_properties: dict[str, JSON] + :keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s", + "Cosmos.D8s", and "Cosmos.D16s". :paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :keyword instance_count: Instance count for the service. :paramtype instance_count: int """ - super(DataTransferServiceResourceProperties, self).__init__(additional_properties=additional_properties, instance_size=instance_size, instance_count=instance_count, **kwargs) - self.service_type = 'DataTransfer' # type: str + super().__init__( + additional_properties=additional_properties, + instance_size=instance_size, + instance_count=instance_count, + **kwargs + ) + self.service_type = "DataTransfer" # type: str self.locations = None -class DiagnosticLogSettings(msrest.serialization.Model): +class DiagnosticLogSettings(_serialization.Model): """Indicates what diagnostic log settings are to be enabled. :ivar enable_full_text_query: Describe the level of detail with which queries are to be logged. - Possible values include: "None", "True", "False". + Known values are: "None", "True", and "False". :vartype enable_full_text_query: str or ~azure.mgmt.cosmosdb.models.EnableFullTextQuery """ _attribute_map = { - 'enable_full_text_query': {'key': 'enableFullTextQuery', 'type': 'str'}, + "enable_full_text_query": {"key": "enableFullTextQuery", "type": "str"}, } - def __init__( - self, - *, - enable_full_text_query: Optional[Union[str, "EnableFullTextQuery"]] = None, - **kwargs - ): + def __init__(self, *, enable_full_text_query: Optional[Union[str, "_models.EnableFullTextQuery"]] = None, **kwargs): """ :keyword enable_full_text_query: Describe the level of detail with which queries are to be - logged. Possible values include: "None", "True", "False". + logged. Known values are: "None", "True", and "False". :paramtype enable_full_text_query: str or ~azure.mgmt.cosmosdb.models.EnableFullTextQuery """ - super(DiagnosticLogSettings, self).__init__(**kwargs) + super().__init__(**kwargs) self.enable_full_text_query = enable_full_text_query -class ErrorResponse(msrest.serialization.Model): +class ErrorResponse(_serialization.Model): """Error Response. :ivar code: Error code. @@ -5307,29 +5195,23 @@ class ErrorResponse(msrest.serialization.Model): """ _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, } - def __init__( - self, - *, - code: Optional[str] = None, - message: Optional[str] = None, - **kwargs - ): + def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs): """ :keyword code: Error code. :paramtype code: str :keyword message: Error message indicating why the operation failed. :paramtype message: str """ - super(ErrorResponse, self).__init__(**kwargs) + super().__init__(**kwargs) self.code = code self.message = message -class ExcludedPath(msrest.serialization.Model): +class ExcludedPath(_serialization.Model): """ExcludedPath. :ivar path: The path for which the indexing behavior applies to. Index paths typically start @@ -5338,56 +5220,46 @@ class ExcludedPath(msrest.serialization.Model): """ _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, + "path": {"key": "path", "type": "str"}, } - def __init__( - self, - *, - path: Optional[str] = None, - **kwargs - ): + def __init__(self, *, path: Optional[str] = None, **kwargs): """ :keyword path: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*). :paramtype path: str """ - super(ExcludedPath, self).__init__(**kwargs) + super().__init__(**kwargs) self.path = path -class FailoverPolicies(msrest.serialization.Model): +class FailoverPolicies(_serialization.Model): """The list of new failover policies for the failover priority change. All required parameters must be populated in order to send to Azure. - :ivar failover_policies: Required. List of failover policies. + :ivar failover_policies: List of failover policies. Required. :vartype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] """ _validation = { - 'failover_policies': {'required': True}, + "failover_policies": {"required": True}, } _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + "failover_policies": {"key": "failoverPolicies", "type": "[FailoverPolicy]"}, } - def __init__( - self, - *, - failover_policies: List["FailoverPolicy"], - **kwargs - ): + def __init__(self, *, failover_policies: List["_models.FailoverPolicy"], **kwargs): """ - :keyword failover_policies: Required. List of failover policies. + :keyword failover_policies: List of failover policies. Required. :paramtype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] """ - super(FailoverPolicies, self).__init__(**kwargs) + super().__init__(**kwargs) self.failover_policies = failover_policies -class FailoverPolicy(msrest.serialization.Model): +class FailoverPolicy(_serialization.Model): """The failover policy for a given region of a database account. Variables are only populated by the server, and will be ignored when sending a request. @@ -5405,23 +5277,17 @@ class FailoverPolicy(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, + "id": {"readonly": True}, + "failover_priority": {"minimum": 0}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + "id": {"key": "id", "type": "str"}, + "location_name": {"key": "locationName", "type": "str"}, + "failover_priority": {"key": "failoverPriority", "type": "int"}, } - def __init__( - self, - *, - location_name: Optional[str] = None, - failover_priority: Optional[int] = None, - **kwargs - ): + def __init__(self, *, location_name: Optional[str] = None, failover_priority: Optional[int] = None, **kwargs): """ :keyword location_name: The name of the region in which the database account exists. :paramtype location_name: str @@ -5431,7 +5297,7 @@ def __init__( account exists. :paramtype failover_priority: int """ - super(FailoverPolicy, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = None self.location_name = location_name self.failover_priority = failover_priority @@ -5446,38 +5312,34 @@ class GraphAPIComputeRegionalServiceResource(RegionalServiceResource): :vartype name: str :ivar location: The location name. :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". + :ivar status: Describes the status of a service. Known values are: "Creating", "Running", + "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus :ivar graph_api_compute_endpoint: The regional endpoint for GraphAPICompute. :vartype graph_api_compute_endpoint: str """ _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'graph_api_compute_endpoint': {'readonly': True}, + "name": {"readonly": True}, + "location": {"readonly": True}, + "status": {"readonly": True}, + "graph_api_compute_endpoint": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'graph_api_compute_endpoint': {'key': 'graphApiComputeEndpoint', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "graph_api_compute_endpoint": {"key": "graphApiComputeEndpoint", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(GraphAPIComputeRegionalServiceResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.graph_api_compute_endpoint = None -class GraphAPIComputeServiceResource(msrest.serialization.Model): +class GraphAPIComputeServiceResource(_serialization.Model): """Describes the service response property for GraphAPICompute. :ivar properties: Properties for GraphAPIComputeServiceResource. @@ -5485,20 +5347,15 @@ class GraphAPIComputeServiceResource(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'GraphAPIComputeServiceResourceProperties'}, + "properties": {"key": "properties", "type": "GraphAPIComputeServiceResourceProperties"}, } - def __init__( - self, - *, - properties: Optional["GraphAPIComputeServiceResourceProperties"] = None, - **kwargs - ): + def __init__(self, *, properties: Optional["_models.GraphAPIComputeServiceResourceProperties"] = None, **kwargs): """ :keyword properties: Properties for GraphAPIComputeServiceResource. :paramtype properties: ~azure.mgmt.cosmosdb.models.GraphAPIComputeServiceResourceProperties """ - super(GraphAPIComputeServiceResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.properties = properties @@ -5511,20 +5368,19 @@ class GraphAPIComputeServiceResourceProperties(ServiceResourceProperties): :ivar additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] + :vartype additional_properties: dict[str, JSON] :ivar creation_time: Time of the last state change (ISO-8601 format). :vartype creation_time: ~datetime.datetime - :ivar instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". + :ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s", + "Cosmos.D8s", and "Cosmos.D16s". :vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :ivar instance_count: Instance count for the service. :vartype instance_count: int - :ivar service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", - "MaterializedViewsBuilder". + :ivar service_type: ServiceType for the service. Required. Known values are: + "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder". :vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". + :ivar status: Describes the status of a service. Known values are: "Creating", "Running", + "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus :ivar graph_api_compute_endpoint: GraphAPICompute endpoint for the service. :vartype graph_api_compute_endpoint: str @@ -5533,29 +5389,29 @@ class GraphAPIComputeServiceResourceProperties(ServiceResourceProperties): """ _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, + "creation_time": {"readonly": True}, + "instance_count": {"minimum": 0}, + "service_type": {"required": True}, + "status": {"readonly": True}, + "locations": {"readonly": True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'graph_api_compute_endpoint': {'key': 'graphApiComputeEndpoint', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[GraphAPIComputeRegionalServiceResource]'}, + "additional_properties": {"key": "", "type": "{object}"}, + "creation_time": {"key": "creationTime", "type": "iso-8601"}, + "instance_size": {"key": "instanceSize", "type": "str"}, + "instance_count": {"key": "instanceCount", "type": "int"}, + "service_type": {"key": "serviceType", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "graph_api_compute_endpoint": {"key": "graphApiComputeEndpoint", "type": "str"}, + "locations": {"key": "locations", "type": "[GraphAPIComputeRegionalServiceResource]"}, } def __init__( self, *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, + additional_properties: Optional[Dict[str, JSON]] = None, + instance_size: Optional[Union[str, "_models.ServiceSize"]] = None, instance_count: Optional[int] = None, graph_api_compute_endpoint: Optional[str] = None, **kwargs @@ -5563,49 +5419,49 @@ def __init__( """ :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :paramtype additional_properties: dict[str, any] - :keyword instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". + :paramtype additional_properties: dict[str, JSON] + :keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s", + "Cosmos.D8s", and "Cosmos.D16s". :paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :keyword instance_count: Instance count for the service. :paramtype instance_count: int :keyword graph_api_compute_endpoint: GraphAPICompute endpoint for the service. :paramtype graph_api_compute_endpoint: str """ - super(GraphAPIComputeServiceResourceProperties, self).__init__(additional_properties=additional_properties, instance_size=instance_size, instance_count=instance_count, **kwargs) - self.service_type = 'GraphAPICompute' # type: str + super().__init__( + additional_properties=additional_properties, + instance_size=instance_size, + instance_count=instance_count, + **kwargs + ) + self.service_type = "GraphAPICompute" # type: str self.graph_api_compute_endpoint = graph_api_compute_endpoint self.locations = None -class GraphResource(msrest.serialization.Model): +class GraphResource(_serialization.Model): """Cosmos DB Graph resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB Graph. + :ivar id: Name of the Cosmos DB Graph. Required. :vartype id: str """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - *, - id: str, - **kwargs - ): + def __init__(self, *, id: str, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB Graph. + :keyword id: Name of the Cosmos DB Graph. Required. :paramtype id: str """ - super(GraphResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id @@ -5624,16 +5480,16 @@ class GraphResourceCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a Graph resource. + :ivar resource: The standard JSON format of a Graph resource. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.GraphResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -5641,52 +5497,52 @@ class GraphResourceCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GraphResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "GraphResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "GraphResource", + resource: "_models.GraphResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a Graph resource. + :keyword resource: The standard JSON format of a Graph resource. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.GraphResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(GraphResourceCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options @@ -5702,15 +5558,15 @@ class GraphResourceGetPropertiesOptions(OptionsResource): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -5720,7 +5576,7 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(GraphResourceGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super().__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) class GraphResourceGetPropertiesResource(GraphResource): @@ -5728,29 +5584,24 @@ class GraphResourceGetPropertiesResource(GraphResource): All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB Graph. + :ivar id: Name of the Cosmos DB Graph. Required. :vartype id: str """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - *, - id: str, - **kwargs - ): + def __init__(self, *, id: str, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB Graph. + :keyword id: Name of the Cosmos DB Graph. Required. :paramtype id: str """ - super(GraphResourceGetPropertiesResource, self).__init__(id=id, **kwargs) + super().__init__(id=id, **kwargs) class GraphResourceGetResults(ARMResourceProperties): @@ -5766,12 +5617,12 @@ class GraphResourceGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -5782,20 +5633,20 @@ class GraphResourceGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GraphResourceGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'GraphResourceGetPropertiesOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "GraphResourceGetPropertiesResource"}, + "options": {"key": "properties.options", "type": "GraphResourceGetPropertiesOptions"}, } def __init__( @@ -5803,20 +5654,20 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["GraphResourceGetPropertiesResource"] = None, - options: Optional["GraphResourceGetPropertiesOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.GraphResourceGetPropertiesResource"] = None, + options: Optional["_models.GraphResourceGetPropertiesOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -5825,12 +5676,12 @@ def __init__( :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesOptions """ - super(GraphResourceGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class GraphResourcesListResult(msrest.serialization.Model): +class GraphResourcesListResult(_serialization.Model): """The List operation response, that contains the Graph resource and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -5840,20 +5691,16 @@ class GraphResourcesListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[GraphResourceGetResults]'}, + "value": {"key": "value", "type": "[GraphResourceGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(GraphResourcesListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None @@ -5872,16 +5719,16 @@ class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a Gremlin database. + :ivar resource: The standard JSON format of a Gremlin database. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -5889,52 +5736,52 @@ class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "GremlinDatabaseResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "GremlinDatabaseResource", + resource: "_models.GremlinDatabaseResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a Gremlin database. + :keyword resource: The standard JSON format of a Gremlin database. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(GremlinDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options @@ -5950,15 +5797,15 @@ class GremlinDatabaseGetPropertiesOptions(OptionsResource): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -5968,49 +5815,42 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(GremlinDatabaseGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super().__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) -class GremlinDatabaseResource(msrest.serialization.Model): +class GremlinDatabaseResource(_serialization.Model): """Cosmos DB Gremlin database resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB Gremlin database. + :ivar id: Name of the Cosmos DB Gremlin database. Required. :vartype id: str """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - *, - id: str, - **kwargs - ): + def __init__(self, *, id: str, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB Gremlin database. + :keyword id: Name of the Cosmos DB Gremlin database. Required. :paramtype id: str """ - super(GremlinDatabaseResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id -class GremlinDatabaseGetPropertiesResource(ExtendedResourceProperties, GremlinDatabaseResource): +class GremlinDatabaseGetPropertiesResource(GremlinDatabaseResource, ExtendedResourceProperties): """GremlinDatabaseGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB Gremlin database. - :vartype id: str :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -6018,37 +5858,34 @@ class GremlinDatabaseGetPropertiesResource(ExtendedResourceProperties, GremlinDa :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :ivar id: Name of the Cosmos DB Gremlin database. Required. + :vartype id: str """ _validation = { - 'id': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - *, - id: str, - **kwargs - ): + def __init__(self, *, id: str, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB Gremlin database. + :keyword id: Name of the Cosmos DB Gremlin database. Required. :paramtype id: str """ - super(GremlinDatabaseGetPropertiesResource, self).__init__(id=id, **kwargs) - self.id = id + super().__init__(id=id, **kwargs) self.rid = None self.ts = None self.etag = None + self.id = id class GremlinDatabaseGetResults(ARMResourceProperties): @@ -6064,12 +5901,12 @@ class GremlinDatabaseGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -6080,20 +5917,20 @@ class GremlinDatabaseGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'GremlinDatabaseGetPropertiesOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "GremlinDatabaseGetPropertiesResource"}, + "options": {"key": "properties.options", "type": "GremlinDatabaseGetPropertiesOptions"}, } def __init__( @@ -6101,20 +5938,20 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["GremlinDatabaseGetPropertiesResource"] = None, - options: Optional["GremlinDatabaseGetPropertiesOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.GremlinDatabaseGetPropertiesResource"] = None, + options: Optional["_models.GremlinDatabaseGetPropertiesOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -6123,12 +5960,12 @@ def __init__( :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesOptions """ - super(GremlinDatabaseGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class GremlinDatabaseListResult(msrest.serialization.Model): +class GremlinDatabaseListResult(_serialization.Model): """The List operation response, that contains the Gremlin databases and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -6138,24 +5975,20 @@ class GremlinDatabaseListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[GremlinDatabaseGetResults]'}, + "value": {"key": "value", "type": "[GremlinDatabaseGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(GremlinDatabaseListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class GremlinDatabaseRestoreResource(msrest.serialization.Model): +class GremlinDatabaseRestoreResource(_serialization.Model): """Specific Gremlin Databases to restore. :ivar database_name: The name of the gremlin database available for restore. @@ -6165,24 +5998,18 @@ class GremlinDatabaseRestoreResource(msrest.serialization.Model): """ _attribute_map = { - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'graph_names': {'key': 'graphNames', 'type': '[str]'}, + "database_name": {"key": "databaseName", "type": "str"}, + "graph_names": {"key": "graphNames", "type": "[str]"}, } - def __init__( - self, - *, - database_name: Optional[str] = None, - graph_names: Optional[List[str]] = None, - **kwargs - ): + def __init__(self, *, database_name: Optional[str] = None, graph_names: Optional[List[str]] = None, **kwargs): """ :keyword database_name: The name of the gremlin database available for restore. :paramtype database_name: str :keyword graph_names: The names of the graphs available for restore. :paramtype graph_names: list[str] """ - super(GremlinDatabaseRestoreResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.database_name = database_name self.graph_names = graph_names @@ -6202,16 +6029,16 @@ class GremlinGraphCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a Gremlin graph. + :ivar resource: The standard JSON format of a Gremlin graph. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -6219,52 +6046,52 @@ class GremlinGraphCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "GremlinGraphResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "GremlinGraphResource", + resource: "_models.GremlinGraphResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a Gremlin graph. + :keyword resource: The standard JSON format of a Gremlin graph. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(GremlinGraphCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options @@ -6280,15 +6107,15 @@ class GremlinGraphGetPropertiesOptions(OptionsResource): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -6298,15 +6125,15 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(GremlinGraphGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super().__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) -class GremlinGraphResource(msrest.serialization.Model): +class GremlinGraphResource(_serialization.Model): """Cosmos DB Gremlin graph resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB Gremlin graph. + :ivar id: Name of the Cosmos DB Gremlin graph. Required. :vartype id: str :ivar indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph. @@ -6321,34 +6148,38 @@ class GremlinGraphResource(msrest.serialization.Model): :vartype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :ivar conflict_resolution_policy: The conflict resolution policy for the graph. :vartype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :ivar analytical_storage_ttl: Analytical TTL. + :vartype analytical_storage_ttl: int """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + "id": {"key": "id", "type": "str"}, + "indexing_policy": {"key": "indexingPolicy", "type": "IndexingPolicy"}, + "partition_key": {"key": "partitionKey", "type": "ContainerPartitionKey"}, + "default_ttl": {"key": "defaultTtl", "type": "int"}, + "unique_key_policy": {"key": "uniqueKeyPolicy", "type": "UniqueKeyPolicy"}, + "conflict_resolution_policy": {"key": "conflictResolutionPolicy", "type": "ConflictResolutionPolicy"}, + "analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"}, } def __init__( self, *, - id: str, - indexing_policy: Optional["IndexingPolicy"] = None, - partition_key: Optional["ContainerPartitionKey"] = None, + id: str, # pylint: disable=redefined-builtin + indexing_policy: Optional["_models.IndexingPolicy"] = None, + partition_key: Optional["_models.ContainerPartitionKey"] = None, default_ttl: Optional[int] = None, - unique_key_policy: Optional["UniqueKeyPolicy"] = None, - conflict_resolution_policy: Optional["ConflictResolutionPolicy"] = None, + unique_key_policy: Optional["_models.UniqueKeyPolicy"] = None, + conflict_resolution_policy: Optional["_models.ConflictResolutionPolicy"] = None, + analytical_storage_ttl: Optional[int] = None, **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB Gremlin graph. + :keyword id: Name of the Cosmos DB Gremlin graph. Required. :paramtype id: str :keyword indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph. @@ -6363,24 +6194,34 @@ def __init__( :paramtype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :keyword conflict_resolution_policy: The conflict resolution policy for the graph. :paramtype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :keyword analytical_storage_ttl: Analytical TTL. + :paramtype analytical_storage_ttl: int """ - super(GremlinGraphResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id self.indexing_policy = indexing_policy self.partition_key = partition_key self.default_ttl = default_ttl self.unique_key_policy = unique_key_policy self.conflict_resolution_policy = conflict_resolution_policy + self.analytical_storage_ttl = analytical_storage_ttl -class GremlinGraphGetPropertiesResource(ExtendedResourceProperties, GremlinGraphResource): +class GremlinGraphGetPropertiesResource(GremlinGraphResource, ExtendedResourceProperties): """GremlinGraphGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB Gremlin graph. + :ivar rid: A system generated property. A unique identifier. + :vartype rid: str + :ivar ts: A system generated property that denotes the last updated timestamp of the resource. + :vartype ts: float + :ivar etag: A system generated property representing the resource etag required for optimistic + concurrency control. + :vartype etag: str + :ivar id: Name of the Cosmos DB Gremlin graph. Required. :vartype id: str :ivar indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph. @@ -6395,47 +6236,44 @@ class GremlinGraphGetPropertiesResource(ExtendedResourceProperties, GremlinGraph :vartype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :ivar conflict_resolution_policy: The conflict resolution policy for the graph. :vartype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - :ivar rid: A system generated property. A unique identifier. - :vartype rid: str - :ivar ts: A system generated property that denotes the last updated timestamp of the resource. - :vartype ts: float - :ivar etag: A system generated property representing the resource etag required for optimistic - concurrency control. - :vartype etag: str + :ivar analytical_storage_ttl: Analytical TTL. + :vartype analytical_storage_ttl: int """ _validation = { - 'id': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "indexing_policy": {"key": "indexingPolicy", "type": "IndexingPolicy"}, + "partition_key": {"key": "partitionKey", "type": "ContainerPartitionKey"}, + "default_ttl": {"key": "defaultTtl", "type": "int"}, + "unique_key_policy": {"key": "uniqueKeyPolicy", "type": "UniqueKeyPolicy"}, + "conflict_resolution_policy": {"key": "conflictResolutionPolicy", "type": "ConflictResolutionPolicy"}, + "analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"}, } def __init__( self, *, - id: str, - indexing_policy: Optional["IndexingPolicy"] = None, - partition_key: Optional["ContainerPartitionKey"] = None, + id: str, # pylint: disable=redefined-builtin + indexing_policy: Optional["_models.IndexingPolicy"] = None, + partition_key: Optional["_models.ContainerPartitionKey"] = None, default_ttl: Optional[int] = None, - unique_key_policy: Optional["UniqueKeyPolicy"] = None, - conflict_resolution_policy: Optional["ConflictResolutionPolicy"] = None, + unique_key_policy: Optional["_models.UniqueKeyPolicy"] = None, + conflict_resolution_policy: Optional["_models.ConflictResolutionPolicy"] = None, + analytical_storage_ttl: Optional[int] = None, **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB Gremlin graph. + :keyword id: Name of the Cosmos DB Gremlin graph. Required. :paramtype id: str :keyword indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph. @@ -6450,17 +6288,29 @@ def __init__( :paramtype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :keyword conflict_resolution_policy: The conflict resolution policy for the graph. :paramtype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :keyword analytical_storage_ttl: Analytical TTL. + :paramtype analytical_storage_ttl: int """ - super(GremlinGraphGetPropertiesResource, self).__init__(id=id, indexing_policy=indexing_policy, partition_key=partition_key, default_ttl=default_ttl, unique_key_policy=unique_key_policy, conflict_resolution_policy=conflict_resolution_policy, **kwargs) + super().__init__( + id=id, + indexing_policy=indexing_policy, + partition_key=partition_key, + default_ttl=default_ttl, + unique_key_policy=unique_key_policy, + conflict_resolution_policy=conflict_resolution_policy, + analytical_storage_ttl=analytical_storage_ttl, + **kwargs + ) + self.rid = None + self.ts = None + self.etag = None self.id = id self.indexing_policy = indexing_policy self.partition_key = partition_key self.default_ttl = default_ttl self.unique_key_policy = unique_key_policy self.conflict_resolution_policy = conflict_resolution_policy - self.rid = None - self.ts = None - self.etag = None + self.analytical_storage_ttl = analytical_storage_ttl class GremlinGraphGetResults(ARMResourceProperties): @@ -6476,12 +6326,12 @@ class GremlinGraphGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -6492,20 +6342,20 @@ class GremlinGraphGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'GremlinGraphGetPropertiesOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "GremlinGraphGetPropertiesResource"}, + "options": {"key": "properties.options", "type": "GremlinGraphGetPropertiesOptions"}, } def __init__( @@ -6513,20 +6363,20 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["GremlinGraphGetPropertiesResource"] = None, - options: Optional["GremlinGraphGetPropertiesOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.GremlinGraphGetPropertiesResource"] = None, + options: Optional["_models.GremlinGraphGetPropertiesOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -6535,12 +6385,12 @@ def __init__( :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesOptions """ - super(GremlinGraphGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class GremlinGraphListResult(msrest.serialization.Model): +class GremlinGraphListResult(_serialization.Model): """The List operation response, that contains the graphs and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -6550,24 +6400,20 @@ class GremlinGraphListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[GremlinGraphGetResults]'}, + "value": {"key": "value", "type": "[GremlinGraphGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(GremlinGraphListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class IncludedPath(msrest.serialization.Model): +class IncludedPath(_serialization.Model): """The paths that are included in indexing. :ivar path: The path for which the indexing behavior applies to. Index paths typically start @@ -6578,17 +6424,11 @@ class IncludedPath(msrest.serialization.Model): """ _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'indexes': {'key': 'indexes', 'type': '[Indexes]'}, + "path": {"key": "path", "type": "str"}, + "indexes": {"key": "indexes", "type": "[Indexes]"}, } - def __init__( - self, - *, - path: Optional[str] = None, - indexes: Optional[List["Indexes"]] = None, - **kwargs - ): + def __init__(self, *, path: Optional[str] = None, indexes: Optional[List["_models.Indexes"]] = None, **kwargs): """ :keyword path: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*). @@ -6596,63 +6436,59 @@ def __init__( :keyword indexes: List of indexes for this path. :paramtype indexes: list[~azure.mgmt.cosmosdb.models.Indexes] """ - super(IncludedPath, self).__init__(**kwargs) + super().__init__(**kwargs) self.path = path self.indexes = indexes -class Indexes(msrest.serialization.Model): +class Indexes(_serialization.Model): """The indexes for the path. - :ivar data_type: The datatype for which the indexing behavior is applied to. Possible values - include: "String", "Number", "Point", "Polygon", "LineString", "MultiPolygon". Default value: - "String". + :ivar data_type: The datatype for which the indexing behavior is applied to. Known values are: + "String", "Number", "Point", "Polygon", "LineString", and "MultiPolygon". :vartype data_type: str or ~azure.mgmt.cosmosdb.models.DataType :ivar precision: The precision of the index. -1 is maximum precision. :vartype precision: int - :ivar kind: Indicates the type of index. Possible values include: "Hash", "Range", "Spatial". - Default value: "Hash". + :ivar kind: Indicates the type of index. Known values are: "Hash", "Range", and "Spatial". :vartype kind: str or ~azure.mgmt.cosmosdb.models.IndexKind """ _attribute_map = { - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'precision': {'key': 'precision', 'type': 'int'}, - 'kind': {'key': 'kind', 'type': 'str'}, + "data_type": {"key": "dataType", "type": "str"}, + "precision": {"key": "precision", "type": "int"}, + "kind": {"key": "kind", "type": "str"}, } def __init__( self, *, - data_type: Optional[Union[str, "DataType"]] = "String", + data_type: Union[str, "_models.DataType"] = "String", precision: Optional[int] = None, - kind: Optional[Union[str, "IndexKind"]] = "Hash", + kind: Union[str, "_models.IndexKind"] = "Hash", **kwargs ): """ - :keyword data_type: The datatype for which the indexing behavior is applied to. Possible values - include: "String", "Number", "Point", "Polygon", "LineString", "MultiPolygon". Default value: - "String". + :keyword data_type: The datatype for which the indexing behavior is applied to. Known values + are: "String", "Number", "Point", "Polygon", "LineString", and "MultiPolygon". :paramtype data_type: str or ~azure.mgmt.cosmosdb.models.DataType :keyword precision: The precision of the index. -1 is maximum precision. :paramtype precision: int - :keyword kind: Indicates the type of index. Possible values include: "Hash", "Range", - "Spatial". Default value: "Hash". + :keyword kind: Indicates the type of index. Known values are: "Hash", "Range", and "Spatial". :paramtype kind: str or ~azure.mgmt.cosmosdb.models.IndexKind """ - super(Indexes, self).__init__(**kwargs) + super().__init__(**kwargs) self.data_type = data_type self.precision = precision self.kind = kind -class IndexingPolicy(msrest.serialization.Model): +class IndexingPolicy(_serialization.Model): """Cosmos DB indexing policy. :ivar automatic: Indicates if the indexing policy is automatic. :vartype automatic: bool - :ivar indexing_mode: Indicates the indexing mode. Possible values include: "consistent", - "lazy", "none". Default value: "consistent". + :ivar indexing_mode: Indicates the indexing mode. Known values are: "consistent", "lazy", and + "none". :vartype indexing_mode: str or ~azure.mgmt.cosmosdb.models.IndexingMode :ivar included_paths: List of paths to include in the indexing. :vartype included_paths: list[~azure.mgmt.cosmosdb.models.IncludedPath] @@ -6665,30 +6501,30 @@ class IndexingPolicy(msrest.serialization.Model): """ _attribute_map = { - 'automatic': {'key': 'automatic', 'type': 'bool'}, - 'indexing_mode': {'key': 'indexingMode', 'type': 'str'}, - 'included_paths': {'key': 'includedPaths', 'type': '[IncludedPath]'}, - 'excluded_paths': {'key': 'excludedPaths', 'type': '[ExcludedPath]'}, - 'composite_indexes': {'key': 'compositeIndexes', 'type': '[[CompositePath]]'}, - 'spatial_indexes': {'key': 'spatialIndexes', 'type': '[SpatialSpec]'}, + "automatic": {"key": "automatic", "type": "bool"}, + "indexing_mode": {"key": "indexingMode", "type": "str"}, + "included_paths": {"key": "includedPaths", "type": "[IncludedPath]"}, + "excluded_paths": {"key": "excludedPaths", "type": "[ExcludedPath]"}, + "composite_indexes": {"key": "compositeIndexes", "type": "[[CompositePath]]"}, + "spatial_indexes": {"key": "spatialIndexes", "type": "[SpatialSpec]"}, } def __init__( self, *, automatic: Optional[bool] = None, - indexing_mode: Optional[Union[str, "IndexingMode"]] = "consistent", - included_paths: Optional[List["IncludedPath"]] = None, - excluded_paths: Optional[List["ExcludedPath"]] = None, - composite_indexes: Optional[List[List["CompositePath"]]] = None, - spatial_indexes: Optional[List["SpatialSpec"]] = None, + indexing_mode: Union[str, "_models.IndexingMode"] = "consistent", + included_paths: Optional[List["_models.IncludedPath"]] = None, + excluded_paths: Optional[List["_models.ExcludedPath"]] = None, + composite_indexes: Optional[List[List["_models.CompositePath"]]] = None, + spatial_indexes: Optional[List["_models.SpatialSpec"]] = None, **kwargs ): """ :keyword automatic: Indicates if the indexing policy is automatic. :paramtype automatic: bool - :keyword indexing_mode: Indicates the indexing mode. Possible values include: "consistent", - "lazy", "none". Default value: "consistent". + :keyword indexing_mode: Indicates the indexing mode. Known values are: "consistent", "lazy", + and "none". :paramtype indexing_mode: str or ~azure.mgmt.cosmosdb.models.IndexingMode :keyword included_paths: List of paths to include in the indexing. :paramtype included_paths: list[~azure.mgmt.cosmosdb.models.IncludedPath] @@ -6699,7 +6535,7 @@ def __init__( :keyword spatial_indexes: List of spatial specifics. :paramtype spatial_indexes: list[~azure.mgmt.cosmosdb.models.SpatialSpec] """ - super(IndexingPolicy, self).__init__(**kwargs) + super().__init__(**kwargs) self.automatic = automatic self.indexing_mode = indexing_mode self.included_paths = included_paths @@ -6708,7 +6544,7 @@ def __init__( self.spatial_indexes = spatial_indexes -class IpAddressOrRange(msrest.serialization.Model): +class IpAddressOrRange(_serialization.Model): """IpAddressOrRange object. :ivar ip_address_or_range: A single IPv4 address or a single IPv4 address range in CIDR format. @@ -6719,15 +6555,10 @@ class IpAddressOrRange(msrest.serialization.Model): """ _attribute_map = { - 'ip_address_or_range': {'key': 'ipAddressOrRange', 'type': 'str'}, + "ip_address_or_range": {"key": "ipAddressOrRange", "type": "str"}, } - def __init__( - self, - *, - ip_address_or_range: Optional[str] = None, - **kwargs - ): + def __init__(self, *, ip_address_or_range: Optional[str] = None, **kwargs): """ :keyword ip_address_or_range: A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be well-formatted and cannot be contained in one of the following @@ -6736,11 +6567,11 @@ def __init__( “23.40.210.0/8”. :paramtype ip_address_or_range: str """ - super(IpAddressOrRange, self).__init__(**kwargs) + super().__init__(**kwargs) self.ip_address_or_range = ip_address_or_range -class KeyWrapMetadata(msrest.serialization.Model): +class KeyWrapMetadata(_serialization.Model): """Represents key wrap metadata that a key wrapping provider can use to wrap/unwrap a client encryption key. :ivar name: The name of associated KeyEncryptionKey (aka CustomerManagedKey). @@ -6754,10 +6585,10 @@ class KeyWrapMetadata(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'algorithm': {'key': 'algorithm', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "value": {"key": "value", "type": "str"}, + "algorithm": {"key": "algorithm", "type": "str"}, } def __init__( @@ -6779,14 +6610,14 @@ def __init__( :keyword algorithm: Algorithm used in wrapping and unwrapping of the data encryption key. :paramtype algorithm: str """ - super(KeyWrapMetadata, self).__init__(**kwargs) + super().__init__(**kwargs) self.name = name self.type = type self.value = value self.algorithm = algorithm -class ListBackups(msrest.serialization.Model): +class ListBackups(_serialization.Model): """List of restorable backups for a Cassandra cluster. Variables are only populated by the server, and will be ignored when sending a request. @@ -6796,24 +6627,20 @@ class ListBackups(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[BackupResource]'}, + "value": {"key": "value", "type": "[BackupResource]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(ListBackups, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class ListClusters(msrest.serialization.Model): +class ListClusters(_serialization.Model): """List of managed Cassandra clusters. :ivar value: Container for the array of clusters. @@ -6821,24 +6648,19 @@ class ListClusters(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[ClusterResource]'}, + "value": {"key": "value", "type": "[ClusterResource]"}, } - def __init__( - self, - *, - value: Optional[List["ClusterResource"]] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["_models.ClusterResource"]] = None, **kwargs): """ :keyword value: Container for the array of clusters. :paramtype value: list[~azure.mgmt.cosmosdb.models.ClusterResource] """ - super(ListClusters, self).__init__(**kwargs) + super().__init__(**kwargs) self.value = value -class ListDataCenters(msrest.serialization.Model): +class ListDataCenters(_serialization.Model): """List of managed Cassandra data centers and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -6848,24 +6670,20 @@ class ListDataCenters(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[DataCenterResource]'}, + "value": {"key": "value", "type": "[DataCenterResource]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(ListDataCenters, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class Location(msrest.serialization.Model): +class Location(_serialization.Model): """A region in which the Azure Cosmos DB database account is deployed. Variables are only populated by the server, and will be ignored when sending a request. @@ -6897,19 +6715,19 @@ class Location(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'failover_priority': {'minimum': 0}, + "id": {"readonly": True}, + "document_endpoint": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "failover_priority": {"minimum": 0}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - 'is_zone_redundant': {'key': 'isZoneRedundant', 'type': 'bool'}, + "id": {"key": "id", "type": "str"}, + "location_name": {"key": "locationName", "type": "str"}, + "document_endpoint": {"key": "documentEndpoint", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "failover_priority": {"key": "failoverPriority", "type": "int"}, + "is_zone_redundant": {"key": "isZoneRedundant", "type": "bool"}, } def __init__( @@ -6932,7 +6750,7 @@ def __init__( region. :paramtype is_zone_redundant: bool """ - super(Location, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = None self.location_name = location_name self.document_endpoint = None @@ -6957,33 +6775,28 @@ class LocationGetResult(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'LocationProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "LocationProperties"}, } - def __init__( - self, - *, - properties: Optional["LocationProperties"] = None, - **kwargs - ): + def __init__(self, *, properties: Optional["_models.LocationProperties"] = None, **kwargs): """ :keyword properties: Cosmos DB location metadata. :paramtype properties: ~azure.mgmt.cosmosdb.models.LocationProperties """ - super(LocationGetResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.properties = properties -class LocationListResult(msrest.serialization.Model): +class LocationListResult(_serialization.Model): """The List operation response, that contains Cosmos DB locations and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -6993,24 +6806,20 @@ class LocationListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[LocationGetResult]'}, + "value": {"key": "value", "type": "[LocationGetResult]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(LocationListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class LocationProperties(msrest.serialization.Model): +class LocationProperties(_serialization.Model): """Cosmos DB location metadata. Variables are only populated by the server, and will be ignored when sending a request. @@ -7028,33 +6837,29 @@ class LocationProperties(msrest.serialization.Model): """ _validation = { - 'status': {'readonly': True}, - 'supports_availability_zone': {'readonly': True}, - 'is_residency_restricted': {'readonly': True}, - 'backup_storage_redundancies': {'readonly': True}, + "status": {"readonly": True}, + "supports_availability_zone": {"readonly": True}, + "is_residency_restricted": {"readonly": True}, + "backup_storage_redundancies": {"readonly": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'supports_availability_zone': {'key': 'supportsAvailabilityZone', 'type': 'bool'}, - 'is_residency_restricted': {'key': 'isResidencyRestricted', 'type': 'bool'}, - 'backup_storage_redundancies': {'key': 'backupStorageRedundancies', 'type': '[str]'}, + "status": {"key": "status", "type": "str"}, + "supports_availability_zone": {"key": "supportsAvailabilityZone", "type": "bool"}, + "is_residency_restricted": {"key": "isResidencyRestricted", "type": "bool"}, + "backup_storage_redundancies": {"key": "backupStorageRedundancies", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(LocationProperties, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.status = None self.supports_availability_zone = None self.is_residency_restricted = None self.backup_storage_redundancies = None -class ManagedCassandraManagedServiceIdentity(msrest.serialization.Model): +class ManagedCassandraManagedServiceIdentity(_serialization.Model): """Identity for the resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -7063,38 +6868,33 @@ class ManagedCassandraManagedServiceIdentity(msrest.serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant id of the resource. :vartype tenant_id: str - :ivar type: The type of the resource. Possible values include: "SystemAssigned", "None". + :ivar type: The type of the resource. Known values are: "SystemAssigned" and "None". :vartype type: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraResourceIdentityType """ _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, + "principal_id": {"readonly": True}, + "tenant_id": {"readonly": True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "principal_id": {"key": "principalId", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - *, - type: Optional[Union[str, "ManagedCassandraResourceIdentityType"]] = None, - **kwargs - ): + def __init__(self, *, type: Optional[Union[str, "_models.ManagedCassandraResourceIdentityType"]] = None, **kwargs): """ - :keyword type: The type of the resource. Possible values include: "SystemAssigned", "None". + :keyword type: The type of the resource. Known values are: "SystemAssigned" and "None". :paramtype type: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraResourceIdentityType """ - super(ManagedCassandraManagedServiceIdentity, self).__init__(**kwargs) + super().__init__(**kwargs) self.principal_id = None self.tenant_id = None self.type = type -class ManagedCassandraReaperStatus(msrest.serialization.Model): +class ManagedCassandraReaperStatus(_serialization.Model): """ManagedCassandraReaperStatus. :ivar healthy: @@ -7106,9 +6906,9 @@ class ManagedCassandraReaperStatus(msrest.serialization.Model): """ _attribute_map = { - 'healthy': {'key': 'healthy', 'type': 'bool'}, - 'repair_run_ids': {'key': 'repairRunIds', 'type': '{str}'}, - 'repair_schedules': {'key': 'repairSchedules', 'type': '{str}'}, + "healthy": {"key": "healthy", "type": "bool"}, + "repair_run_ids": {"key": "repairRunIds", "type": "{str}"}, + "repair_schedules": {"key": "repairSchedules", "type": "{str}"}, } def __init__( @@ -7127,13 +6927,13 @@ def __init__( :keyword repair_schedules: Dictionary of :code:``. :paramtype repair_schedules: dict[str, str] """ - super(ManagedCassandraReaperStatus, self).__init__(**kwargs) + super().__init__(**kwargs) self.healthy = healthy self.repair_run_ids = repair_run_ids self.repair_schedules = repair_schedules -class ManagedServiceIdentity(msrest.serialization.Model): +class ManagedServiceIdentity(_serialization.Model): """Identity for the resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -7146,54 +6946,85 @@ class ManagedServiceIdentity(msrest.serialization.Model): :vartype tenant_id: str :ivar type: The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type - 'None' will remove any identities from the service. Possible values include: "SystemAssigned", - "UserAssigned", "SystemAssigned,UserAssigned", "None". + 'None' will remove any identities from the service. Known values are: "SystemAssigned", + "UserAssigned", "SystemAssigned,UserAssigned", and "None". :vartype type: str or ~azure.mgmt.cosmosdb.models.ResourceIdentityType :ivar user_assigned_identities: The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :vartype user_assigned_identities: dict[str, - ~azure.mgmt.cosmosdb.models.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties] + ~azure.mgmt.cosmosdb.models.ManagedServiceIdentityUserAssignedIdentity] """ _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, + "principal_id": {"readonly": True}, + "tenant_id": {"readonly": True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties}'}, + "principal_id": {"key": "principalId", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "user_assigned_identities": { + "key": "userAssignedIdentities", + "type": "{ManagedServiceIdentityUserAssignedIdentity}", + }, } def __init__( self, *, - type: Optional[Union[str, "ResourceIdentityType"]] = None, - user_assigned_identities: Optional[Dict[str, "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None, + type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "_models.ManagedServiceIdentityUserAssignedIdentity"]] = None, **kwargs ): """ :keyword type: The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user - assigned identities. The type 'None' will remove any identities from the service. Possible - values include: "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned", "None". + assigned identities. The type 'None' will remove any identities from the service. Known values + are: "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned", and "None". :paramtype type: str or ~azure.mgmt.cosmosdb.models.ResourceIdentityType :keyword user_assigned_identities: The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :paramtype user_assigned_identities: dict[str, - ~azure.mgmt.cosmosdb.models.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties] + ~azure.mgmt.cosmosdb.models.ManagedServiceIdentityUserAssignedIdentity] """ - super(ManagedServiceIdentity, self).__init__(**kwargs) + super().__init__(**kwargs) self.principal_id = None self.tenant_id = None self.type = type self.user_assigned_identities = user_assigned_identities +class ManagedServiceIdentityUserAssignedIdentity(_serialization.Model): + """ManagedServiceIdentityUserAssignedIdentity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + "principal_id": {"readonly": True}, + "client_id": {"readonly": True}, + } + + _attribute_map = { + "principal_id": {"key": "principalId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + } + + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.principal_id = None + self.client_id = None + + class MaterializedViewsBuilderRegionalServiceResource(RegionalServiceResource): """Resource for a regional service location. @@ -7203,33 +7034,29 @@ class MaterializedViewsBuilderRegionalServiceResource(RegionalServiceResource): :vartype name: str :ivar location: The location name. :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". + :ivar status: Describes the status of a service. Known values are: "Creating", "Running", + "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus """ _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, + "name": {"readonly": True}, + "location": {"readonly": True}, + "status": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(MaterializedViewsBuilderRegionalServiceResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) -class MaterializedViewsBuilderServiceResource(msrest.serialization.Model): +class MaterializedViewsBuilderServiceResource(_serialization.Model): """Describes the service response property for MaterializedViewsBuilder. :ivar properties: Properties for MaterializedViewsBuilderServiceResource. @@ -7238,21 +7065,18 @@ class MaterializedViewsBuilderServiceResource(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'MaterializedViewsBuilderServiceResourceProperties'}, + "properties": {"key": "properties", "type": "MaterializedViewsBuilderServiceResourceProperties"}, } def __init__( - self, - *, - properties: Optional["MaterializedViewsBuilderServiceResourceProperties"] = None, - **kwargs + self, *, properties: Optional["_models.MaterializedViewsBuilderServiceResourceProperties"] = None, **kwargs ): """ :keyword properties: Properties for MaterializedViewsBuilderServiceResource. :paramtype properties: ~azure.mgmt.cosmosdb.models.MaterializedViewsBuilderServiceResourceProperties """ - super(MaterializedViewsBuilderServiceResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.properties = properties @@ -7265,20 +7089,19 @@ class MaterializedViewsBuilderServiceResourceProperties(ServiceResourcePropertie :ivar additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] + :vartype additional_properties: dict[str, JSON] :ivar creation_time: Time of the last state change (ISO-8601 format). :vartype creation_time: ~datetime.datetime - :ivar instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". + :ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s", + "Cosmos.D8s", and "Cosmos.D16s". :vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :ivar instance_count: Instance count for the service. :vartype instance_count: int - :ivar service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", - "MaterializedViewsBuilder". + :ivar service_type: ServiceType for the service. Required. Known values are: + "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder". :vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". + :ivar status: Describes the status of a service. Known values are: "Creating", "Running", + "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus :ivar locations: An array that contains all of the locations for the service. :vartype locations: @@ -7286,47 +7109,52 @@ class MaterializedViewsBuilderServiceResourceProperties(ServiceResourcePropertie """ _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, + "creation_time": {"readonly": True}, + "instance_count": {"minimum": 0}, + "service_type": {"required": True}, + "status": {"readonly": True}, + "locations": {"readonly": True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[MaterializedViewsBuilderRegionalServiceResource]'}, + "additional_properties": {"key": "", "type": "{object}"}, + "creation_time": {"key": "creationTime", "type": "iso-8601"}, + "instance_size": {"key": "instanceSize", "type": "str"}, + "instance_count": {"key": "instanceCount", "type": "int"}, + "service_type": {"key": "serviceType", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "locations": {"key": "locations", "type": "[MaterializedViewsBuilderRegionalServiceResource]"}, } def __init__( self, *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, + additional_properties: Optional[Dict[str, JSON]] = None, + instance_size: Optional[Union[str, "_models.ServiceSize"]] = None, instance_count: Optional[int] = None, **kwargs ): """ :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :paramtype additional_properties: dict[str, any] - :keyword instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". + :paramtype additional_properties: dict[str, JSON] + :keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s", + "Cosmos.D8s", and "Cosmos.D16s". :paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :keyword instance_count: Instance count for the service. :paramtype instance_count: int """ - super(MaterializedViewsBuilderServiceResourceProperties, self).__init__(additional_properties=additional_properties, instance_size=instance_size, instance_count=instance_count, **kwargs) - self.service_type = 'MaterializedViewsBuilder' # type: str + super().__init__( + additional_properties=additional_properties, + instance_size=instance_size, + instance_count=instance_count, + **kwargs + ) + self.service_type = "MaterializedViewsBuilder" # type: str self.locations = None -class MergeParameters(msrest.serialization.Model): +class MergeParameters(_serialization.Model): """The properties of an Azure Cosmos DB merge operations. :ivar is_dry_run: Specifies whether the operation is a real merge operation or a simulation. @@ -7334,24 +7162,19 @@ class MergeParameters(msrest.serialization.Model): """ _attribute_map = { - 'is_dry_run': {'key': 'isDryRun', 'type': 'bool'}, + "is_dry_run": {"key": "isDryRun", "type": "bool"}, } - def __init__( - self, - *, - is_dry_run: Optional[bool] = None, - **kwargs - ): + def __init__(self, *, is_dry_run: Optional[bool] = None, **kwargs): """ :keyword is_dry_run: Specifies whether the operation is a real merge operation or a simulation. :paramtype is_dry_run: bool """ - super(MergeParameters, self).__init__(**kwargs) + super().__init__(**kwargs) self.is_dry_run = is_dry_run -class Metric(msrest.serialization.Model): +class Metric(_serialization.Model): """Metric data. Variables are only populated by the server, and will be ignored when sending a request. @@ -7362,8 +7185,8 @@ class Metric(msrest.serialization.Model): :vartype end_time: ~datetime.datetime :ivar time_grain: The time grain to be used to summarize the metric values. :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: "Count", "Bytes", "Seconds", - "Percent", "CountPerSecond", "BytesPerSecond", "Milliseconds". + :ivar unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "Percent", + "CountPerSecond", "BytesPerSecond", and "Milliseconds". :vartype unit: str or ~azure.mgmt.cosmosdb.models.UnitType :ivar name: The name information for the metric. :vartype name: ~azure.mgmt.cosmosdb.models.MetricName @@ -7372,30 +7195,26 @@ class Metric(msrest.serialization.Model): """ _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, + "start_time": {"readonly": True}, + "end_time": {"readonly": True}, + "time_grain": {"readonly": True}, + "unit": {"readonly": True}, + "name": {"readonly": True}, + "metric_values": {"readonly": True}, } _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + "start_time": {"key": "startTime", "type": "iso-8601"}, + "end_time": {"key": "endTime", "type": "iso-8601"}, + "time_grain": {"key": "timeGrain", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "name": {"key": "name", "type": "MetricName"}, + "metric_values": {"key": "metricValues", "type": "[MetricValue]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(Metric, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.start_time = None self.end_time = None self.time_grain = None @@ -7404,7 +7223,7 @@ def __init__( self.metric_values = None -class MetricAvailability(msrest.serialization.Model): +class MetricAvailability(_serialization.Model): """The availability of the metric. Variables are only populated by the server, and will be ignored when sending a request. @@ -7416,38 +7235,34 @@ class MetricAvailability(msrest.serialization.Model): """ _validation = { - 'time_grain': {'readonly': True}, - 'retention': {'readonly': True}, + "time_grain": {"readonly": True}, + "retention": {"readonly": True}, } _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'retention': {'key': 'retention', 'type': 'str'}, + "time_grain": {"key": "timeGrain", "type": "str"}, + "retention": {"key": "retention", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(MetricAvailability, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.time_grain = None self.retention = None -class MetricDefinition(msrest.serialization.Model): +class MetricDefinition(_serialization.Model): """The definition of a metric. Variables are only populated by the server, and will be ignored when sending a request. :ivar metric_availabilities: The list of metric availabilities for the account. :vartype metric_availabilities: list[~azure.mgmt.cosmosdb.models.MetricAvailability] - :ivar primary_aggregation_type: The primary aggregation type of the metric. Possible values - include: "None", "Average", "Total", "Minimum", "Maximum", "Last". + :ivar primary_aggregation_type: The primary aggregation type of the metric. Known values are: + "None", "Average", "Total", "Minimum", "Maximum", and "Last". :vartype primary_aggregation_type: str or ~azure.mgmt.cosmosdb.models.PrimaryAggregationType - :ivar unit: The unit of the metric. Possible values include: "Count", "Bytes", "Seconds", - "Percent", "CountPerSecond", "BytesPerSecond", "Milliseconds". + :ivar unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "Percent", + "CountPerSecond", "BytesPerSecond", and "Milliseconds". :vartype unit: str or ~azure.mgmt.cosmosdb.models.UnitType :ivar resource_uri: The resource uri of the database. :vartype resource_uri: str @@ -7456,28 +7271,24 @@ class MetricDefinition(msrest.serialization.Model): """ _validation = { - 'metric_availabilities': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'unit': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'name': {'readonly': True}, + "metric_availabilities": {"readonly": True}, + "primary_aggregation_type": {"readonly": True}, + "unit": {"readonly": True}, + "resource_uri": {"readonly": True}, + "name": {"readonly": True}, } _attribute_map = { - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, + "metric_availabilities": {"key": "metricAvailabilities", "type": "[MetricAvailability]"}, + "primary_aggregation_type": {"key": "primaryAggregationType", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "resource_uri": {"key": "resourceUri", "type": "str"}, + "name": {"key": "name", "type": "MetricName"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(MetricDefinition, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.metric_availabilities = None self.primary_aggregation_type = None self.unit = None @@ -7485,7 +7296,7 @@ def __init__( self.name = None -class MetricDefinitionsListResult(msrest.serialization.Model): +class MetricDefinitionsListResult(_serialization.Model): """The response to a list metric definitions request. Variables are only populated by the server, and will be ignored when sending a request. @@ -7495,24 +7306,20 @@ class MetricDefinitionsListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[MetricDefinition]'}, + "value": {"key": "value", "type": "[MetricDefinition]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(MetricDefinitionsListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class MetricListResult(msrest.serialization.Model): +class MetricListResult(_serialization.Model): """The response to a list metrics request. Variables are only populated by the server, and will be ignored when sending a request. @@ -7522,24 +7329,20 @@ class MetricListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[Metric]'}, + "value": {"key": "value", "type": "[Metric]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(MetricListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class MetricName(msrest.serialization.Model): +class MetricName(_serialization.Model): """A metric name. Variables are only populated by the server, and will be ignored when sending a request. @@ -7551,27 +7354,23 @@ class MetricName(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, + "value": {"readonly": True}, + "localized_value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + "value": {"key": "value", "type": "str"}, + "localized_value": {"key": "localizedValue", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(MetricName, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None self.localized_value = None -class MetricValue(msrest.serialization.Model): +class MetricValue(_serialization.Model): """Represents metrics values. Variables are only populated by the server, and will be ignored when sending a request. @@ -7591,30 +7390,26 @@ class MetricValue(msrest.serialization.Model): """ _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, + "count": {"readonly": True}, + "average": {"readonly": True}, + "maximum": {"readonly": True}, + "minimum": {"readonly": True}, + "timestamp": {"readonly": True}, + "total": {"readonly": True}, } _attribute_map = { - 'count': {'key': '_count', 'type': 'int'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, + "count": {"key": "_count", "type": "int"}, + "average": {"key": "average", "type": "float"}, + "maximum": {"key": "maximum", "type": "float"}, + "minimum": {"key": "minimum", "type": "float"}, + "timestamp": {"key": "timestamp", "type": "iso-8601"}, + "total": {"key": "total", "type": "float"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(MetricValue, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.count = None self.average = None self.maximum = None @@ -7638,16 +7433,16 @@ class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a MongoDB collection. + :ivar resource: The standard JSON format of a MongoDB collection. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -7655,52 +7450,52 @@ class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "MongoDBCollectionResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "MongoDBCollectionResource", + resource: "_models.MongoDBCollectionResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a MongoDB collection. + :keyword resource: The standard JSON format of a MongoDB collection. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(MongoDBCollectionCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options @@ -7716,15 +7511,15 @@ class MongoDBCollectionGetPropertiesOptions(OptionsResource): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -7734,15 +7529,15 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(MongoDBCollectionGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super().__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) -class MongoDBCollectionResource(msrest.serialization.Model): +class MongoDBCollectionResource(_serialization.Model): """Cosmos DB MongoDB collection resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB MongoDB collection. + :ivar id: Name of the Cosmos DB MongoDB collection. Required. :vartype id: str :ivar shard_key: A key-value pair of shard keys to be applied for the request. :vartype shard_key: dict[str, str] @@ -7750,30 +7545,39 @@ class MongoDBCollectionResource(msrest.serialization.Model): :vartype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] :ivar analytical_storage_ttl: Analytical TTL. :vartype analytical_storage_ttl: int + :ivar restore_parameters: Parameters to indicate the information about the restore. + :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" + and "Restore". + :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'shard_key': {'key': 'shardKey', 'type': '{str}'}, - 'indexes': {'key': 'indexes', 'type': '[MongoIndex]'}, - 'analytical_storage_ttl': {'key': 'analyticalStorageTtl', 'type': 'int'}, + "id": {"key": "id", "type": "str"}, + "shard_key": {"key": "shardKey", "type": "{str}"}, + "indexes": {"key": "indexes", "type": "[MongoIndex]"}, + "analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"}, + "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, + "create_mode": {"key": "createMode", "type": "str"}, } def __init__( self, *, - id: str, + id: str, # pylint: disable=redefined-builtin shard_key: Optional[Dict[str, str]] = None, - indexes: Optional[List["MongoIndex"]] = None, + indexes: Optional[List["_models.MongoIndex"]] = None, analytical_storage_ttl: Optional[int] = None, + restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, + create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB MongoDB collection. + :keyword id: Name of the Cosmos DB MongoDB collection. Required. :paramtype id: str :keyword shard_key: A key-value pair of shard keys to be applied for the request. :paramtype shard_key: dict[str, str] @@ -7781,29 +7585,28 @@ def __init__( :paramtype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: int + :keyword restore_parameters: Parameters to indicate the information about the restore. + :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: + "Default" and "Restore". + :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ - super(MongoDBCollectionResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id self.shard_key = shard_key self.indexes = indexes self.analytical_storage_ttl = analytical_storage_ttl + self.restore_parameters = restore_parameters + self.create_mode = create_mode -class MongoDBCollectionGetPropertiesResource(ExtendedResourceProperties, MongoDBCollectionResource): +class MongoDBCollectionGetPropertiesResource(MongoDBCollectionResource, ExtendedResourceProperties): """MongoDBCollectionGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB MongoDB collection. - :vartype id: str - :ivar shard_key: A key-value pair of shard keys to be applied for the request. - :vartype shard_key: dict[str, str] - :ivar indexes: List of index keys. - :vartype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] - :ivar analytical_storage_ttl: Analytical TTL. - :vartype analytical_storage_ttl: int :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -7811,36 +7614,53 @@ class MongoDBCollectionGetPropertiesResource(ExtendedResourceProperties, MongoDB :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :ivar id: Name of the Cosmos DB MongoDB collection. Required. + :vartype id: str + :ivar shard_key: A key-value pair of shard keys to be applied for the request. + :vartype shard_key: dict[str, str] + :ivar indexes: List of index keys. + :vartype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] + :ivar analytical_storage_ttl: Analytical TTL. + :vartype analytical_storage_ttl: int + :ivar restore_parameters: Parameters to indicate the information about the restore. + :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" + and "Restore". + :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ _validation = { - 'id': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'shard_key': {'key': 'shardKey', 'type': '{str}'}, - 'indexes': {'key': 'indexes', 'type': '[MongoIndex]'}, - 'analytical_storage_ttl': {'key': 'analyticalStorageTtl', 'type': 'int'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "shard_key": {"key": "shardKey", "type": "{str}"}, + "indexes": {"key": "indexes", "type": "[MongoIndex]"}, + "analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"}, + "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, + "create_mode": {"key": "createMode", "type": "str"}, } def __init__( self, *, - id: str, + id: str, # pylint: disable=redefined-builtin shard_key: Optional[Dict[str, str]] = None, - indexes: Optional[List["MongoIndex"]] = None, + indexes: Optional[List["_models.MongoIndex"]] = None, analytical_storage_ttl: Optional[int] = None, + restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, + create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB MongoDB collection. + :keyword id: Name of the Cosmos DB MongoDB collection. Required. :paramtype id: str :keyword shard_key: A key-value pair of shard keys to be applied for the request. :paramtype shard_key: dict[str, str] @@ -7848,15 +7668,30 @@ def __init__( :paramtype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: int + :keyword restore_parameters: Parameters to indicate the information about the restore. + :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: + "Default" and "Restore". + :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ - super(MongoDBCollectionGetPropertiesResource, self).__init__(id=id, shard_key=shard_key, indexes=indexes, analytical_storage_ttl=analytical_storage_ttl, **kwargs) + super().__init__( + id=id, + shard_key=shard_key, + indexes=indexes, + analytical_storage_ttl=analytical_storage_ttl, + restore_parameters=restore_parameters, + create_mode=create_mode, + **kwargs + ) + self.rid = None + self.ts = None + self.etag = None self.id = id self.shard_key = shard_key self.indexes = indexes self.analytical_storage_ttl = analytical_storage_ttl - self.rid = None - self.ts = None - self.etag = None + self.restore_parameters = restore_parameters + self.create_mode = create_mode class MongoDBCollectionGetResults(ARMResourceProperties): @@ -7872,12 +7707,12 @@ class MongoDBCollectionGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -7888,20 +7723,20 @@ class MongoDBCollectionGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'MongoDBCollectionGetPropertiesOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "MongoDBCollectionGetPropertiesResource"}, + "options": {"key": "properties.options", "type": "MongoDBCollectionGetPropertiesOptions"}, } def __init__( @@ -7909,20 +7744,20 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["MongoDBCollectionGetPropertiesResource"] = None, - options: Optional["MongoDBCollectionGetPropertiesOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.MongoDBCollectionGetPropertiesResource"] = None, + options: Optional["_models.MongoDBCollectionGetPropertiesOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -7931,12 +7766,12 @@ def __init__( :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesOptions """ - super(MongoDBCollectionGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class MongoDBCollectionListResult(msrest.serialization.Model): +class MongoDBCollectionListResult(_serialization.Model): """The List operation response, that contains the MongoDB collections and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -7946,20 +7781,16 @@ class MongoDBCollectionListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[MongoDBCollectionGetResults]'}, + "value": {"key": "value", "type": "[MongoDBCollectionGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(MongoDBCollectionListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None @@ -7978,16 +7809,16 @@ class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a MongoDB database. + :ivar resource: The standard JSON format of a MongoDB database. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -7995,52 +7826,52 @@ class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "MongoDBDatabaseResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "MongoDBDatabaseResource", + resource: "_models.MongoDBDatabaseResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a MongoDB database. + :keyword resource: The standard JSON format of a MongoDB database. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(MongoDBDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options @@ -8056,15 +7887,15 @@ class MongoDBDatabaseGetPropertiesOptions(OptionsResource): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -8074,49 +7905,63 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(MongoDBDatabaseGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super().__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) -class MongoDBDatabaseResource(msrest.serialization.Model): +class MongoDBDatabaseResource(_serialization.Model): """Cosmos DB MongoDB database resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB MongoDB database. + :ivar id: Name of the Cosmos DB MongoDB database. Required. :vartype id: str + :ivar restore_parameters: Parameters to indicate the information about the restore. + :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" + and "Restore". + :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, + "create_mode": {"key": "createMode", "type": "str"}, } def __init__( self, *, - id: str, + id: str, # pylint: disable=redefined-builtin + restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, + create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB MongoDB database. + :keyword id: Name of the Cosmos DB MongoDB database. Required. :paramtype id: str + :keyword restore_parameters: Parameters to indicate the information about the restore. + :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: + "Default" and "Restore". + :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ - super(MongoDBDatabaseResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id + self.restore_parameters = restore_parameters + self.create_mode = create_mode -class MongoDBDatabaseGetPropertiesResource(ExtendedResourceProperties, MongoDBDatabaseResource): +class MongoDBDatabaseGetPropertiesResource(MongoDBDatabaseResource, ExtendedResourceProperties): """MongoDBDatabaseGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB MongoDB database. - :vartype id: str :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -8124,37 +7969,55 @@ class MongoDBDatabaseGetPropertiesResource(ExtendedResourceProperties, MongoDBDa :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :ivar id: Name of the Cosmos DB MongoDB database. Required. + :vartype id: str + :ivar restore_parameters: Parameters to indicate the information about the restore. + :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" + and "Restore". + :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ _validation = { - 'id': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, + "create_mode": {"key": "createMode", "type": "str"}, } def __init__( self, *, - id: str, + id: str, # pylint: disable=redefined-builtin + restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, + create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB MongoDB database. + :keyword id: Name of the Cosmos DB MongoDB database. Required. :paramtype id: str + :keyword restore_parameters: Parameters to indicate the information about the restore. + :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: + "Default" and "Restore". + :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ - super(MongoDBDatabaseGetPropertiesResource, self).__init__(id=id, **kwargs) - self.id = id + super().__init__(id=id, restore_parameters=restore_parameters, create_mode=create_mode, **kwargs) self.rid = None self.ts = None self.etag = None + self.id = id + self.restore_parameters = restore_parameters + self.create_mode = create_mode class MongoDBDatabaseGetResults(ARMResourceProperties): @@ -8170,12 +8033,12 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -8186,20 +8049,20 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'MongoDBDatabaseGetPropertiesOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "MongoDBDatabaseGetPropertiesResource"}, + "options": {"key": "properties.options", "type": "MongoDBDatabaseGetPropertiesOptions"}, } def __init__( @@ -8207,20 +8070,20 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["MongoDBDatabaseGetPropertiesResource"] = None, - options: Optional["MongoDBDatabaseGetPropertiesOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.MongoDBDatabaseGetPropertiesResource"] = None, + options: Optional["_models.MongoDBDatabaseGetPropertiesOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -8229,12 +8092,12 @@ def __init__( :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesOptions """ - super(MongoDBDatabaseGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class MongoDBDatabaseListResult(msrest.serialization.Model): +class MongoDBDatabaseListResult(_serialization.Model): """The List operation response, that contains the MongoDB databases and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -8244,24 +8107,20 @@ class MongoDBDatabaseListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[MongoDBDatabaseGetResults]'}, + "value": {"key": "value", "type": "[MongoDBDatabaseGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(MongoDBDatabaseListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class MongoIndex(msrest.serialization.Model): +class MongoIndex(_serialization.Model): """Cosmos DB MongoDB collection index key. :ivar key: Cosmos DB MongoDB collection index keys. @@ -8271,15 +8130,15 @@ class MongoIndex(msrest.serialization.Model): """ _attribute_map = { - 'key': {'key': 'key', 'type': 'MongoIndexKeys'}, - 'options': {'key': 'options', 'type': 'MongoIndexOptions'}, + "key": {"key": "key", "type": "MongoIndexKeys"}, + "options": {"key": "options", "type": "MongoIndexOptions"}, } def __init__( self, *, - key: Optional["MongoIndexKeys"] = None, - options: Optional["MongoIndexOptions"] = None, + key: Optional["_models.MongoIndexKeys"] = None, + options: Optional["_models.MongoIndexOptions"] = None, **kwargs ): """ @@ -8288,12 +8147,12 @@ def __init__( :keyword options: Cosmos DB MongoDB collection index key options. :paramtype options: ~azure.mgmt.cosmosdb.models.MongoIndexOptions """ - super(MongoIndex, self).__init__(**kwargs) + super().__init__(**kwargs) self.key = key self.options = options -class MongoIndexKeys(msrest.serialization.Model): +class MongoIndexKeys(_serialization.Model): """Cosmos DB MongoDB collection resource object. :ivar keys: List of keys for each MongoDB collection in the Azure Cosmos DB service. @@ -8301,24 +8160,19 @@ class MongoIndexKeys(msrest.serialization.Model): """ _attribute_map = { - 'keys': {'key': 'keys', 'type': '[str]'}, + "keys": {"key": "keys", "type": "[str]"}, } - def __init__( - self, - *, - keys: Optional[List[str]] = None, - **kwargs - ): + def __init__(self, *, keys: Optional[List[str]] = None, **kwargs): """ :keyword keys: List of keys for each MongoDB collection in the Azure Cosmos DB service. :paramtype keys: list[str] """ - super(MongoIndexKeys, self).__init__(**kwargs) + super().__init__(**kwargs) self.keys = keys -class MongoIndexOptions(msrest.serialization.Model): +class MongoIndexOptions(_serialization.Model): """Cosmos DB MongoDB collection index options. :ivar expire_after_seconds: Expire after seconds. @@ -8328,36 +8182,30 @@ class MongoIndexOptions(msrest.serialization.Model): """ _attribute_map = { - 'expire_after_seconds': {'key': 'expireAfterSeconds', 'type': 'int'}, - 'unique': {'key': 'unique', 'type': 'bool'}, + "expire_after_seconds": {"key": "expireAfterSeconds", "type": "int"}, + "unique": {"key": "unique", "type": "bool"}, } - def __init__( - self, - *, - expire_after_seconds: Optional[int] = None, - unique: Optional[bool] = None, - **kwargs - ): + def __init__(self, *, expire_after_seconds: Optional[int] = None, unique: Optional[bool] = None, **kwargs): """ :keyword expire_after_seconds: Expire after seconds. :paramtype expire_after_seconds: int :keyword unique: Is unique or not. :paramtype unique: bool """ - super(MongoIndexOptions, self).__init__(**kwargs) + super().__init__(**kwargs) self.expire_after_seconds = expire_after_seconds self.unique = unique -class MongoRoleDefinitionCreateUpdateParameters(msrest.serialization.Model): +class MongoRoleDefinitionCreateUpdateParameters(_serialization.Model): """Parameters to create and update an Azure Cosmos DB Mongo Role Definition. :ivar role_name: A user-friendly name for the Role Definition. Must be unique for the database account. :vartype role_name: str - :ivar type: Indicates whether the Role Definition was built-in or user created. Possible values - include: "BuiltInRole", "CustomRole". + :ivar type: Indicates whether the Role Definition was built-in or user created. Known values + are: "BuiltInRole" and "CustomRole". :vartype type: str or ~azure.mgmt.cosmosdb.models.MongoRoleDefinitionType :ivar database_name: The database name for which access is being granted for this Role Definition. @@ -8371,29 +8219,29 @@ class MongoRoleDefinitionCreateUpdateParameters(msrest.serialization.Model): """ _attribute_map = { - 'role_name': {'key': 'properties.roleName', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'privileges': {'key': 'properties.privileges', 'type': '[Privilege]'}, - 'roles': {'key': 'properties.roles', 'type': '[Role]'}, + "role_name": {"key": "properties.roleName", "type": "str"}, + "type": {"key": "properties.type", "type": "str"}, + "database_name": {"key": "properties.databaseName", "type": "str"}, + "privileges": {"key": "properties.privileges", "type": "[Privilege]"}, + "roles": {"key": "properties.roles", "type": "[Role]"}, } def __init__( self, *, role_name: Optional[str] = None, - type: Optional[Union[str, "MongoRoleDefinitionType"]] = None, + type: Optional[Union[str, "_models.MongoRoleDefinitionType"]] = None, database_name: Optional[str] = None, - privileges: Optional[List["Privilege"]] = None, - roles: Optional[List["Role"]] = None, + privileges: Optional[List["_models.Privilege"]] = None, + roles: Optional[List["_models.Role"]] = None, **kwargs ): """ :keyword role_name: A user-friendly name for the Role Definition. Must be unique for the database account. :paramtype role_name: str - :keyword type: Indicates whether the Role Definition was built-in or user created. Possible - values include: "BuiltInRole", "CustomRole". + :keyword type: Indicates whether the Role Definition was built-in or user created. Known values + are: "BuiltInRole" and "CustomRole". :paramtype type: str or ~azure.mgmt.cosmosdb.models.MongoRoleDefinitionType :keyword database_name: The database name for which access is being granted for this Role Definition. @@ -8405,7 +8253,7 @@ def __init__( :keyword roles: The set of roles inherited by this Role Definition. :paramtype roles: list[~azure.mgmt.cosmosdb.models.Role] """ - super(MongoRoleDefinitionCreateUpdateParameters, self).__init__(**kwargs) + super().__init__(**kwargs) self.role_name = role_name self.type = type self.database_name = database_name @@ -8428,7 +8276,7 @@ class MongoRoleDefinitionGetResults(ARMProxyResource): account. :vartype role_name: str :ivar type_properties_type: Indicates whether the Role Definition was built-in or user created. - Possible values include: "BuiltInRole", "CustomRole". + Known values are: "BuiltInRole" and "CustomRole". :vartype type_properties_type: str or ~azure.mgmt.cosmosdb.models.MongoRoleDefinitionType :ivar database_name: The database name for which access is being granted for this Role Definition. @@ -8442,30 +8290,30 @@ class MongoRoleDefinitionGetResults(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'role_name': {'key': 'properties.roleName', 'type': 'str'}, - 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'privileges': {'key': 'properties.privileges', 'type': '[Privilege]'}, - 'roles': {'key': 'properties.roles', 'type': '[Role]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "role_name": {"key": "properties.roleName", "type": "str"}, + "type_properties_type": {"key": "properties.type", "type": "str"}, + "database_name": {"key": "properties.databaseName", "type": "str"}, + "privileges": {"key": "properties.privileges", "type": "[Privilege]"}, + "roles": {"key": "properties.roles", "type": "[Role]"}, } def __init__( self, *, role_name: Optional[str] = None, - type_properties_type: Optional[Union[str, "MongoRoleDefinitionType"]] = None, + type_properties_type: Optional[Union[str, "_models.MongoRoleDefinitionType"]] = None, database_name: Optional[str] = None, - privileges: Optional[List["Privilege"]] = None, - roles: Optional[List["Role"]] = None, + privileges: Optional[List["_models.Privilege"]] = None, + roles: Optional[List["_models.Role"]] = None, **kwargs ): """ @@ -8473,7 +8321,7 @@ def __init__( database account. :paramtype role_name: str :keyword type_properties_type: Indicates whether the Role Definition was built-in or user - created. Possible values include: "BuiltInRole", "CustomRole". + created. Known values are: "BuiltInRole" and "CustomRole". :paramtype type_properties_type: str or ~azure.mgmt.cosmosdb.models.MongoRoleDefinitionType :keyword database_name: The database name for which access is being granted for this Role Definition. @@ -8485,7 +8333,7 @@ def __init__( :keyword roles: The set of roles inherited by this Role Definition. :paramtype roles: list[~azure.mgmt.cosmosdb.models.Role] """ - super(MongoRoleDefinitionGetResults, self).__init__(**kwargs) + super().__init__(**kwargs) self.role_name = role_name self.type_properties_type = type_properties_type self.database_name = database_name @@ -8493,7 +8341,7 @@ def __init__( self.roles = roles -class MongoRoleDefinitionListResult(msrest.serialization.Model): +class MongoRoleDefinitionListResult(_serialization.Model): """The relevant Mongo Role Definitions. Variables are only populated by the server, and will be ignored when sending a request. @@ -8503,24 +8351,20 @@ class MongoRoleDefinitionListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[MongoRoleDefinitionGetResults]'}, + "value": {"key": "value", "type": "[MongoRoleDefinitionGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(MongoRoleDefinitionListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class MongoUserDefinitionCreateUpdateParameters(msrest.serialization.Model): +class MongoUserDefinitionCreateUpdateParameters(_serialization.Model): """Parameters to create and update an Azure Cosmos DB Mongo User Definition. :ivar user_name: The user name for User Definition. @@ -8540,12 +8384,12 @@ class MongoUserDefinitionCreateUpdateParameters(msrest.serialization.Model): """ _attribute_map = { - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'custom_data': {'key': 'properties.customData', 'type': 'str'}, - 'roles': {'key': 'properties.roles', 'type': '[Role]'}, - 'mechanisms': {'key': 'properties.mechanisms', 'type': 'str'}, + "user_name": {"key": "properties.userName", "type": "str"}, + "password": {"key": "properties.password", "type": "str"}, + "database_name": {"key": "properties.databaseName", "type": "str"}, + "custom_data": {"key": "properties.customData", "type": "str"}, + "roles": {"key": "properties.roles", "type": "[Role]"}, + "mechanisms": {"key": "properties.mechanisms", "type": "str"}, } def __init__( @@ -8555,7 +8399,7 @@ def __init__( password: Optional[str] = None, database_name: Optional[str] = None, custom_data: Optional[str] = None, - roles: Optional[List["Role"]] = None, + roles: Optional[List["_models.Role"]] = None, mechanisms: Optional[str] = None, **kwargs ): @@ -8575,7 +8419,7 @@ def __init__( SCRAM-SHA-256. :paramtype mechanisms: str """ - super(MongoUserDefinitionCreateUpdateParameters, self).__init__(**kwargs) + super().__init__(**kwargs) self.user_name = user_name self.password = password self.database_name = database_name @@ -8612,21 +8456,21 @@ class MongoUserDefinitionGetResults(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'custom_data': {'key': 'properties.customData', 'type': 'str'}, - 'roles': {'key': 'properties.roles', 'type': '[Role]'}, - 'mechanisms': {'key': 'properties.mechanisms', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "user_name": {"key": "properties.userName", "type": "str"}, + "password": {"key": "properties.password", "type": "str"}, + "database_name": {"key": "properties.databaseName", "type": "str"}, + "custom_data": {"key": "properties.customData", "type": "str"}, + "roles": {"key": "properties.roles", "type": "[Role]"}, + "mechanisms": {"key": "properties.mechanisms", "type": "str"}, } def __init__( @@ -8636,7 +8480,7 @@ def __init__( password: Optional[str] = None, database_name: Optional[str] = None, custom_data: Optional[str] = None, - roles: Optional[List["Role"]] = None, + roles: Optional[List["_models.Role"]] = None, mechanisms: Optional[str] = None, **kwargs ): @@ -8656,7 +8500,7 @@ def __init__( SCRAM-SHA-256. :paramtype mechanisms: str """ - super(MongoUserDefinitionGetResults, self).__init__(**kwargs) + super().__init__(**kwargs) self.user_name = user_name self.password = password self.database_name = database_name @@ -8665,7 +8509,7 @@ def __init__( self.mechanisms = mechanisms -class MongoUserDefinitionListResult(msrest.serialization.Model): +class MongoUserDefinitionListResult(_serialization.Model): """The relevant User Definition. Variables are only populated by the server, and will be ignored when sending a request. @@ -8675,20 +8519,16 @@ class MongoUserDefinitionListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[MongoUserDefinitionGetResults]'}, + "value": {"key": "value", "type": "[MongoUserDefinitionGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(MongoUserDefinitionListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None @@ -8711,33 +8551,29 @@ class NotebookWorkspace(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'notebook_server_endpoint': {'readonly': True}, - 'status': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "notebook_server_endpoint": {"readonly": True}, + "status": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'notebook_server_endpoint': {'key': 'properties.notebookServerEndpoint', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "notebook_server_endpoint": {"key": "properties.notebookServerEndpoint", "type": "str"}, + "status": {"key": "properties.status", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(NotebookWorkspace, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.notebook_server_endpoint = None self.status = None -class NotebookWorkspaceConnectionInfoResult(msrest.serialization.Model): +class NotebookWorkspaceConnectionInfoResult(_serialization.Model): """The connection info for the given notebook workspace. Variables are only populated by the server, and will be ignored when sending a request. @@ -8750,22 +8586,18 @@ class NotebookWorkspaceConnectionInfoResult(msrest.serialization.Model): """ _validation = { - 'auth_token': {'readonly': True}, - 'notebook_server_endpoint': {'readonly': True}, + "auth_token": {"readonly": True}, + "notebook_server_endpoint": {"readonly": True}, } _attribute_map = { - 'auth_token': {'key': 'authToken', 'type': 'str'}, - 'notebook_server_endpoint': {'key': 'notebookServerEndpoint', 'type': 'str'}, + "auth_token": {"key": "authToken", "type": "str"}, + "notebook_server_endpoint": {"key": "notebookServerEndpoint", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(NotebookWorkspaceConnectionInfoResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.auth_token = None self.notebook_server_endpoint = None @@ -8784,27 +8616,23 @@ class NotebookWorkspaceCreateUpdateParameters(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(NotebookWorkspaceCreateUpdateParameters, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) -class NotebookWorkspaceListResult(msrest.serialization.Model): +class NotebookWorkspaceListResult(_serialization.Model): """A list of notebook workspace resources. :ivar value: Array of notebook workspace resources. @@ -8812,24 +8640,19 @@ class NotebookWorkspaceListResult(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[NotebookWorkspace]'}, + "value": {"key": "value", "type": "[NotebookWorkspace]"}, } - def __init__( - self, - *, - value: Optional[List["NotebookWorkspace"]] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["_models.NotebookWorkspace"]] = None, **kwargs): """ :keyword value: Array of notebook workspace resources. :paramtype value: list[~azure.mgmt.cosmosdb.models.NotebookWorkspace] """ - super(NotebookWorkspaceListResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.value = value -class Operation(msrest.serialization.Model): +class Operation(_serialization.Model): """REST API operation. :ivar name: Operation name: {provider}/{resource}/{operation}. @@ -8839,29 +8662,23 @@ class Operation(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, + "name": {"key": "name", "type": "str"}, + "display": {"key": "display", "type": "OperationDisplay"}, } - def __init__( - self, - *, - name: Optional[str] = None, - display: Optional["OperationDisplay"] = None, - **kwargs - ): + def __init__(self, *, name: Optional[str] = None, display: Optional["_models.OperationDisplay"] = None, **kwargs): """ :keyword name: Operation name: {provider}/{resource}/{operation}. :paramtype name: str :keyword display: The object that represents the operation. :paramtype display: ~azure.mgmt.cosmosdb.models.OperationDisplay """ - super(Operation, self).__init__(**kwargs) + super().__init__(**kwargs) self.name = name self.display = display -class OperationDisplay(msrest.serialization.Model): +class OperationDisplay(_serialization.Model): """The object that represents the operation. :ivar provider: Service provider: Microsoft.ResourceProvider. @@ -8875,10 +8692,10 @@ class OperationDisplay(msrest.serialization.Model): """ _attribute_map = { - 'provider': {'key': 'Provider', 'type': 'str'}, - 'resource': {'key': 'Resource', 'type': 'str'}, - 'operation': {'key': 'Operation', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, + "provider": {"key": "Provider", "type": "str"}, + "resource": {"key": "Resource", "type": "str"}, + "operation": {"key": "Operation", "type": "str"}, + "description": {"key": "Description", "type": "str"}, } def __init__( @@ -8900,14 +8717,14 @@ def __init__( :keyword description: Description of operation. :paramtype description: str """ - super(OperationDisplay, self).__init__(**kwargs) + super().__init__(**kwargs) self.provider = provider self.resource = resource self.operation = operation self.description = description -class OperationListResult(msrest.serialization.Model): +class OperationListResult(_serialization.Model): """Result of the request to list Resource Provider operations. It contains a list of operations and a URL link to get the next set of results. :ivar value: List of operations supported by the Resource Provider. @@ -8917,24 +8734,18 @@ class OperationListResult(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[Operation]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: Optional[List["Operation"]] = None, - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs): """ :keyword value: List of operations supported by the Resource Provider. :paramtype value: list[~azure.mgmt.cosmosdb.models.Operation] :keyword next_link: URL to get the next set of operation list results if there are any. :paramtype next_link: str """ - super(OperationListResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.value = value self.next_link = next_link @@ -8950,8 +8761,8 @@ class PartitionMetric(Metric): :vartype end_time: ~datetime.datetime :ivar time_grain: The time grain to be used to summarize the metric values. :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: "Count", "Bytes", "Seconds", - "Percent", "CountPerSecond", "BytesPerSecond", "Milliseconds". + :ivar unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "Percent", + "CountPerSecond", "BytesPerSecond", and "Milliseconds". :vartype unit: str or ~azure.mgmt.cosmosdb.models.UnitType :ivar name: The name information for the metric. :vartype name: ~azure.mgmt.cosmosdb.models.MetricName @@ -8965,39 +8776,35 @@ class PartitionMetric(Metric): """ _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - 'partition_id': {'readonly': True}, - 'partition_key_range_id': {'readonly': True}, + "start_time": {"readonly": True}, + "end_time": {"readonly": True}, + "time_grain": {"readonly": True}, + "unit": {"readonly": True}, + "name": {"readonly": True}, + "metric_values": {"readonly": True}, + "partition_id": {"readonly": True}, + "partition_key_range_id": {"readonly": True}, } _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - 'partition_id': {'key': 'partitionId', 'type': 'str'}, - 'partition_key_range_id': {'key': 'partitionKeyRangeId', 'type': 'str'}, + "start_time": {"key": "startTime", "type": "iso-8601"}, + "end_time": {"key": "endTime", "type": "iso-8601"}, + "time_grain": {"key": "timeGrain", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "name": {"key": "name", "type": "MetricName"}, + "metric_values": {"key": "metricValues", "type": "[MetricValue]"}, + "partition_id": {"key": "partitionId", "type": "str"}, + "partition_key_range_id": {"key": "partitionKeyRangeId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(PartitionMetric, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.partition_id = None self.partition_key_range_id = None -class PartitionMetricListResult(msrest.serialization.Model): +class PartitionMetricListResult(_serialization.Model): """The response to a list partition metrics request. Variables are only populated by the server, and will be ignored when sending a request. @@ -9007,64 +8814,56 @@ class PartitionMetricListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[PartitionMetric]'}, + "value": {"key": "value", "type": "[PartitionMetric]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(PartitionMetricListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class Usage(msrest.serialization.Model): +class Usage(_serialization.Model): """The usage data for a usage request. Variables are only populated by the server, and will be ignored when sending a request. - :ivar unit: The unit of the metric. Possible values include: "Count", "Bytes", "Seconds", - "Percent", "CountPerSecond", "BytesPerSecond", "Milliseconds". + :ivar unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "Percent", + "CountPerSecond", "BytesPerSecond", and "Milliseconds". :vartype unit: str or ~azure.mgmt.cosmosdb.models.UnitType :ivar name: The name information for the metric. :vartype name: ~azure.mgmt.cosmosdb.models.MetricName :ivar quota_period: The quota period used to summarize the usage values. :vartype quota_period: str :ivar limit: Maximum value for this metric. - :vartype limit: long + :vartype limit: int :ivar current_value: Current value for this metric. - :vartype current_value: long + :vartype current_value: int """ _validation = { - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'quota_period': {'readonly': True}, - 'limit': {'readonly': True}, - 'current_value': {'readonly': True}, + "unit": {"readonly": True}, + "name": {"readonly": True}, + "quota_period": {"readonly": True}, + "limit": {"readonly": True}, + "current_value": {"readonly": True}, } _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, + "unit": {"key": "unit", "type": "str"}, + "name": {"key": "name", "type": "MetricName"}, + "quota_period": {"key": "quotaPeriod", "type": "str"}, + "limit": {"key": "limit", "type": "int"}, + "current_value": {"key": "currentValue", "type": "int"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(Usage, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.unit = None self.name = None self.quota_period = None @@ -9077,17 +8876,17 @@ class PartitionUsage(Usage): Variables are only populated by the server, and will be ignored when sending a request. - :ivar unit: The unit of the metric. Possible values include: "Count", "Bytes", "Seconds", - "Percent", "CountPerSecond", "BytesPerSecond", "Milliseconds". + :ivar unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "Percent", + "CountPerSecond", "BytesPerSecond", and "Milliseconds". :vartype unit: str or ~azure.mgmt.cosmosdb.models.UnitType :ivar name: The name information for the metric. :vartype name: ~azure.mgmt.cosmosdb.models.MetricName :ivar quota_period: The quota period used to summarize the usage values. :vartype quota_period: str :ivar limit: Maximum value for this metric. - :vartype limit: long + :vartype limit: int :ivar current_value: Current value for this metric. - :vartype current_value: long + :vartype current_value: int :ivar partition_id: The partition id (GUID identifier) of the usages. :vartype partition_id: str :ivar partition_key_range_id: The partition key range id (integer identifier) of the usages. @@ -9095,37 +8894,33 @@ class PartitionUsage(Usage): """ _validation = { - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'quota_period': {'readonly': True}, - 'limit': {'readonly': True}, - 'current_value': {'readonly': True}, - 'partition_id': {'readonly': True}, - 'partition_key_range_id': {'readonly': True}, + "unit": {"readonly": True}, + "name": {"readonly": True}, + "quota_period": {"readonly": True}, + "limit": {"readonly": True}, + "current_value": {"readonly": True}, + "partition_id": {"readonly": True}, + "partition_key_range_id": {"readonly": True}, } _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'partition_id': {'key': 'partitionId', 'type': 'str'}, - 'partition_key_range_id': {'key': 'partitionKeyRangeId', 'type': 'str'}, + "unit": {"key": "unit", "type": "str"}, + "name": {"key": "name", "type": "MetricName"}, + "quota_period": {"key": "quotaPeriod", "type": "str"}, + "limit": {"key": "limit", "type": "int"}, + "current_value": {"key": "currentValue", "type": "int"}, + "partition_id": {"key": "partitionId", "type": "str"}, + "partition_key_range_id": {"key": "partitionKeyRangeId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(PartitionUsage, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.partition_id = None self.partition_key_range_id = None -class PartitionUsagesResult(msrest.serialization.Model): +class PartitionUsagesResult(_serialization.Model): """The response to a list partition level usage request. Variables are only populated by the server, and will be ignored when sending a request. @@ -9136,24 +8931,20 @@ class PartitionUsagesResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[PartitionUsage]'}, + "value": {"key": "value", "type": "[PartitionUsage]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(PartitionUsagesResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class PercentileMetric(msrest.serialization.Model): +class PercentileMetric(_serialization.Model): """Percentile Metric data. Variables are only populated by the server, and will be ignored when sending a request. @@ -9164,8 +8955,8 @@ class PercentileMetric(msrest.serialization.Model): :vartype end_time: ~datetime.datetime :ivar time_grain: The time grain to be used to summarize the metric values. :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: "Count", "Bytes", "Seconds", - "Percent", "CountPerSecond", "BytesPerSecond", "Milliseconds". + :ivar unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "Percent", + "CountPerSecond", "BytesPerSecond", and "Milliseconds". :vartype unit: str or ~azure.mgmt.cosmosdb.models.UnitType :ivar name: The name information for the metric. :vartype name: ~azure.mgmt.cosmosdb.models.MetricName @@ -9174,30 +8965,26 @@ class PercentileMetric(msrest.serialization.Model): """ _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, + "start_time": {"readonly": True}, + "end_time": {"readonly": True}, + "time_grain": {"readonly": True}, + "unit": {"readonly": True}, + "name": {"readonly": True}, + "metric_values": {"readonly": True}, } _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[PercentileMetricValue]'}, + "start_time": {"key": "startTime", "type": "iso-8601"}, + "end_time": {"key": "endTime", "type": "iso-8601"}, + "time_grain": {"key": "timeGrain", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "name": {"key": "name", "type": "MetricName"}, + "metric_values": {"key": "metricValues", "type": "[PercentileMetricValue]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(PercentileMetric, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.start_time = None self.end_time = None self.time_grain = None @@ -9206,7 +8993,7 @@ def __init__( self.metric_values = None -class PercentileMetricListResult(msrest.serialization.Model): +class PercentileMetricListResult(_serialization.Model): """The response to a list percentile metrics request. Variables are only populated by the server, and will be ignored when sending a request. @@ -9216,24 +9003,20 @@ class PercentileMetricListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[PercentileMetric]'}, + "value": {"key": "value", "type": "[PercentileMetric]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(PercentileMetricListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class PercentileMetricValue(MetricValue): +class PercentileMetricValue(MetricValue): # pylint: disable=too-many-instance-attributes """Represents percentile metrics values. Variables are only populated by the server, and will be ignored when sending a request. @@ -9267,44 +9050,40 @@ class PercentileMetricValue(MetricValue): """ _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - 'p10': {'readonly': True}, - 'p25': {'readonly': True}, - 'p50': {'readonly': True}, - 'p75': {'readonly': True}, - 'p90': {'readonly': True}, - 'p95': {'readonly': True}, - 'p99': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': '_count', 'type': 'int'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - 'p10': {'key': 'P10', 'type': 'float'}, - 'p25': {'key': 'P25', 'type': 'float'}, - 'p50': {'key': 'P50', 'type': 'float'}, - 'p75': {'key': 'P75', 'type': 'float'}, - 'p90': {'key': 'P90', 'type': 'float'}, - 'p95': {'key': 'P95', 'type': 'float'}, - 'p99': {'key': 'P99', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(PercentileMetricValue, self).__init__(**kwargs) + "count": {"readonly": True}, + "average": {"readonly": True}, + "maximum": {"readonly": True}, + "minimum": {"readonly": True}, + "timestamp": {"readonly": True}, + "total": {"readonly": True}, + "p10": {"readonly": True}, + "p25": {"readonly": True}, + "p50": {"readonly": True}, + "p75": {"readonly": True}, + "p90": {"readonly": True}, + "p95": {"readonly": True}, + "p99": {"readonly": True}, + } + + _attribute_map = { + "count": {"key": "_count", "type": "int"}, + "average": {"key": "average", "type": "float"}, + "maximum": {"key": "maximum", "type": "float"}, + "minimum": {"key": "minimum", "type": "float"}, + "timestamp": {"key": "timestamp", "type": "iso-8601"}, + "total": {"key": "total", "type": "float"}, + "p10": {"key": "P10", "type": "float"}, + "p25": {"key": "P25", "type": "float"}, + "p50": {"key": "P50", "type": "float"}, + "p75": {"key": "P75", "type": "float"}, + "p90": {"key": "P90", "type": "float"}, + "p95": {"key": "P95", "type": "float"}, + "p99": {"key": "P99", "type": "float"}, + } + + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.p10 = None self.p25 = None self.p50 = None @@ -9319,8 +9098,8 @@ class PeriodicModeBackupPolicy(BackupPolicy): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Describes the mode of backups.Constant filled by server. Possible values - include: "Periodic", "Continuous". + :ivar type: Describes the mode of backups. Required. Known values are: "Periodic" and + "Continuous". :vartype type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType :ivar migration_state: The object representing the state of the migration between the backup policies. @@ -9330,20 +9109,20 @@ class PeriodicModeBackupPolicy(BackupPolicy): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'migration_state': {'key': 'migrationState', 'type': 'BackupPolicyMigrationState'}, - 'periodic_mode_properties': {'key': 'periodicModeProperties', 'type': 'PeriodicModeProperties'}, + "type": {"key": "type", "type": "str"}, + "migration_state": {"key": "migrationState", "type": "BackupPolicyMigrationState"}, + "periodic_mode_properties": {"key": "periodicModeProperties", "type": "PeriodicModeProperties"}, } def __init__( self, *, - migration_state: Optional["BackupPolicyMigrationState"] = None, - periodic_mode_properties: Optional["PeriodicModeProperties"] = None, + migration_state: Optional["_models.BackupPolicyMigrationState"] = None, + periodic_mode_properties: Optional["_models.PeriodicModeProperties"] = None, **kwargs ): """ @@ -9353,12 +9132,12 @@ def __init__( :keyword periodic_mode_properties: Configuration values for periodic mode backup. :paramtype periodic_mode_properties: ~azure.mgmt.cosmosdb.models.PeriodicModeProperties """ - super(PeriodicModeBackupPolicy, self).__init__(migration_state=migration_state, **kwargs) - self.type = 'Periodic' # type: str + super().__init__(migration_state=migration_state, **kwargs) + self.type = "Periodic" # type: str self.periodic_mode_properties = periodic_mode_properties -class PeriodicModeProperties(msrest.serialization.Model): +class PeriodicModeProperties(_serialization.Model): """Configuration values for periodic mode backup. :ivar backup_interval_in_minutes: An integer representing the interval in minutes between two @@ -9367,20 +9146,20 @@ class PeriodicModeProperties(msrest.serialization.Model): :ivar backup_retention_interval_in_hours: An integer representing the time (in hours) that each backup is retained. :vartype backup_retention_interval_in_hours: int - :ivar backup_storage_redundancy: Enum to indicate type of backup residency. Possible values - include: "Geo", "Local", "Zone". + :ivar backup_storage_redundancy: Enum to indicate type of backup residency. Known values are: + "Geo", "Local", and "Zone". :vartype backup_storage_redundancy: str or ~azure.mgmt.cosmosdb.models.BackupStorageRedundancy """ _validation = { - 'backup_interval_in_minutes': {'minimum': 0}, - 'backup_retention_interval_in_hours': {'minimum': 0}, + "backup_interval_in_minutes": {"minimum": 0}, + "backup_retention_interval_in_hours": {"minimum": 0}, } _attribute_map = { - 'backup_interval_in_minutes': {'key': 'backupIntervalInMinutes', 'type': 'int'}, - 'backup_retention_interval_in_hours': {'key': 'backupRetentionIntervalInHours', 'type': 'int'}, - 'backup_storage_redundancy': {'key': 'backupStorageRedundancy', 'type': 'str'}, + "backup_interval_in_minutes": {"key": "backupIntervalInMinutes", "type": "int"}, + "backup_retention_interval_in_hours": {"key": "backupRetentionIntervalInHours", "type": "int"}, + "backup_storage_redundancy": {"key": "backupStorageRedundancy", "type": "str"}, } def __init__( @@ -9388,7 +9167,7 @@ def __init__( *, backup_interval_in_minutes: Optional[int] = None, backup_retention_interval_in_hours: Optional[int] = None, - backup_storage_redundancy: Optional[Union[str, "BackupStorageRedundancy"]] = None, + backup_storage_redundancy: Optional[Union[str, "_models.BackupStorageRedundancy"]] = None, **kwargs ): """ @@ -9398,18 +9177,18 @@ def __init__( :keyword backup_retention_interval_in_hours: An integer representing the time (in hours) that each backup is retained. :paramtype backup_retention_interval_in_hours: int - :keyword backup_storage_redundancy: Enum to indicate type of backup residency. Possible values - include: "Geo", "Local", "Zone". + :keyword backup_storage_redundancy: Enum to indicate type of backup residency. Known values + are: "Geo", "Local", and "Zone". :paramtype backup_storage_redundancy: str or ~azure.mgmt.cosmosdb.models.BackupStorageRedundancy """ - super(PeriodicModeProperties, self).__init__(**kwargs) + super().__init__(**kwargs) self.backup_interval_in_minutes = backup_interval_in_minutes self.backup_retention_interval_in_hours = backup_retention_interval_in_hours self.backup_storage_redundancy = backup_storage_redundancy -class Permission(msrest.serialization.Model): +class Permission(_serialization.Model): """The set of data plane operations permitted through this Role Definition. :ivar data_actions: An array of data actions that are allowed. @@ -9419,16 +9198,12 @@ class Permission(msrest.serialization.Model): """ _attribute_map = { - 'data_actions': {'key': 'dataActions', 'type': '[str]'}, - 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + "data_actions": {"key": "dataActions", "type": "[str]"}, + "not_data_actions": {"key": "notDataActions", "type": "[str]"}, } def __init__( - self, - *, - data_actions: Optional[List[str]] = None, - not_data_actions: Optional[List[str]] = None, - **kwargs + self, *, data_actions: Optional[List[str]] = None, not_data_actions: Optional[List[str]] = None, **kwargs ): """ :keyword data_actions: An array of data actions that are allowed. @@ -9436,43 +9211,38 @@ def __init__( :keyword not_data_actions: An array of data actions that are denied. :paramtype not_data_actions: list[str] """ - super(Permission, self).__init__(**kwargs) + super().__init__(**kwargs) self.data_actions = data_actions self.not_data_actions = not_data_actions -class PhysicalPartitionId(msrest.serialization.Model): +class PhysicalPartitionId(_serialization.Model): """PhysicalPartitionId object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Id of a physical partition. + :ivar id: Id of a physical partition. Required. :vartype id: str """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - *, - id: str, - **kwargs - ): + def __init__(self, *, id: str, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Id of a physical partition. + :keyword id: Id of a physical partition. Required. :paramtype id: str """ - super(PhysicalPartitionId, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id -class PhysicalPartitionStorageInfo(msrest.serialization.Model): +class PhysicalPartitionStorageInfo(_serialization.Model): """The storage of a physical partition. Variables are only populated by the server, and will be ignored when sending a request. @@ -9484,27 +9254,23 @@ class PhysicalPartitionStorageInfo(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'storage_in_kb': {'readonly': True}, + "id": {"readonly": True}, + "storage_in_kb": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'storage_in_kb': {'key': 'storageInKB', 'type': 'float'}, + "id": {"key": "id", "type": "str"}, + "storage_in_kb": {"key": "storageInKB", "type": "float"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(PhysicalPartitionStorageInfo, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.id = None self.storage_in_kb = None -class PhysicalPartitionStorageInfoCollection(msrest.serialization.Model): +class PhysicalPartitionStorageInfoCollection(_serialization.Model): """List of physical partitions and their properties returned by a merge operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -9516,24 +9282,23 @@ class PhysicalPartitionStorageInfoCollection(msrest.serialization.Model): """ _validation = { - 'physical_partition_storage_info_collection': {'readonly': True}, + "physical_partition_storage_info_collection": {"readonly": True}, } _attribute_map = { - 'physical_partition_storage_info_collection': {'key': 'physicalPartitionStorageInfoCollection', 'type': '[PhysicalPartitionStorageInfo]'}, + "physical_partition_storage_info_collection": { + "key": "physicalPartitionStorageInfoCollection", + "type": "[PhysicalPartitionStorageInfo]", + }, } - def __init__( - self, - **kwargs - ): - """ - """ - super(PhysicalPartitionStorageInfoCollection, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.physical_partition_storage_info_collection = None -class PhysicalPartitionThroughputInfoProperties(msrest.serialization.Model): +class PhysicalPartitionThroughputInfoProperties(_serialization.Model): """The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoProperties object. :ivar physical_partition_throughput_info: Array of physical partition throughput info objects. @@ -9542,13 +9307,16 @@ class PhysicalPartitionThroughputInfoProperties(msrest.serialization.Model): """ _attribute_map = { - 'physical_partition_throughput_info': {'key': 'physicalPartitionThroughputInfo', 'type': '[PhysicalPartitionThroughputInfoResource]'}, + "physical_partition_throughput_info": { + "key": "physicalPartitionThroughputInfo", + "type": "[PhysicalPartitionThroughputInfoResource]", + }, } def __init__( self, *, - physical_partition_throughput_info: Optional[List["PhysicalPartitionThroughputInfoResource"]] = None, + physical_partition_throughput_info: Optional[List["_models.PhysicalPartitionThroughputInfoResource"]] = None, **kwargs ): """ @@ -9557,44 +9325,38 @@ def __init__( :paramtype physical_partition_throughput_info: list[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResource] """ - super(PhysicalPartitionThroughputInfoProperties, self).__init__(**kwargs) + super().__init__(**kwargs) self.physical_partition_throughput_info = physical_partition_throughput_info -class PhysicalPartitionThroughputInfoResource(msrest.serialization.Model): +class PhysicalPartitionThroughputInfoResource(_serialization.Model): """PhysicalPartitionThroughputInfo object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Id of a physical partition. + :ivar id: Id of a physical partition. Required. :vartype id: str :ivar throughput: Throughput of a physical partition. :vartype throughput: float """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'throughput': {'key': 'throughput', 'type': 'float'}, + "id": {"key": "id", "type": "str"}, + "throughput": {"key": "throughput", "type": "float"}, } - def __init__( - self, - *, - id: str, - throughput: Optional[float] = None, - **kwargs - ): + def __init__(self, *, id: str, throughput: Optional[float] = None, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Id of a physical partition. + :keyword id: Id of a physical partition. Required. :paramtype id: str :keyword throughput: Throughput of a physical partition. :paramtype throughput: float """ - super(PhysicalPartitionThroughputInfoResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id self.throughput = throughput @@ -9612,12 +9374,12 @@ class PhysicalPartitionThroughputInfoResult(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -9627,19 +9389,19 @@ class PhysicalPartitionThroughputInfoResult(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'PhysicalPartitionThroughputInfoResultPropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "PhysicalPartitionThroughputInfoResultPropertiesResource"}, } def __init__( @@ -9647,19 +9409,19 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["PhysicalPartitionThroughputInfoResultPropertiesResource"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.PhysicalPartitionThroughputInfoResultPropertiesResource"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -9667,7 +9429,7 @@ def __init__( :paramtype resource: ~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResultPropertiesResource """ - super(PhysicalPartitionThroughputInfoResult, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource @@ -9680,13 +9442,16 @@ class PhysicalPartitionThroughputInfoResultPropertiesResource(PhysicalPartitionT """ _attribute_map = { - 'physical_partition_throughput_info': {'key': 'physicalPartitionThroughputInfo', 'type': '[PhysicalPartitionThroughputInfoResource]'}, + "physical_partition_throughput_info": { + "key": "physicalPartitionThroughputInfo", + "type": "[PhysicalPartitionThroughputInfoResource]", + }, } def __init__( self, *, - physical_partition_throughput_info: Optional[List["PhysicalPartitionThroughputInfoResource"]] = None, + physical_partition_throughput_info: Optional[List["_models.PhysicalPartitionThroughputInfoResource"]] = None, **kwargs ): """ @@ -9695,10 +9460,10 @@ def __init__( :paramtype physical_partition_throughput_info: list[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResource] """ - super(PhysicalPartitionThroughputInfoResultPropertiesResource, self).__init__(physical_partition_throughput_info=physical_partition_throughput_info, **kwargs) + super().__init__(physical_partition_throughput_info=physical_partition_throughput_info, **kwargs) -class Resource(msrest.serialization.Model): +class Resource(_serialization.Model): """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. @@ -9714,24 +9479,20 @@ class Resource(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(Resource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.id = None self.name = None self.type = None @@ -9753,24 +9514,20 @@ class ProxyResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(ProxyResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) class PrivateEndpointConnection(ProxyResource): @@ -9799,26 +9556,29 @@ class PrivateEndpointConnection(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "private_endpoint": {"key": "properties.privateEndpoint", "type": "PrivateEndpointProperty"}, + "private_link_service_connection_state": { + "key": "properties.privateLinkServiceConnectionState", + "type": "PrivateLinkServiceConnectionStateProperty", + }, + "group_id": {"key": "properties.groupId", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, } def __init__( self, *, - private_endpoint: Optional["PrivateEndpointProperty"] = None, - private_link_service_connection_state: Optional["PrivateLinkServiceConnectionStateProperty"] = None, + private_endpoint: Optional["_models.PrivateEndpointProperty"] = None, + private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionStateProperty"] = None, group_id: Optional[str] = None, provisioning_state: Optional[str] = None, **kwargs @@ -9835,14 +9595,14 @@ def __init__( :keyword provisioning_state: Provisioning state of the private endpoint. :paramtype provisioning_state: str """ - super(PrivateEndpointConnection, self).__init__(**kwargs) + super().__init__(**kwargs) self.private_endpoint = private_endpoint self.private_link_service_connection_state = private_link_service_connection_state self.group_id = group_id self.provisioning_state = provisioning_state -class PrivateEndpointConnectionListResult(msrest.serialization.Model): +class PrivateEndpointConnectionListResult(_serialization.Model): """A list of private endpoint connections. :ivar value: Array of private endpoint connections. @@ -9850,24 +9610,19 @@ class PrivateEndpointConnectionListResult(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__( - self, - *, - value: Optional[List["PrivateEndpointConnection"]] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): """ :keyword value: Array of private endpoint connections. :paramtype value: list[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] """ - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.value = value -class PrivateEndpointProperty(msrest.serialization.Model): +class PrivateEndpointProperty(_serialization.Model): """Private endpoint which the connection belongs to. :ivar id: Resource id of the private endpoint. @@ -9875,20 +9630,15 @@ class PrivateEndpointProperty(msrest.serialization.Model): """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): + def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin """ :keyword id: Resource id of the private endpoint. :paramtype id: str """ - super(PrivateEndpointProperty, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id @@ -9912,36 +9662,32 @@ class PrivateLinkResource(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - 'required_zone_names': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "group_id": {"readonly": True}, + "required_members": {"readonly": True}, + "required_zone_names": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, - 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "group_id": {"key": "properties.groupId", "type": "str"}, + "required_members": {"key": "properties.requiredMembers", "type": "[str]"}, + "required_zone_names": {"key": "properties.requiredZoneNames", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(PrivateLinkResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.group_id = None self.required_members = None self.required_zone_names = None -class PrivateLinkResourceListResult(msrest.serialization.Model): +class PrivateLinkResourceListResult(_serialization.Model): """A list of private link resources. :ivar value: Array of private link resources. @@ -9949,24 +9695,19 @@ class PrivateLinkResourceListResult(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__( - self, - *, - value: Optional[List["PrivateLinkResource"]] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): """ :keyword value: Array of private link resources. :paramtype value: list[~azure.mgmt.cosmosdb.models.PrivateLinkResource] """ - super(PrivateLinkResourceListResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.value = value -class PrivateLinkServiceConnectionStateProperty(msrest.serialization.Model): +class PrivateLinkServiceConnectionStateProperty(_serialization.Model): """Connection State of the Private Endpoint Connection. Variables are only populated by the server, and will be ignored when sending a request. @@ -9981,35 +9722,29 @@ class PrivateLinkServiceConnectionStateProperty(msrest.serialization.Model): """ _validation = { - 'actions_required': {'readonly': True}, + "actions_required": {"readonly": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + "status": {"key": "status", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "actions_required": {"key": "actionsRequired", "type": "str"}, } - def __init__( - self, - *, - status: Optional[str] = None, - description: Optional[str] = None, - **kwargs - ): + def __init__(self, *, status: Optional[str] = None, description: Optional[str] = None, **kwargs): """ :keyword status: The private link service connection status. :paramtype status: str :keyword description: The private link service connection description. :paramtype description: str """ - super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + super().__init__(**kwargs) self.status = status self.description = description self.actions_required = None -class Privilege(msrest.serialization.Model): +class Privilege(_serialization.Model): """The set of data plane operations permitted through this Role Definition. :ivar resource: An Azure Cosmos DB Mongo DB Resource. @@ -10019,16 +9754,12 @@ class Privilege(msrest.serialization.Model): """ _attribute_map = { - 'resource': {'key': 'resource', 'type': 'PrivilegeResource'}, - 'actions': {'key': 'actions', 'type': '[str]'}, + "resource": {"key": "resource", "type": "PrivilegeResource"}, + "actions": {"key": "actions", "type": "[str]"}, } def __init__( - self, - *, - resource: Optional["PrivilegeResource"] = None, - actions: Optional[List[str]] = None, - **kwargs + self, *, resource: Optional["_models.PrivilegeResource"] = None, actions: Optional[List[str]] = None, **kwargs ): """ :keyword resource: An Azure Cosmos DB Mongo DB Resource. @@ -10036,12 +9767,12 @@ def __init__( :keyword actions: An array of actions that are allowed. :paramtype actions: list[str] """ - super(Privilege, self).__init__(**kwargs) + super().__init__(**kwargs) self.resource = resource self.actions = actions -class PrivilegeResource(msrest.serialization.Model): +class PrivilegeResource(_serialization.Model): """An Azure Cosmos DB Mongo DB Resource. :ivar db: The database name the role is applied. @@ -10051,24 +9782,18 @@ class PrivilegeResource(msrest.serialization.Model): """ _attribute_map = { - 'db': {'key': 'db', 'type': 'str'}, - 'collection': {'key': 'collection', 'type': 'str'}, + "db": {"key": "db", "type": "str"}, + "collection": {"key": "collection", "type": "str"}, } - def __init__( - self, - *, - db: Optional[str] = None, - collection: Optional[str] = None, - **kwargs - ): + def __init__(self, *, db: Optional[str] = None, collection: Optional[str] = None, **kwargs): """ :keyword db: The database name the role is applied. :paramtype db: str :keyword collection: The collection name the role is applied. :paramtype collection: str """ - super(PrivilegeResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.db = db self.collection = collection @@ -10088,154 +9813,227 @@ class RedistributeThroughputParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a resource throughput. + :ivar resource: The standard JSON format of a resource throughput. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.RedistributeThroughputPropertiesResource """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'RedistributeThroughputPropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "RedistributeThroughputPropertiesResource"}, } def __init__( self, *, - resource: "RedistributeThroughputPropertiesResource", + resource: "_models.RedistributeThroughputPropertiesResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a resource throughput. + :keyword resource: The standard JSON format of a resource throughput. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.RedistributeThroughputPropertiesResource """ - super(RedistributeThroughputParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource -class RedistributeThroughputPropertiesResource(msrest.serialization.Model): +class RedistributeThroughputPropertiesResource(_serialization.Model): """Resource to redistribute throughput for Azure Cosmos DB resource. All required parameters must be populated in order to send to Azure. - :ivar throughput_policy: Required. ThroughputPolicy to apply for throughput redistribution. - Possible values include: "none", "equal", "custom". + :ivar throughput_policy: ThroughputPolicy to apply for throughput redistribution. Required. + Known values are: "none", "equal", and "custom". :vartype throughput_policy: str or ~azure.mgmt.cosmosdb.models.ThroughputPolicyType - :ivar target_physical_partition_throughput_info: Required. Array of - PhysicalPartitionThroughputInfoResource objects. + :ivar target_physical_partition_throughput_info: Array of + PhysicalPartitionThroughputInfoResource objects. Required. :vartype target_physical_partition_throughput_info: list[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResource] - :ivar source_physical_partition_throughput_info: Required. Array of - PhysicalPartitionThroughputInfoResource objects. + :ivar source_physical_partition_throughput_info: Array of + PhysicalPartitionThroughputInfoResource objects. Required. :vartype source_physical_partition_throughput_info: list[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResource] """ _validation = { - 'throughput_policy': {'required': True}, - 'target_physical_partition_throughput_info': {'required': True}, - 'source_physical_partition_throughput_info': {'required': True}, + "throughput_policy": {"required": True}, + "target_physical_partition_throughput_info": {"required": True}, + "source_physical_partition_throughput_info": {"required": True}, } _attribute_map = { - 'throughput_policy': {'key': 'throughputPolicy', 'type': 'str'}, - 'target_physical_partition_throughput_info': {'key': 'targetPhysicalPartitionThroughputInfo', 'type': '[PhysicalPartitionThroughputInfoResource]'}, - 'source_physical_partition_throughput_info': {'key': 'sourcePhysicalPartitionThroughputInfo', 'type': '[PhysicalPartitionThroughputInfoResource]'}, + "throughput_policy": {"key": "throughputPolicy", "type": "str"}, + "target_physical_partition_throughput_info": { + "key": "targetPhysicalPartitionThroughputInfo", + "type": "[PhysicalPartitionThroughputInfoResource]", + }, + "source_physical_partition_throughput_info": { + "key": "sourcePhysicalPartitionThroughputInfo", + "type": "[PhysicalPartitionThroughputInfoResource]", + }, } def __init__( self, *, - throughput_policy: Union[str, "ThroughputPolicyType"], - target_physical_partition_throughput_info: List["PhysicalPartitionThroughputInfoResource"], - source_physical_partition_throughput_info: List["PhysicalPartitionThroughputInfoResource"], + throughput_policy: Union[str, "_models.ThroughputPolicyType"], + target_physical_partition_throughput_info: List["_models.PhysicalPartitionThroughputInfoResource"], + source_physical_partition_throughput_info: List["_models.PhysicalPartitionThroughputInfoResource"], **kwargs ): """ - :keyword throughput_policy: Required. ThroughputPolicy to apply for throughput redistribution. - Possible values include: "none", "equal", "custom". + :keyword throughput_policy: ThroughputPolicy to apply for throughput redistribution. Required. + Known values are: "none", "equal", and "custom". :paramtype throughput_policy: str or ~azure.mgmt.cosmosdb.models.ThroughputPolicyType - :keyword target_physical_partition_throughput_info: Required. Array of - PhysicalPartitionThroughputInfoResource objects. + :keyword target_physical_partition_throughput_info: Array of + PhysicalPartitionThroughputInfoResource objects. Required. :paramtype target_physical_partition_throughput_info: list[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResource] - :keyword source_physical_partition_throughput_info: Required. Array of - PhysicalPartitionThroughputInfoResource objects. + :keyword source_physical_partition_throughput_info: Array of + PhysicalPartitionThroughputInfoResource objects. Required. :paramtype source_physical_partition_throughput_info: list[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResource] """ - super(RedistributeThroughputPropertiesResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.throughput_policy = throughput_policy self.target_physical_partition_throughput_info = target_physical_partition_throughput_info self.source_physical_partition_throughput_info = source_physical_partition_throughput_info -class RegionForOnlineOffline(msrest.serialization.Model): +class RegionForOnlineOffline(_serialization.Model): """Cosmos DB region to online or offline. All required parameters must be populated in order to send to Azure. - :ivar region: Required. Cosmos DB region, with spaces between words and each word capitalized. + :ivar region: Cosmos DB region, with spaces between words and each word capitalized. Required. :vartype region: str """ _validation = { - 'region': {'required': True}, + "region": {"required": True}, } _attribute_map = { - 'region': {'key': 'region', 'type': 'str'}, + "region": {"key": "region", "type": "str"}, + } + + def __init__(self, *, region: str, **kwargs): + """ + :keyword region: Cosmos DB region, with spaces between words and each word capitalized. + Required. + :paramtype region: str + """ + super().__init__(**kwargs) + self.region = region + + +class RestoreParametersBase(_serialization.Model): + """Parameters to indicate the information about the restore. + + :ivar restore_source: The id of the restorable database account from which the restore has to + be initiated. For example: + /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. + :vartype restore_source: str + :ivar restore_timestamp_in_utc: Time to which the account has to be restored (ISO-8601 format). + :vartype restore_timestamp_in_utc: ~datetime.datetime + """ + + _attribute_map = { + "restore_source": {"key": "restoreSource", "type": "str"}, + "restore_timestamp_in_utc": {"key": "restoreTimestampInUtc", "type": "iso-8601"}, } def __init__( self, *, - region: str, + restore_source: Optional[str] = None, + restore_timestamp_in_utc: Optional[datetime.datetime] = None, **kwargs ): """ - :keyword region: Required. Cosmos DB region, with spaces between words and each word - capitalized. - :paramtype region: str + :keyword restore_source: The id of the restorable database account from which the restore has + to be initiated. For example: + /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. + :paramtype restore_source: str + :keyword restore_timestamp_in_utc: Time to which the account has to be restored (ISO-8601 + format). + :paramtype restore_timestamp_in_utc: ~datetime.datetime """ - super(RegionForOnlineOffline, self).__init__(**kwargs) - self.region = region + super().__init__(**kwargs) + self.restore_source = restore_source + self.restore_timestamp_in_utc = restore_timestamp_in_utc + + +class ResourceRestoreParameters(RestoreParametersBase): + """Parameters to indicate the information about the restore. + + :ivar restore_source: The id of the restorable database account from which the restore has to + be initiated. For example: + /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. + :vartype restore_source: str + :ivar restore_timestamp_in_utc: Time to which the account has to be restored (ISO-8601 format). + :vartype restore_timestamp_in_utc: ~datetime.datetime + """ + + _attribute_map = { + "restore_source": {"key": "restoreSource", "type": "str"}, + "restore_timestamp_in_utc": {"key": "restoreTimestampInUtc", "type": "iso-8601"}, + } + + def __init__( + self, + *, + restore_source: Optional[str] = None, + restore_timestamp_in_utc: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword restore_source: The id of the restorable database account from which the restore has + to be initiated. For example: + /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. + :paramtype restore_source: str + :keyword restore_timestamp_in_utc: Time to which the account has to be restored (ISO-8601 + format). + :paramtype restore_timestamp_in_utc: ~datetime.datetime + """ + super().__init__(restore_source=restore_source, restore_timestamp_in_utc=restore_timestamp_in_utc, **kwargs) -class RestorableDatabaseAccountGetResult(msrest.serialization.Model): +class RestorableDatabaseAccountGetResult(_serialization.Model): """A Azure Cosmos DB restorable database account. Variables are only populated by the server, and will be ignored when sending a request. @@ -10258,8 +10056,8 @@ class RestorableDatabaseAccountGetResult(msrest.serialization.Model): :ivar deletion_time: The time at which the restorable database account has been deleted (ISO-8601 format). :vartype deletion_time: ~datetime.datetime - :ivar api_type: The API type of the restorable database account. Possible values include: - "MongoDB", "Gremlin", "Cassandra", "Table", "Sql", "GremlinV2". + :ivar api_type: The API type of the restorable database account. Known values are: "MongoDB", + "Gremlin", "Cassandra", "Table", "Sql", and "GremlinV2". :vartype api_type: str or ~azure.mgmt.cosmosdb.models.ApiType :ivar restorable_locations: List of regions where the of the database account can be restored from. @@ -10267,24 +10065,24 @@ class RestorableDatabaseAccountGetResult(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'api_type': {'readonly': True}, - 'restorable_locations': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "api_type": {"readonly": True}, + "restorable_locations": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'oldest_restorable_time': {'key': 'properties.oldestRestorableTime', 'type': 'iso-8601'}, - 'deletion_time': {'key': 'properties.deletionTime', 'type': 'iso-8601'}, - 'api_type': {'key': 'properties.apiType', 'type': 'str'}, - 'restorable_locations': {'key': 'properties.restorableLocations', 'type': '[RestorableLocationResource]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "account_name": {"key": "properties.accountName", "type": "str"}, + "creation_time": {"key": "properties.creationTime", "type": "iso-8601"}, + "oldest_restorable_time": {"key": "properties.oldestRestorableTime", "type": "iso-8601"}, + "deletion_time": {"key": "properties.deletionTime", "type": "iso-8601"}, + "api_type": {"key": "properties.apiType", "type": "str"}, + "restorable_locations": {"key": "properties.restorableLocations", "type": "[RestorableLocationResource]"}, } def __init__( @@ -10311,7 +10109,7 @@ def __init__( (ISO-8601 format). :paramtype deletion_time: ~datetime.datetime """ - super(RestorableDatabaseAccountGetResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = None self.name = None self.type = None @@ -10324,7 +10122,7 @@ def __init__( self.restorable_locations = None -class RestorableDatabaseAccountsListResult(msrest.serialization.Model): +class RestorableDatabaseAccountsListResult(_serialization.Model): """The List operation response, that contains the restorable database accounts and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -10334,24 +10132,20 @@ class RestorableDatabaseAccountsListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[RestorableDatabaseAccountGetResult]'}, + "value": {"key": "value", "type": "[RestorableDatabaseAccountGetResult]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableDatabaseAccountsListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class RestorableGremlinDatabaseGetResult(msrest.serialization.Model): +class RestorableGremlinDatabaseGetResult(_serialization.Model): """An Azure Cosmos DB Gremlin database event. Variables are only populated by the server, and will be ignored when sending a request. @@ -10367,44 +10161,39 @@ class RestorableGremlinDatabaseGetResult(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'resource': {'key': 'properties.resource', 'type': 'RestorableGremlinDatabasePropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "resource": {"key": "properties.resource", "type": "RestorableGremlinDatabasePropertiesResource"}, } - def __init__( - self, - *, - resource: Optional["RestorableGremlinDatabasePropertiesResource"] = None, - **kwargs - ): + def __init__(self, *, resource: Optional["_models.RestorableGremlinDatabasePropertiesResource"] = None, **kwargs): """ :keyword resource: The resource of an Azure Cosmos DB Gremlin database event. :paramtype resource: ~azure.mgmt.cosmosdb.models.RestorableGremlinDatabasePropertiesResource """ - super(RestorableGremlinDatabaseGetResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = None self.name = None self.type = None self.resource = resource -class RestorableGremlinDatabasePropertiesResource(msrest.serialization.Model): +class RestorableGremlinDatabasePropertiesResource(_serialization.Model): """The resource of an Azure Cosmos DB Gremlin database event. Variables are only populated by the server, and will be ignored when sending a request. :ivar rid: A system generated property. A unique identifier. :vartype rid: str - :ivar operation_type: The operation type of this database event. Possible values include: - "Create", "Replace", "Delete", "SystemOperation". + :ivar operation_type: The operation type of this database event. Known values are: "Create", + "Replace", "Delete", "Recreate", and "SystemOperation". :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType :ivar event_timestamp: The time when this database event happened. :vartype event_timestamp: str @@ -10415,28 +10204,24 @@ class RestorableGremlinDatabasePropertiesResource(msrest.serialization.Model): """ _validation = { - 'rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, + "rid": {"readonly": True}, + "operation_type": {"readonly": True}, + "event_timestamp": {"readonly": True}, + "owner_id": {"readonly": True}, + "owner_resource_id": {"readonly": True}, } _attribute_map = { - 'rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "operation_type": {"key": "operationType", "type": "str"}, + "event_timestamp": {"key": "eventTimestamp", "type": "str"}, + "owner_id": {"key": "ownerId", "type": "str"}, + "owner_resource_id": {"key": "ownerResourceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableGremlinDatabasePropertiesResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.rid = None self.operation_type = None self.event_timestamp = None @@ -10444,7 +10229,7 @@ def __init__( self.owner_resource_id = None -class RestorableGremlinDatabasesListResult(msrest.serialization.Model): +class RestorableGremlinDatabasesListResult(_serialization.Model): """The List operation response, that contains the Gremlin database events and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -10454,24 +10239,20 @@ class RestorableGremlinDatabasesListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[RestorableGremlinDatabaseGetResult]'}, + "value": {"key": "value", "type": "[RestorableGremlinDatabaseGetResult]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableGremlinDatabasesListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class RestorableGremlinGraphGetResult(msrest.serialization.Model): +class RestorableGremlinGraphGetResult(_serialization.Model): """An Azure Cosmos DB Gremlin graph event. Variables are only populated by the server, and will be ignored when sending a request. @@ -10487,44 +10268,39 @@ class RestorableGremlinGraphGetResult(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'resource': {'key': 'properties.resource', 'type': 'RestorableGremlinGraphPropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "resource": {"key": "properties.resource", "type": "RestorableGremlinGraphPropertiesResource"}, } - def __init__( - self, - *, - resource: Optional["RestorableGremlinGraphPropertiesResource"] = None, - **kwargs - ): + def __init__(self, *, resource: Optional["_models.RestorableGremlinGraphPropertiesResource"] = None, **kwargs): """ :keyword resource: The resource of an Azure Cosmos DB Gremlin graph event. :paramtype resource: ~azure.mgmt.cosmosdb.models.RestorableGremlinGraphPropertiesResource """ - super(RestorableGremlinGraphGetResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = None self.name = None self.type = None self.resource = resource -class RestorableGremlinGraphPropertiesResource(msrest.serialization.Model): +class RestorableGremlinGraphPropertiesResource(_serialization.Model): """The resource of an Azure Cosmos DB Gremlin graph event. Variables are only populated by the server, and will be ignored when sending a request. :ivar rid: A system generated property. A unique identifier. :vartype rid: str - :ivar operation_type: The operation type of this graph event. Possible values include: - "Create", "Replace", "Delete", "SystemOperation". + :ivar operation_type: The operation type of this graph event. Known values are: "Create", + "Replace", "Delete", "Recreate", and "SystemOperation". :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType :ivar event_timestamp: The time when this graph event happened. :vartype event_timestamp: str @@ -10535,28 +10311,24 @@ class RestorableGremlinGraphPropertiesResource(msrest.serialization.Model): """ _validation = { - 'rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, + "rid": {"readonly": True}, + "operation_type": {"readonly": True}, + "event_timestamp": {"readonly": True}, + "owner_id": {"readonly": True}, + "owner_resource_id": {"readonly": True}, } _attribute_map = { - 'rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "operation_type": {"key": "operationType", "type": "str"}, + "event_timestamp": {"key": "eventTimestamp", "type": "str"}, + "owner_id": {"key": "ownerId", "type": "str"}, + "owner_resource_id": {"key": "ownerResourceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableGremlinGraphPropertiesResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.rid = None self.operation_type = None self.event_timestamp = None @@ -10564,7 +10336,7 @@ def __init__( self.owner_resource_id = None -class RestorableGremlinGraphsListResult(msrest.serialization.Model): +class RestorableGremlinGraphsListResult(_serialization.Model): """The List operation response, that contains the Gremlin graph events and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -10574,52 +10346,90 @@ class RestorableGremlinGraphsListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[RestorableGremlinGraphGetResult]'}, + "value": {"key": "value", "type": "[RestorableGremlinGraphGetResult]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.value = None + + +class RestorableGremlinResourcesGetResult(_serialization.Model): + """Specific Databases to restore. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :ivar database_name: The name of the gremlin database available for restore. + :vartype database_name: str + :ivar graph_names: The names of the graphs available for restore. + :vartype graph_names: list[str] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "database_name": {"key": "databaseName", "type": "str"}, + "graph_names": {"key": "graphNames", "type": "[str]"}, + } + + def __init__(self, *, database_name: Optional[str] = None, graph_names: Optional[List[str]] = None, **kwargs): """ + :keyword database_name: The name of the gremlin database available for restore. + :paramtype database_name: str + :keyword graph_names: The names of the graphs available for restore. + :paramtype graph_names: list[str] """ - super(RestorableGremlinGraphsListResult, self).__init__(**kwargs) - self.value = None + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.database_name = database_name + self.graph_names = graph_names -class RestorableGremlinResourcesListResult(msrest.serialization.Model): +class RestorableGremlinResourcesListResult(_serialization.Model): """The List operation response, that contains the restorable Gremlin resources. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of restorable Gremlin resources, including the gremlin database and graph names. - :vartype value: list[~azure.mgmt.cosmosdb.models.GremlinDatabaseRestoreResource] + :vartype value: list[~azure.mgmt.cosmosdb.models.RestorableGremlinResourcesGetResult] """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[GremlinDatabaseRestoreResource]'}, + "value": {"key": "value", "type": "[RestorableGremlinResourcesGetResult]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableGremlinResourcesListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class RestorableLocationResource(msrest.serialization.Model): +class RestorableLocationResource(_serialization.Model): """Properties of the regional restorable account. Variables are only populated by the server, and will be ignored when sending a request. @@ -10638,33 +10448,29 @@ class RestorableLocationResource(msrest.serialization.Model): """ _validation = { - 'location_name': {'readonly': True}, - 'regional_database_account_instance_id': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'deletion_time': {'readonly': True}, + "location_name": {"readonly": True}, + "regional_database_account_instance_id": {"readonly": True}, + "creation_time": {"readonly": True}, + "deletion_time": {"readonly": True}, } _attribute_map = { - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'regional_database_account_instance_id': {'key': 'regionalDatabaseAccountInstanceId', 'type': 'str'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'deletion_time': {'key': 'deletionTime', 'type': 'iso-8601'}, + "location_name": {"key": "locationName", "type": "str"}, + "regional_database_account_instance_id": {"key": "regionalDatabaseAccountInstanceId", "type": "str"}, + "creation_time": {"key": "creationTime", "type": "iso-8601"}, + "deletion_time": {"key": "deletionTime", "type": "iso-8601"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableLocationResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.location_name = None self.regional_database_account_instance_id = None self.creation_time = None self.deletion_time = None -class RestorableMongodbCollectionGetResult(msrest.serialization.Model): +class RestorableMongodbCollectionGetResult(_serialization.Model): """An Azure Cosmos DB MongoDB collection event. Variables are only populated by the server, and will be ignored when sending a request. @@ -10680,44 +10486,39 @@ class RestorableMongodbCollectionGetResult(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'resource': {'key': 'properties.resource', 'type': 'RestorableMongodbCollectionPropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "resource": {"key": "properties.resource", "type": "RestorableMongodbCollectionPropertiesResource"}, } - def __init__( - self, - *, - resource: Optional["RestorableMongodbCollectionPropertiesResource"] = None, - **kwargs - ): + def __init__(self, *, resource: Optional["_models.RestorableMongodbCollectionPropertiesResource"] = None, **kwargs): """ :keyword resource: The resource of an Azure Cosmos DB MongoDB collection event. :paramtype resource: ~azure.mgmt.cosmosdb.models.RestorableMongodbCollectionPropertiesResource """ - super(RestorableMongodbCollectionGetResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = None self.name = None self.type = None self.resource = resource -class RestorableMongodbCollectionPropertiesResource(msrest.serialization.Model): +class RestorableMongodbCollectionPropertiesResource(_serialization.Model): """The resource of an Azure Cosmos DB MongoDB collection event. Variables are only populated by the server, and will be ignored when sending a request. :ivar rid: A system generated property. A unique identifier. :vartype rid: str - :ivar operation_type: The operation type of this collection event. Possible values include: - "Create", "Replace", "Delete", "SystemOperation". + :ivar operation_type: The operation type of this collection event. Known values are: "Create", + "Replace", "Delete", "Recreate", and "SystemOperation". :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType :ivar event_timestamp: The time when this collection event happened. :vartype event_timestamp: str @@ -10728,28 +10529,24 @@ class RestorableMongodbCollectionPropertiesResource(msrest.serialization.Model): """ _validation = { - 'rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, + "rid": {"readonly": True}, + "operation_type": {"readonly": True}, + "event_timestamp": {"readonly": True}, + "owner_id": {"readonly": True}, + "owner_resource_id": {"readonly": True}, } _attribute_map = { - 'rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "operation_type": {"key": "operationType", "type": "str"}, + "event_timestamp": {"key": "eventTimestamp", "type": "str"}, + "owner_id": {"key": "ownerId", "type": "str"}, + "owner_resource_id": {"key": "ownerResourceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableMongodbCollectionPropertiesResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.rid = None self.operation_type = None self.event_timestamp = None @@ -10757,7 +10554,7 @@ def __init__( self.owner_resource_id = None -class RestorableMongodbCollectionsListResult(msrest.serialization.Model): +class RestorableMongodbCollectionsListResult(_serialization.Model): """The List operation response, that contains the MongoDB collection events and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -10767,24 +10564,20 @@ class RestorableMongodbCollectionsListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[RestorableMongodbCollectionGetResult]'}, + "value": {"key": "value", "type": "[RestorableMongodbCollectionGetResult]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableMongodbCollectionsListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class RestorableMongodbDatabaseGetResult(msrest.serialization.Model): +class RestorableMongodbDatabaseGetResult(_serialization.Model): """An Azure Cosmos DB MongoDB database event. Variables are only populated by the server, and will be ignored when sending a request. @@ -10800,44 +10593,39 @@ class RestorableMongodbDatabaseGetResult(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'resource': {'key': 'properties.resource', 'type': 'RestorableMongodbDatabasePropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "resource": {"key": "properties.resource", "type": "RestorableMongodbDatabasePropertiesResource"}, } - def __init__( - self, - *, - resource: Optional["RestorableMongodbDatabasePropertiesResource"] = None, - **kwargs - ): + def __init__(self, *, resource: Optional["_models.RestorableMongodbDatabasePropertiesResource"] = None, **kwargs): """ :keyword resource: The resource of an Azure Cosmos DB MongoDB database event. :paramtype resource: ~azure.mgmt.cosmosdb.models.RestorableMongodbDatabasePropertiesResource """ - super(RestorableMongodbDatabaseGetResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = None self.name = None self.type = None self.resource = resource -class RestorableMongodbDatabasePropertiesResource(msrest.serialization.Model): +class RestorableMongodbDatabasePropertiesResource(_serialization.Model): """The resource of an Azure Cosmos DB MongoDB database event. Variables are only populated by the server, and will be ignored when sending a request. :ivar rid: A system generated property. A unique identifier. :vartype rid: str - :ivar operation_type: The operation type of this database event. Possible values include: - "Create", "Replace", "Delete", "SystemOperation". + :ivar operation_type: The operation type of this database event. Known values are: "Create", + "Replace", "Delete", "Recreate", and "SystemOperation". :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType :ivar event_timestamp: The time when this database event happened. :vartype event_timestamp: str @@ -10848,28 +10636,24 @@ class RestorableMongodbDatabasePropertiesResource(msrest.serialization.Model): """ _validation = { - 'rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, + "rid": {"readonly": True}, + "operation_type": {"readonly": True}, + "event_timestamp": {"readonly": True}, + "owner_id": {"readonly": True}, + "owner_resource_id": {"readonly": True}, } _attribute_map = { - 'rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "operation_type": {"key": "operationType", "type": "str"}, + "event_timestamp": {"key": "eventTimestamp", "type": "str"}, + "owner_id": {"key": "ownerId", "type": "str"}, + "owner_resource_id": {"key": "ownerResourceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableMongodbDatabasePropertiesResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.rid = None self.operation_type = None self.event_timestamp = None @@ -10877,7 +10661,7 @@ def __init__( self.owner_resource_id = None -class RestorableMongodbDatabasesListResult(msrest.serialization.Model): +class RestorableMongodbDatabasesListResult(_serialization.Model): """The List operation response, that contains the MongoDB database events and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -10887,51 +10671,89 @@ class RestorableMongodbDatabasesListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[RestorableMongodbDatabaseGetResult]'}, + "value": {"key": "value", "type": "[RestorableMongodbDatabaseGetResult]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.value = None + + +class RestorableMongodbResourcesGetResult(_serialization.Model): + """Specific Databases to restore. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :ivar database_name: The name of the database available for restore. + :vartype database_name: str + :ivar collection_names: The names of the collections available for restore. + :vartype collection_names: list[str] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "database_name": {"key": "databaseName", "type": "str"}, + "collection_names": {"key": "collectionNames", "type": "[str]"}, + } + + def __init__(self, *, database_name: Optional[str] = None, collection_names: Optional[List[str]] = None, **kwargs): """ + :keyword database_name: The name of the database available for restore. + :paramtype database_name: str + :keyword collection_names: The names of the collections available for restore. + :paramtype collection_names: list[str] """ - super(RestorableMongodbDatabasesListResult, self).__init__(**kwargs) - self.value = None + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.database_name = database_name + self.collection_names = collection_names -class RestorableMongodbResourcesListResult(msrest.serialization.Model): +class RestorableMongodbResourcesListResult(_serialization.Model): """The List operation response, that contains the restorable MongoDB resources. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of restorable MongoDB resources, including the database and collection names. - :vartype value: list[~azure.mgmt.cosmosdb.models.DatabaseRestoreResource] + :vartype value: list[~azure.mgmt.cosmosdb.models.RestorableMongodbResourcesGetResult] """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[DatabaseRestoreResource]'}, + "value": {"key": "value", "type": "[RestorableMongodbResourcesGetResult]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableMongodbResourcesListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class RestorableSqlContainerGetResult(msrest.serialization.Model): +class RestorableSqlContainerGetResult(_serialization.Model): """An Azure Cosmos DB SQL container event. Variables are only populated by the server, and will be ignored when sending a request. @@ -10947,44 +10769,39 @@ class RestorableSqlContainerGetResult(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'resource': {'key': 'properties.resource', 'type': 'RestorableSqlContainerPropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "resource": {"key": "properties.resource", "type": "RestorableSqlContainerPropertiesResource"}, } - def __init__( - self, - *, - resource: Optional["RestorableSqlContainerPropertiesResource"] = None, - **kwargs - ): + def __init__(self, *, resource: Optional["_models.RestorableSqlContainerPropertiesResource"] = None, **kwargs): """ :keyword resource: The resource of an Azure Cosmos DB SQL container event. :paramtype resource: ~azure.mgmt.cosmosdb.models.RestorableSqlContainerPropertiesResource """ - super(RestorableSqlContainerGetResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = None self.name = None self.type = None self.resource = resource -class RestorableSqlContainerPropertiesResource(msrest.serialization.Model): +class RestorableSqlContainerPropertiesResource(_serialization.Model): """The resource of an Azure Cosmos DB SQL container event. Variables are only populated by the server, and will be ignored when sending a request. :ivar rid: A system generated property. A unique identifier. :vartype rid: str - :ivar operation_type: The operation type of this container event. Possible values include: - "Create", "Replace", "Delete", "SystemOperation". + :ivar operation_type: The operation type of this container event. Known values are: "Create", + "Replace", "Delete", "Recreate", and "SystemOperation". :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType :ivar event_timestamp: The when this container event happened. :vartype event_timestamp: str @@ -10998,34 +10815,31 @@ class RestorableSqlContainerPropertiesResource(msrest.serialization.Model): """ _validation = { - 'rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, + "rid": {"readonly": True}, + "operation_type": {"readonly": True}, + "event_timestamp": {"readonly": True}, + "owner_id": {"readonly": True}, + "owner_resource_id": {"readonly": True}, } _attribute_map = { - 'rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, - 'container': {'key': 'container', 'type': 'RestorableSqlContainerPropertiesResourceContainer'}, + "rid": {"key": "_rid", "type": "str"}, + "operation_type": {"key": "operationType", "type": "str"}, + "event_timestamp": {"key": "eventTimestamp", "type": "str"}, + "owner_id": {"key": "ownerId", "type": "str"}, + "owner_resource_id": {"key": "ownerResourceId", "type": "str"}, + "container": {"key": "container", "type": "RestorableSqlContainerPropertiesResourceContainer"}, } def __init__( - self, - *, - container: Optional["RestorableSqlContainerPropertiesResourceContainer"] = None, - **kwargs + self, *, container: Optional["_models.RestorableSqlContainerPropertiesResourceContainer"] = None, **kwargs ): """ :keyword container: Cosmos DB SQL container resource object. :paramtype container: ~azure.mgmt.cosmosdb.models.RestorableSqlContainerPropertiesResourceContainer """ - super(RestorableSqlContainerPropertiesResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.rid = None self.operation_type = None self.event_timestamp = None @@ -11034,12 +10848,12 @@ def __init__( self.container = container -class SqlContainerResource(msrest.serialization.Model): +class SqlContainerResource(_serialization.Model): """Cosmos DB SQL container resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB SQL container. + :ivar id: Name of the Cosmos DB SQL container. Required. :vartype id: str :ivar indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. @@ -11057,39 +10871,48 @@ class SqlContainerResource(msrest.serialization.Model): :ivar client_encryption_policy: The client encryption policy for the container. :vartype client_encryption_policy: ~azure.mgmt.cosmosdb.models.ClientEncryptionPolicy :ivar analytical_storage_ttl: Analytical TTL. - :vartype analytical_storage_ttl: long + :vartype analytical_storage_ttl: int + :ivar restore_parameters: Parameters to indicate the information about the restore. + :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" + and "Restore". + :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - 'client_encryption_policy': {'key': 'clientEncryptionPolicy', 'type': 'ClientEncryptionPolicy'}, - 'analytical_storage_ttl': {'key': 'analyticalStorageTtl', 'type': 'long'}, + "id": {"key": "id", "type": "str"}, + "indexing_policy": {"key": "indexingPolicy", "type": "IndexingPolicy"}, + "partition_key": {"key": "partitionKey", "type": "ContainerPartitionKey"}, + "default_ttl": {"key": "defaultTtl", "type": "int"}, + "unique_key_policy": {"key": "uniqueKeyPolicy", "type": "UniqueKeyPolicy"}, + "conflict_resolution_policy": {"key": "conflictResolutionPolicy", "type": "ConflictResolutionPolicy"}, + "client_encryption_policy": {"key": "clientEncryptionPolicy", "type": "ClientEncryptionPolicy"}, + "analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"}, + "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, + "create_mode": {"key": "createMode", "type": "str"}, } def __init__( self, *, - id: str, - indexing_policy: Optional["IndexingPolicy"] = None, - partition_key: Optional["ContainerPartitionKey"] = None, + id: str, # pylint: disable=redefined-builtin + indexing_policy: Optional["_models.IndexingPolicy"] = None, + partition_key: Optional["_models.ContainerPartitionKey"] = None, default_ttl: Optional[int] = None, - unique_key_policy: Optional["UniqueKeyPolicy"] = None, - conflict_resolution_policy: Optional["ConflictResolutionPolicy"] = None, - client_encryption_policy: Optional["ClientEncryptionPolicy"] = None, + unique_key_policy: Optional["_models.UniqueKeyPolicy"] = None, + conflict_resolution_policy: Optional["_models.ConflictResolutionPolicy"] = None, + client_encryption_policy: Optional["_models.ClientEncryptionPolicy"] = None, analytical_storage_ttl: Optional[int] = None, + restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, + create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB SQL container. + :keyword id: Name of the Cosmos DB SQL container. Required. :paramtype id: str :keyword indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. @@ -11107,9 +10930,14 @@ def __init__( :keyword client_encryption_policy: The client encryption policy for the container. :paramtype client_encryption_policy: ~azure.mgmt.cosmosdb.models.ClientEncryptionPolicy :keyword analytical_storage_ttl: Analytical TTL. - :paramtype analytical_storage_ttl: long + :paramtype analytical_storage_ttl: int + :keyword restore_parameters: Parameters to indicate the information about the restore. + :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: + "Default" and "Restore". + :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ - super(SqlContainerResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id self.indexing_policy = indexing_policy self.partition_key = partition_key @@ -11118,16 +10946,27 @@ def __init__( self.conflict_resolution_policy = conflict_resolution_policy self.client_encryption_policy = client_encryption_policy self.analytical_storage_ttl = analytical_storage_ttl + self.restore_parameters = restore_parameters + self.create_mode = create_mode -class RestorableSqlContainerPropertiesResourceContainer(ExtendedResourceProperties, SqlContainerResource): +class RestorableSqlContainerPropertiesResourceContainer( + SqlContainerResource, ExtendedResourceProperties +): # pylint: disable=too-many-instance-attributes """Cosmos DB SQL container resource object. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB SQL container. + :ivar rid: A system generated property. A unique identifier. + :vartype rid: str + :ivar ts: A system generated property that denotes the last updated timestamp of the resource. + :vartype ts: float + :ivar etag: A system generated property representing the resource etag required for optimistic + concurrency control. + :vartype etag: str + :ivar id: Name of the Cosmos DB SQL container. Required. :vartype id: str :ivar indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. @@ -11145,57 +10984,59 @@ class RestorableSqlContainerPropertiesResourceContainer(ExtendedResourceProperti :ivar client_encryption_policy: The client encryption policy for the container. :vartype client_encryption_policy: ~azure.mgmt.cosmosdb.models.ClientEncryptionPolicy :ivar analytical_storage_ttl: Analytical TTL. - :vartype analytical_storage_ttl: long - :ivar rid: A system generated property. A unique identifier. - :vartype rid: str - :ivar ts: A system generated property that denotes the last updated timestamp of the resource. - :vartype ts: float - :ivar etag: A system generated property representing the resource etag required for optimistic - concurrency control. - :vartype etag: str + :vartype analytical_storage_ttl: int + :ivar restore_parameters: Parameters to indicate the information about the restore. + :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" + and "Restore". + :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :ivar self_property: A system generated property that specifies the addressable path of the container resource. :vartype self_property: str """ _validation = { - 'id': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, - 'self_property': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, + "self_property": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - 'client_encryption_policy': {'key': 'clientEncryptionPolicy', 'type': 'ClientEncryptionPolicy'}, - 'analytical_storage_ttl': {'key': 'analyticalStorageTtl', 'type': 'long'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, - 'self_property': {'key': '_self', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "indexing_policy": {"key": "indexingPolicy", "type": "IndexingPolicy"}, + "partition_key": {"key": "partitionKey", "type": "ContainerPartitionKey"}, + "default_ttl": {"key": "defaultTtl", "type": "int"}, + "unique_key_policy": {"key": "uniqueKeyPolicy", "type": "UniqueKeyPolicy"}, + "conflict_resolution_policy": {"key": "conflictResolutionPolicy", "type": "ConflictResolutionPolicy"}, + "client_encryption_policy": {"key": "clientEncryptionPolicy", "type": "ClientEncryptionPolicy"}, + "analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"}, + "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, + "create_mode": {"key": "createMode", "type": "str"}, + "self_property": {"key": "_self", "type": "str"}, } def __init__( self, *, - id: str, - indexing_policy: Optional["IndexingPolicy"] = None, - partition_key: Optional["ContainerPartitionKey"] = None, + id: str, # pylint: disable=redefined-builtin + indexing_policy: Optional["_models.IndexingPolicy"] = None, + partition_key: Optional["_models.ContainerPartitionKey"] = None, default_ttl: Optional[int] = None, - unique_key_policy: Optional["UniqueKeyPolicy"] = None, - conflict_resolution_policy: Optional["ConflictResolutionPolicy"] = None, - client_encryption_policy: Optional["ClientEncryptionPolicy"] = None, + unique_key_policy: Optional["_models.UniqueKeyPolicy"] = None, + conflict_resolution_policy: Optional["_models.ConflictResolutionPolicy"] = None, + client_encryption_policy: Optional["_models.ClientEncryptionPolicy"] = None, analytical_storage_ttl: Optional[int] = None, + restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, + create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB SQL container. + :keyword id: Name of the Cosmos DB SQL container. Required. :paramtype id: str :keyword indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. @@ -11213,9 +11054,30 @@ def __init__( :keyword client_encryption_policy: The client encryption policy for the container. :paramtype client_encryption_policy: ~azure.mgmt.cosmosdb.models.ClientEncryptionPolicy :keyword analytical_storage_ttl: Analytical TTL. - :paramtype analytical_storage_ttl: long + :paramtype analytical_storage_ttl: int + :keyword restore_parameters: Parameters to indicate the information about the restore. + :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: + "Default" and "Restore". + :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ - super(RestorableSqlContainerPropertiesResourceContainer, self).__init__(id=id, indexing_policy=indexing_policy, partition_key=partition_key, default_ttl=default_ttl, unique_key_policy=unique_key_policy, conflict_resolution_policy=conflict_resolution_policy, client_encryption_policy=client_encryption_policy, analytical_storage_ttl=analytical_storage_ttl, **kwargs) + super().__init__( + id=id, + indexing_policy=indexing_policy, + partition_key=partition_key, + default_ttl=default_ttl, + unique_key_policy=unique_key_policy, + conflict_resolution_policy=conflict_resolution_policy, + client_encryption_policy=client_encryption_policy, + analytical_storage_ttl=analytical_storage_ttl, + restore_parameters=restore_parameters, + create_mode=create_mode, + **kwargs + ) + self.rid = None + self.ts = None + self.etag = None + self.self_property = None self.id = id self.indexing_policy = indexing_policy self.partition_key = partition_key @@ -11224,13 +11086,11 @@ def __init__( self.conflict_resolution_policy = conflict_resolution_policy self.client_encryption_policy = client_encryption_policy self.analytical_storage_ttl = analytical_storage_ttl - self.self_property = None - self.rid = None - self.ts = None - self.etag = None + self.restore_parameters = restore_parameters + self.create_mode = create_mode -class RestorableSqlContainersListResult(msrest.serialization.Model): +class RestorableSqlContainersListResult(_serialization.Model): """The List operation response, that contains the SQL container events and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -11240,24 +11100,20 @@ class RestorableSqlContainersListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[RestorableSqlContainerGetResult]'}, + "value": {"key": "value", "type": "[RestorableSqlContainerGetResult]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableSqlContainersListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class RestorableSqlDatabaseGetResult(msrest.serialization.Model): +class RestorableSqlDatabaseGetResult(_serialization.Model): """An Azure Cosmos DB SQL database event. Variables are only populated by the server, and will be ignored when sending a request. @@ -11273,44 +11129,39 @@ class RestorableSqlDatabaseGetResult(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'resource': {'key': 'properties.resource', 'type': 'RestorableSqlDatabasePropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "resource": {"key": "properties.resource", "type": "RestorableSqlDatabasePropertiesResource"}, } - def __init__( - self, - *, - resource: Optional["RestorableSqlDatabasePropertiesResource"] = None, - **kwargs - ): + def __init__(self, *, resource: Optional["_models.RestorableSqlDatabasePropertiesResource"] = None, **kwargs): """ :keyword resource: The resource of an Azure Cosmos DB SQL database event. :paramtype resource: ~azure.mgmt.cosmosdb.models.RestorableSqlDatabasePropertiesResource """ - super(RestorableSqlDatabaseGetResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = None self.name = None self.type = None self.resource = resource -class RestorableSqlDatabasePropertiesResource(msrest.serialization.Model): +class RestorableSqlDatabasePropertiesResource(_serialization.Model): """The resource of an Azure Cosmos DB SQL database event. Variables are only populated by the server, and will be ignored when sending a request. :ivar rid: A system generated property. A unique identifier. :vartype rid: str - :ivar operation_type: The operation type of this database event. Possible values include: - "Create", "Replace", "Delete", "SystemOperation". + :ivar operation_type: The operation type of this database event. Known values are: "Create", + "Replace", "Delete", "Recreate", and "SystemOperation". :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType :ivar event_timestamp: The time when this database event happened. :vartype event_timestamp: str @@ -11323,34 +11174,31 @@ class RestorableSqlDatabasePropertiesResource(msrest.serialization.Model): """ _validation = { - 'rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, + "rid": {"readonly": True}, + "operation_type": {"readonly": True}, + "event_timestamp": {"readonly": True}, + "owner_id": {"readonly": True}, + "owner_resource_id": {"readonly": True}, } _attribute_map = { - 'rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, - 'database': {'key': 'database', 'type': 'RestorableSqlDatabasePropertiesResourceDatabase'}, + "rid": {"key": "_rid", "type": "str"}, + "operation_type": {"key": "operationType", "type": "str"}, + "event_timestamp": {"key": "eventTimestamp", "type": "str"}, + "owner_id": {"key": "ownerId", "type": "str"}, + "owner_resource_id": {"key": "ownerResourceId", "type": "str"}, + "database": {"key": "database", "type": "RestorableSqlDatabasePropertiesResourceDatabase"}, } def __init__( - self, - *, - database: Optional["RestorableSqlDatabasePropertiesResourceDatabase"] = None, - **kwargs + self, *, database: Optional["_models.RestorableSqlDatabasePropertiesResourceDatabase"] = None, **kwargs ): """ :keyword database: Cosmos DB SQL database resource object. :paramtype database: ~azure.mgmt.cosmosdb.models.RestorableSqlDatabasePropertiesResourceDatabase """ - super(RestorableSqlDatabasePropertiesResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.rid = None self.operation_type = None self.event_timestamp = None @@ -11359,35 +11207,51 @@ def __init__( self.database = database -class SqlDatabaseResource(msrest.serialization.Model): +class SqlDatabaseResource(_serialization.Model): """Cosmos DB SQL database resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB SQL database. + :ivar id: Name of the Cosmos DB SQL database. Required. :vartype id: str + :ivar restore_parameters: Parameters to indicate the information about the restore. + :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" + and "Restore". + :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, + "create_mode": {"key": "createMode", "type": "str"}, } def __init__( self, *, - id: str, + id: str, # pylint: disable=redefined-builtin + restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, + create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB SQL database. + :keyword id: Name of the Cosmos DB SQL database. Required. :paramtype id: str + :keyword restore_parameters: Parameters to indicate the information about the restore. + :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: + "Default" and "Restore". + :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ - super(SqlDatabaseResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id + self.restore_parameters = restore_parameters + self.create_mode = create_mode class RestorableSqlDatabasePropertiesResourceDatabase(SqlDatabaseResource, ExtendedResourceProperties): @@ -11404,8 +11268,13 @@ class RestorableSqlDatabasePropertiesResourceDatabase(SqlDatabaseResource, Exten :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str - :ivar id: Required. Name of the Cosmos DB SQL database. + :ivar id: Name of the Cosmos DB SQL database. Required. :vartype id: str + :ivar restore_parameters: Parameters to indicate the information about the restore. + :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" + and "Restore". + :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :ivar colls: A system generated property that specified the addressable path of the collections resource. :vartype colls: str @@ -11418,36 +11287,45 @@ class RestorableSqlDatabasePropertiesResourceDatabase(SqlDatabaseResource, Exten """ _validation = { - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, - 'id': {'required': True}, - 'colls': {'readonly': True}, - 'users': {'readonly': True}, - 'self_property': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, + "colls": {"readonly": True}, + "users": {"readonly": True}, + "self_property": {"readonly": True}, } _attribute_map = { - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'colls': {'key': '_colls', 'type': 'str'}, - 'users': {'key': '_users', 'type': 'str'}, - 'self_property': {'key': '_self', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, + "create_mode": {"key": "createMode", "type": "str"}, + "colls": {"key": "_colls", "type": "str"}, + "users": {"key": "_users", "type": "str"}, + "self_property": {"key": "_self", "type": "str"}, } def __init__( self, *, - id: str, + id: str, # pylint: disable=redefined-builtin + restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, + create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB SQL database. + :keyword id: Name of the Cosmos DB SQL database. Required. :paramtype id: str + :keyword restore_parameters: Parameters to indicate the information about the restore. + :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: + "Default" and "Restore". + :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ - super(RestorableSqlDatabasePropertiesResourceDatabase, self).__init__(id=id, **kwargs) + super().__init__(id=id, restore_parameters=restore_parameters, create_mode=create_mode, **kwargs) self.rid = None self.ts = None self.etag = None @@ -11455,9 +11333,11 @@ def __init__( self.users = None self.self_property = None self.id = id + self.restore_parameters = restore_parameters + self.create_mode = create_mode -class RestorableSqlDatabasesListResult(msrest.serialization.Model): +class RestorableSqlDatabasesListResult(_serialization.Model): """The List operation response, that contains the SQL database events and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -11467,51 +11347,89 @@ class RestorableSqlDatabasesListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[RestorableSqlDatabaseGetResult]'}, + "value": {"key": "value", "type": "[RestorableSqlDatabaseGetResult]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.value = None + + +class RestorableSqlResourcesGetResult(_serialization.Model): + """Specific Databases to restore. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :ivar database_name: The name of the database available for restore. + :vartype database_name: str + :ivar collection_names: The names of the collections available for restore. + :vartype collection_names: list[str] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "database_name": {"key": "databaseName", "type": "str"}, + "collection_names": {"key": "collectionNames", "type": "[str]"}, + } + + def __init__(self, *, database_name: Optional[str] = None, collection_names: Optional[List[str]] = None, **kwargs): """ + :keyword database_name: The name of the database available for restore. + :paramtype database_name: str + :keyword collection_names: The names of the collections available for restore. + :paramtype collection_names: list[str] """ - super(RestorableSqlDatabasesListResult, self).__init__(**kwargs) - self.value = None + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.database_name = database_name + self.collection_names = collection_names -class RestorableSqlResourcesListResult(msrest.serialization.Model): +class RestorableSqlResourcesListResult(_serialization.Model): """The List operation response, that contains the restorable SQL resources. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of restorable SQL resources, including the database and collection names. - :vartype value: list[~azure.mgmt.cosmosdb.models.DatabaseRestoreResource] + :vartype value: list[~azure.mgmt.cosmosdb.models.RestorableSqlResourcesGetResult] """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[DatabaseRestoreResource]'}, + "value": {"key": "value", "type": "[RestorableSqlResourcesGetResult]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableSqlResourcesListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class RestorableTableGetResult(msrest.serialization.Model): +class RestorableTableGetResult(_serialization.Model): """An Azure Cosmos DB Table event. Variables are only populated by the server, and will be ignored when sending a request. @@ -11527,44 +11445,39 @@ class RestorableTableGetResult(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'resource': {'key': 'properties.resource', 'type': 'RestorableTablePropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "resource": {"key": "properties.resource", "type": "RestorableTablePropertiesResource"}, } - def __init__( - self, - *, - resource: Optional["RestorableTablePropertiesResource"] = None, - **kwargs - ): + def __init__(self, *, resource: Optional["_models.RestorableTablePropertiesResource"] = None, **kwargs): """ :keyword resource: The resource of an Azure Cosmos DB Table event. :paramtype resource: ~azure.mgmt.cosmosdb.models.RestorableTablePropertiesResource """ - super(RestorableTableGetResult, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = None self.name = None self.type = None self.resource = resource -class RestorableTablePropertiesResource(msrest.serialization.Model): +class RestorableTablePropertiesResource(_serialization.Model): """The resource of an Azure Cosmos DB Table event. Variables are only populated by the server, and will be ignored when sending a request. :ivar rid: A system generated property. A unique identifier. :vartype rid: str - :ivar operation_type: The operation type of this table event. Possible values include: - "Create", "Replace", "Delete", "SystemOperation". + :ivar operation_type: The operation type of this table event. Known values are: "Create", + "Replace", "Delete", "Recreate", and "SystemOperation". :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType :ivar event_timestamp: The time when this table event happened. :vartype event_timestamp: str @@ -11575,28 +11488,24 @@ class RestorableTablePropertiesResource(msrest.serialization.Model): """ _validation = { - 'rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, + "rid": {"readonly": True}, + "operation_type": {"readonly": True}, + "event_timestamp": {"readonly": True}, + "owner_id": {"readonly": True}, + "owner_resource_id": {"readonly": True}, } _attribute_map = { - 'rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "operation_type": {"key": "operationType", "type": "str"}, + "event_timestamp": {"key": "eventTimestamp", "type": "str"}, + "owner_id": {"key": "ownerId", "type": "str"}, + "owner_resource_id": {"key": "ownerResourceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableTablePropertiesResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.rid = None self.operation_type = None self.event_timestamp = None @@ -11604,34 +11513,63 @@ def __init__( self.owner_resource_id = None -class RestorableTableResourcesListResult(msrest.serialization.Model): +class RestorableTableResourcesGetResult(_serialization.Model): + """Specific Databases to restore. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the Table. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + } + + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class RestorableTableResourcesListResult(_serialization.Model): """List of restorable table names. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of restorable table names. - :vartype value: list[str] + :vartype value: list[~azure.mgmt.cosmosdb.models.RestorableTableResourcesGetResult] """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[str]'}, + "value": {"key": "value", "type": "[RestorableTableResourcesGetResult]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableTableResourcesListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class RestorableTablesListResult(msrest.serialization.Model): +class RestorableTablesListResult(_serialization.Model): """The List operation response, that contains the Table events and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -11641,34 +11579,30 @@ class RestorableTablesListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[RestorableTableGetResult]'}, + "value": {"key": "value", "type": "[RestorableTableGetResult]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(RestorableTablesListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class RestoreParameters(msrest.serialization.Model): +class RestoreParameters(RestoreParametersBase): """Parameters to indicate the information about the restore. - :ivar restore_mode: Describes the mode of the restore. Possible values include: "PointInTime". - :vartype restore_mode: str or ~azure.mgmt.cosmosdb.models.RestoreMode :ivar restore_source: The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. :vartype restore_source: str :ivar restore_timestamp_in_utc: Time to which the account has to be restored (ISO-8601 format). :vartype restore_timestamp_in_utc: ~datetime.datetime + :ivar restore_mode: Describes the mode of the restore. "PointInTime" + :vartype restore_mode: str or ~azure.mgmt.cosmosdb.models.RestoreMode :ivar databases_to_restore: List of specific databases available for restore. :vartype databases_to_restore: list[~azure.mgmt.cosmosdb.models.DatabaseRestoreResource] :ivar gremlin_databases_to_restore: List of specific gremlin databases available for restore. @@ -11679,29 +11613,29 @@ class RestoreParameters(msrest.serialization.Model): """ _attribute_map = { - 'restore_mode': {'key': 'restoreMode', 'type': 'str'}, - 'restore_source': {'key': 'restoreSource', 'type': 'str'}, - 'restore_timestamp_in_utc': {'key': 'restoreTimestampInUtc', 'type': 'iso-8601'}, - 'databases_to_restore': {'key': 'databasesToRestore', 'type': '[DatabaseRestoreResource]'}, - 'gremlin_databases_to_restore': {'key': 'gremlinDatabasesToRestore', 'type': '[GremlinDatabaseRestoreResource]'}, - 'tables_to_restore': {'key': 'tablesToRestore', 'type': '[str]'}, + "restore_source": {"key": "restoreSource", "type": "str"}, + "restore_timestamp_in_utc": {"key": "restoreTimestampInUtc", "type": "iso-8601"}, + "restore_mode": {"key": "restoreMode", "type": "str"}, + "databases_to_restore": {"key": "databasesToRestore", "type": "[DatabaseRestoreResource]"}, + "gremlin_databases_to_restore": { + "key": "gremlinDatabasesToRestore", + "type": "[GremlinDatabaseRestoreResource]", + }, + "tables_to_restore": {"key": "tablesToRestore", "type": "[str]"}, } def __init__( self, *, - restore_mode: Optional[Union[str, "RestoreMode"]] = None, restore_source: Optional[str] = None, restore_timestamp_in_utc: Optional[datetime.datetime] = None, - databases_to_restore: Optional[List["DatabaseRestoreResource"]] = None, - gremlin_databases_to_restore: Optional[List["GremlinDatabaseRestoreResource"]] = None, + restore_mode: Optional[Union[str, "_models.RestoreMode"]] = None, + databases_to_restore: Optional[List["_models.DatabaseRestoreResource"]] = None, + gremlin_databases_to_restore: Optional[List["_models.GremlinDatabaseRestoreResource"]] = None, tables_to_restore: Optional[List[str]] = None, **kwargs ): """ - :keyword restore_mode: Describes the mode of the restore. Possible values include: - "PointInTime". - :paramtype restore_mode: str or ~azure.mgmt.cosmosdb.models.RestoreMode :keyword restore_source: The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. @@ -11709,6 +11643,8 @@ def __init__( :keyword restore_timestamp_in_utc: Time to which the account has to be restored (ISO-8601 format). :paramtype restore_timestamp_in_utc: ~datetime.datetime + :keyword restore_mode: Describes the mode of the restore. "PointInTime" + :paramtype restore_mode: str or ~azure.mgmt.cosmosdb.models.RestoreMode :keyword databases_to_restore: List of specific databases available for restore. :paramtype databases_to_restore: list[~azure.mgmt.cosmosdb.models.DatabaseRestoreResource] :keyword gremlin_databases_to_restore: List of specific gremlin databases available for @@ -11718,10 +11654,8 @@ def __init__( :keyword tables_to_restore: List of specific tables available for restore. :paramtype tables_to_restore: list[str] """ - super(RestoreParameters, self).__init__(**kwargs) + super().__init__(restore_source=restore_source, restore_timestamp_in_utc=restore_timestamp_in_utc, **kwargs) self.restore_mode = restore_mode - self.restore_source = restore_source - self.restore_timestamp_in_utc = restore_timestamp_in_utc self.databases_to_restore = databases_to_restore self.gremlin_databases_to_restore = gremlin_databases_to_restore self.tables_to_restore = tables_to_restore @@ -11742,96 +11676,91 @@ class RetrieveThroughputParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a resource throughput. + :ivar resource: The standard JSON format of a resource throughput. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.RetrieveThroughputPropertiesResource """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'RetrieveThroughputPropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "RetrieveThroughputPropertiesResource"}, } def __init__( self, *, - resource: "RetrieveThroughputPropertiesResource", + resource: "_models.RetrieveThroughputPropertiesResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a resource throughput. + :keyword resource: The standard JSON format of a resource throughput. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.RetrieveThroughputPropertiesResource """ - super(RetrieveThroughputParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource -class RetrieveThroughputPropertiesResource(msrest.serialization.Model): +class RetrieveThroughputPropertiesResource(_serialization.Model): """Resource to retrieve throughput information for Cosmos DB resource. All required parameters must be populated in order to send to Azure. - :ivar physical_partition_ids: Required. Array of PhysicalPartitionId objects. + :ivar physical_partition_ids: Array of PhysicalPartitionId objects. Required. :vartype physical_partition_ids: list[~azure.mgmt.cosmosdb.models.PhysicalPartitionId] """ _validation = { - 'physical_partition_ids': {'required': True}, + "physical_partition_ids": {"required": True}, } _attribute_map = { - 'physical_partition_ids': {'key': 'physicalPartitionIds', 'type': '[PhysicalPartitionId]'}, + "physical_partition_ids": {"key": "physicalPartitionIds", "type": "[PhysicalPartitionId]"}, } - def __init__( - self, - *, - physical_partition_ids: List["PhysicalPartitionId"], - **kwargs - ): + def __init__(self, *, physical_partition_ids: List["_models.PhysicalPartitionId"], **kwargs): """ - :keyword physical_partition_ids: Required. Array of PhysicalPartitionId objects. + :keyword physical_partition_ids: Array of PhysicalPartitionId objects. Required. :paramtype physical_partition_ids: list[~azure.mgmt.cosmosdb.models.PhysicalPartitionId] """ - super(RetrieveThroughputPropertiesResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.physical_partition_ids = physical_partition_ids -class Role(msrest.serialization.Model): +class Role(_serialization.Model): """The set of roles permitted through this Role Definition. :ivar db: The database name the role is applied. @@ -11841,29 +11770,23 @@ class Role(msrest.serialization.Model): """ _attribute_map = { - 'db': {'key': 'db', 'type': 'str'}, - 'role': {'key': 'role', 'type': 'str'}, + "db": {"key": "db", "type": "str"}, + "role": {"key": "role", "type": "str"}, } - def __init__( - self, - *, - db: Optional[str] = None, - role: Optional[str] = None, - **kwargs - ): + def __init__(self, *, db: Optional[str] = None, role: Optional[str] = None, **kwargs): """ :keyword db: The database name the role is applied. :paramtype db: str :keyword role: The role name. :paramtype role: str """ - super(Role, self).__init__(**kwargs) + super().__init__(**kwargs) self.db = db self.role = role -class SeedNode(msrest.serialization.Model): +class SeedNode(_serialization.Model): """SeedNode. :ivar ip_address: IP address of this seed node. @@ -11871,20 +11794,15 @@ class SeedNode(msrest.serialization.Model): """ _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + "ip_address": {"key": "ipAddress", "type": "str"}, } - def __init__( - self, - *, - ip_address: Optional[str] = None, - **kwargs - ): + def __init__(self, *, ip_address: Optional[str] = None, **kwargs): """ :keyword ip_address: IP address of this seed node. :paramtype ip_address: str """ - super(SeedNode, self).__init__(**kwargs) + super().__init__(**kwargs) self.ip_address = ip_address @@ -11904,80 +11822,75 @@ class ServiceResource(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ServiceResourceProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "ServiceResourceProperties"}, } - def __init__( - self, - *, - properties: Optional["ServiceResourceProperties"] = None, - **kwargs - ): + def __init__(self, *, properties: Optional["_models.ServiceResourceProperties"] = None, **kwargs): """ :keyword properties: Services response resource. :paramtype properties: ~azure.mgmt.cosmosdb.models.ServiceResourceProperties """ - super(ServiceResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.properties = properties -class ServiceResourceCreateUpdateParameters(msrest.serialization.Model): +class ServiceResourceCreateUpdateParameters(_serialization.Model): """Parameters for Create or Update Request for ServiceResource. - :ivar instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". + :ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s", + "Cosmos.D8s", and "Cosmos.D16s". :vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :ivar instance_count: Instance count for the service. :vartype instance_count: int - :ivar service_type: ServiceType for the service. Possible values include: - "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", "MaterializedViewsBuilder". + :ivar service_type: ServiceType for the service. Known values are: "SqlDedicatedGateway", + "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder". :vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType """ _validation = { - 'instance_count': {'minimum': 0}, + "instance_count": {"minimum": 0}, } _attribute_map = { - 'instance_size': {'key': 'properties.instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'properties.instanceCount', 'type': 'int'}, - 'service_type': {'key': 'properties.serviceType', 'type': 'str'}, + "instance_size": {"key": "properties.instanceSize", "type": "str"}, + "instance_count": {"key": "properties.instanceCount", "type": "int"}, + "service_type": {"key": "properties.serviceType", "type": "str"}, } def __init__( self, *, - instance_size: Optional[Union[str, "ServiceSize"]] = None, + instance_size: Optional[Union[str, "_models.ServiceSize"]] = None, instance_count: Optional[int] = None, - service_type: Optional[Union[str, "ServiceType"]] = None, + service_type: Optional[Union[str, "_models.ServiceType"]] = None, **kwargs ): """ - :keyword instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". + :keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s", + "Cosmos.D8s", and "Cosmos.D16s". :paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :keyword instance_count: Instance count for the service. :paramtype instance_count: int - :keyword service_type: ServiceType for the service. Possible values include: - "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", "MaterializedViewsBuilder". + :keyword service_type: ServiceType for the service. Known values are: "SqlDedicatedGateway", + "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder". :paramtype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType """ - super(ServiceResourceCreateUpdateParameters, self).__init__(**kwargs) + super().__init__(**kwargs) self.instance_size = instance_size self.instance_count = instance_count self.service_type = service_type -class ServiceResourceListResult(msrest.serialization.Model): +class ServiceResourceListResult(_serialization.Model): """The List operation response, that contains the Service Resource and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -11987,24 +11900,20 @@ class ServiceResourceListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[ServiceResource]'}, + "value": {"key": "value", "type": "[ServiceResource]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(ServiceResourceListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class SpatialSpec(msrest.serialization.Model): +class SpatialSpec(_serialization.Model): """SpatialSpec. :ivar path: The path for which the indexing behavior applies to. Index paths typically start @@ -12015,16 +11924,12 @@ class SpatialSpec(msrest.serialization.Model): """ _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'types': {'key': 'types', 'type': '[str]'}, + "path": {"key": "path", "type": "str"}, + "types": {"key": "types", "type": "[str]"}, } def __init__( - self, - *, - path: Optional[str] = None, - types: Optional[List[Union[str, "SpatialType"]]] = None, - **kwargs + self, *, path: Optional[str] = None, types: Optional[List[Union[str, "_models.SpatialType"]]] = None, **kwargs ): """ :keyword path: The path for which the indexing behavior applies to. Index paths typically start @@ -12033,7 +11938,7 @@ def __init__( :keyword types: List of path's spatial type. :paramtype types: list[str or ~azure.mgmt.cosmosdb.models.SpatialType] """ - super(SpatialSpec, self).__init__(**kwargs) + super().__init__(**kwargs) self.path = path self.types = types @@ -12053,16 +11958,16 @@ class SqlContainerCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a container. + :ivar resource: The standard JSON format of a container. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -12070,52 +11975,52 @@ class SqlContainerCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "SqlContainerResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "SqlContainerResource", + resource: "_models.SqlContainerResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a container. + :keyword resource: The standard JSON format of a container. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(SqlContainerCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options @@ -12131,15 +12036,15 @@ class SqlContainerGetPropertiesOptions(OptionsResource): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -12149,17 +12054,26 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(SqlContainerGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super().__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) -class SqlContainerGetPropertiesResource(ExtendedResourceProperties, SqlContainerResource): +class SqlContainerGetPropertiesResource( + SqlContainerResource, ExtendedResourceProperties +): # pylint: disable=too-many-instance-attributes """SqlContainerGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB SQL container. + :ivar rid: A system generated property. A unique identifier. + :vartype rid: str + :ivar ts: A system generated property that denotes the last updated timestamp of the resource. + :vartype ts: float + :ivar etag: A system generated property representing the resource etag required for optimistic + concurrency control. + :vartype etag: str + :ivar id: Name of the Cosmos DB SQL container. Required. :vartype id: str :ivar indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. @@ -12177,52 +12091,54 @@ class SqlContainerGetPropertiesResource(ExtendedResourceProperties, SqlContainer :ivar client_encryption_policy: The client encryption policy for the container. :vartype client_encryption_policy: ~azure.mgmt.cosmosdb.models.ClientEncryptionPolicy :ivar analytical_storage_ttl: Analytical TTL. - :vartype analytical_storage_ttl: long - :ivar rid: A system generated property. A unique identifier. - :vartype rid: str - :ivar ts: A system generated property that denotes the last updated timestamp of the resource. - :vartype ts: float - :ivar etag: A system generated property representing the resource etag required for optimistic - concurrency control. - :vartype etag: str + :vartype analytical_storage_ttl: int + :ivar restore_parameters: Parameters to indicate the information about the restore. + :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" + and "Restore". + :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ _validation = { - 'id': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - 'client_encryption_policy': {'key': 'clientEncryptionPolicy', 'type': 'ClientEncryptionPolicy'}, - 'analytical_storage_ttl': {'key': 'analyticalStorageTtl', 'type': 'long'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "indexing_policy": {"key": "indexingPolicy", "type": "IndexingPolicy"}, + "partition_key": {"key": "partitionKey", "type": "ContainerPartitionKey"}, + "default_ttl": {"key": "defaultTtl", "type": "int"}, + "unique_key_policy": {"key": "uniqueKeyPolicy", "type": "UniqueKeyPolicy"}, + "conflict_resolution_policy": {"key": "conflictResolutionPolicy", "type": "ConflictResolutionPolicy"}, + "client_encryption_policy": {"key": "clientEncryptionPolicy", "type": "ClientEncryptionPolicy"}, + "analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"}, + "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, + "create_mode": {"key": "createMode", "type": "str"}, } def __init__( self, *, - id: str, - indexing_policy: Optional["IndexingPolicy"] = None, - partition_key: Optional["ContainerPartitionKey"] = None, + id: str, # pylint: disable=redefined-builtin + indexing_policy: Optional["_models.IndexingPolicy"] = None, + partition_key: Optional["_models.ContainerPartitionKey"] = None, default_ttl: Optional[int] = None, - unique_key_policy: Optional["UniqueKeyPolicy"] = None, - conflict_resolution_policy: Optional["ConflictResolutionPolicy"] = None, - client_encryption_policy: Optional["ClientEncryptionPolicy"] = None, + unique_key_policy: Optional["_models.UniqueKeyPolicy"] = None, + conflict_resolution_policy: Optional["_models.ConflictResolutionPolicy"] = None, + client_encryption_policy: Optional["_models.ClientEncryptionPolicy"] = None, analytical_storage_ttl: Optional[int] = None, + restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, + create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB SQL container. + :keyword id: Name of the Cosmos DB SQL container. Required. :paramtype id: str :keyword indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. @@ -12240,9 +12156,29 @@ def __init__( :keyword client_encryption_policy: The client encryption policy for the container. :paramtype client_encryption_policy: ~azure.mgmt.cosmosdb.models.ClientEncryptionPolicy :keyword analytical_storage_ttl: Analytical TTL. - :paramtype analytical_storage_ttl: long + :paramtype analytical_storage_ttl: int + :keyword restore_parameters: Parameters to indicate the information about the restore. + :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: + "Default" and "Restore". + :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ - super(SqlContainerGetPropertiesResource, self).__init__(id=id, indexing_policy=indexing_policy, partition_key=partition_key, default_ttl=default_ttl, unique_key_policy=unique_key_policy, conflict_resolution_policy=conflict_resolution_policy, client_encryption_policy=client_encryption_policy, analytical_storage_ttl=analytical_storage_ttl, **kwargs) + super().__init__( + id=id, + indexing_policy=indexing_policy, + partition_key=partition_key, + default_ttl=default_ttl, + unique_key_policy=unique_key_policy, + conflict_resolution_policy=conflict_resolution_policy, + client_encryption_policy=client_encryption_policy, + analytical_storage_ttl=analytical_storage_ttl, + restore_parameters=restore_parameters, + create_mode=create_mode, + **kwargs + ) + self.rid = None + self.ts = None + self.etag = None self.id = id self.indexing_policy = indexing_policy self.partition_key = partition_key @@ -12251,9 +12187,8 @@ def __init__( self.conflict_resolution_policy = conflict_resolution_policy self.client_encryption_policy = client_encryption_policy self.analytical_storage_ttl = analytical_storage_ttl - self.rid = None - self.ts = None - self.etag = None + self.restore_parameters = restore_parameters + self.create_mode = create_mode class SqlContainerGetResults(ARMResourceProperties): @@ -12269,12 +12204,12 @@ class SqlContainerGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -12285,20 +12220,20 @@ class SqlContainerGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'SqlContainerGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'SqlContainerGetPropertiesOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "SqlContainerGetPropertiesResource"}, + "options": {"key": "properties.options", "type": "SqlContainerGetPropertiesOptions"}, } def __init__( @@ -12306,20 +12241,20 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["SqlContainerGetPropertiesResource"] = None, - options: Optional["SqlContainerGetPropertiesOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.SqlContainerGetPropertiesResource"] = None, + options: Optional["_models.SqlContainerGetPropertiesOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -12328,12 +12263,12 @@ def __init__( :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.SqlContainerGetPropertiesOptions """ - super(SqlContainerGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class SqlContainerListResult(msrest.serialization.Model): +class SqlContainerListResult(_serialization.Model): """The List operation response, that contains the containers and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -12343,20 +12278,16 @@ class SqlContainerListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[SqlContainerGetResults]'}, + "value": {"key": "value", "type": "[SqlContainerGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(SqlContainerListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None @@ -12375,16 +12306,16 @@ class SqlDatabaseCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a SQL database. + :ivar resource: The standard JSON format of a SQL database. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -12392,52 +12323,52 @@ class SqlDatabaseCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "SqlDatabaseResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "SqlDatabaseResource", + resource: "_models.SqlDatabaseResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a SQL database. + :keyword resource: The standard JSON format of a SQL database. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(SqlDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options @@ -12453,15 +12384,15 @@ class SqlDatabaseGetPropertiesOptions(OptionsResource): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -12471,7 +12402,7 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(SqlDatabaseGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super().__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) class SqlDatabaseGetPropertiesResource(SqlDatabaseResource, ExtendedResourceProperties): @@ -12488,8 +12419,13 @@ class SqlDatabaseGetPropertiesResource(SqlDatabaseResource, ExtendedResourceProp :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str - :ivar id: Required. Name of the Cosmos DB SQL database. + :ivar id: Name of the Cosmos DB SQL database. Required. :vartype id: str + :ivar restore_parameters: Parameters to indicate the information about the restore. + :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" + and "Restore". + :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :ivar colls: A system generated property that specified the addressable path of the collections resource. :vartype colls: str @@ -12499,32 +12435,41 @@ class SqlDatabaseGetPropertiesResource(SqlDatabaseResource, ExtendedResourceProp """ _validation = { - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, - 'id': {'required': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, } _attribute_map = { - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'colls': {'key': '_colls', 'type': 'str'}, - 'users': {'key': '_users', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, + "create_mode": {"key": "createMode", "type": "str"}, + "colls": {"key": "_colls", "type": "str"}, + "users": {"key": "_users", "type": "str"}, } def __init__( self, *, - id: str, + id: str, # pylint: disable=redefined-builtin + restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, + create_mode: Union[str, "_models.CreateMode"] = "Default", colls: Optional[str] = None, users: Optional[str] = None, **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB SQL database. + :keyword id: Name of the Cosmos DB SQL database. Required. :paramtype id: str + :keyword restore_parameters: Parameters to indicate the information about the restore. + :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters + :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: + "Default" and "Restore". + :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :keyword colls: A system generated property that specified the addressable path of the collections resource. :paramtype colls: str @@ -12532,13 +12477,15 @@ def __init__( resource. :paramtype users: str """ - super(SqlDatabaseGetPropertiesResource, self).__init__(id=id, **kwargs) + super().__init__(id=id, restore_parameters=restore_parameters, create_mode=create_mode, **kwargs) self.rid = None self.ts = None self.etag = None self.colls = colls self.users = users self.id = id + self.restore_parameters = restore_parameters + self.create_mode = create_mode class SqlDatabaseGetResults(ARMResourceProperties): @@ -12554,12 +12501,12 @@ class SqlDatabaseGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -12570,20 +12517,20 @@ class SqlDatabaseGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'SqlDatabaseGetPropertiesOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "SqlDatabaseGetPropertiesResource"}, + "options": {"key": "properties.options", "type": "SqlDatabaseGetPropertiesOptions"}, } def __init__( @@ -12591,20 +12538,20 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["SqlDatabaseGetPropertiesResource"] = None, - options: Optional["SqlDatabaseGetPropertiesOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.SqlDatabaseGetPropertiesResource"] = None, + options: Optional["_models.SqlDatabaseGetPropertiesOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -12613,12 +12560,12 @@ def __init__( :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.SqlDatabaseGetPropertiesOptions """ - super(SqlDatabaseGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class SqlDatabaseListResult(msrest.serialization.Model): +class SqlDatabaseListResult(_serialization.Model): """The List operation response, that contains the SQL databases and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -12628,20 +12575,16 @@ class SqlDatabaseListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[SqlDatabaseGetResults]'}, + "value": {"key": "value", "type": "[SqlDatabaseGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(SqlDatabaseListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None @@ -12654,38 +12597,34 @@ class SqlDedicatedGatewayRegionalServiceResource(RegionalServiceResource): :vartype name: str :ivar location: The location name. :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". + :ivar status: Describes the status of a service. Known values are: "Creating", "Running", + "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus :ivar sql_dedicated_gateway_endpoint: The regional endpoint for SqlDedicatedGateway. :vartype sql_dedicated_gateway_endpoint: str """ _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'sql_dedicated_gateway_endpoint': {'readonly': True}, + "name": {"readonly": True}, + "location": {"readonly": True}, + "status": {"readonly": True}, + "sql_dedicated_gateway_endpoint": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'sql_dedicated_gateway_endpoint': {'key': 'sqlDedicatedGatewayEndpoint', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "sql_dedicated_gateway_endpoint": {"key": "sqlDedicatedGatewayEndpoint", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(SqlDedicatedGatewayRegionalServiceResource, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.sql_dedicated_gateway_endpoint = None -class SqlDedicatedGatewayServiceResource(msrest.serialization.Model): +class SqlDedicatedGatewayServiceResource(_serialization.Model): """Describes the service response property for SqlDedicatedGateway. :ivar properties: Properties for SqlDedicatedGatewayServiceResource. @@ -12693,20 +12632,17 @@ class SqlDedicatedGatewayServiceResource(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SqlDedicatedGatewayServiceResourceProperties'}, + "properties": {"key": "properties", "type": "SqlDedicatedGatewayServiceResourceProperties"}, } def __init__( - self, - *, - properties: Optional["SqlDedicatedGatewayServiceResourceProperties"] = None, - **kwargs + self, *, properties: Optional["_models.SqlDedicatedGatewayServiceResourceProperties"] = None, **kwargs ): """ :keyword properties: Properties for SqlDedicatedGatewayServiceResource. :paramtype properties: ~azure.mgmt.cosmosdb.models.SqlDedicatedGatewayServiceResourceProperties """ - super(SqlDedicatedGatewayServiceResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.properties = properties @@ -12719,20 +12655,19 @@ class SqlDedicatedGatewayServiceResourceProperties(ServiceResourceProperties): :ivar additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] + :vartype additional_properties: dict[str, JSON] :ivar creation_time: Time of the last state change (ISO-8601 format). :vartype creation_time: ~datetime.datetime - :ivar instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". + :ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s", + "Cosmos.D8s", and "Cosmos.D16s". :vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :ivar instance_count: Instance count for the service. :vartype instance_count: int - :ivar service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", - "MaterializedViewsBuilder". + :ivar service_type: ServiceType for the service. Required. Known values are: + "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder". :vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". + :ivar status: Describes the status of a service. Known values are: "Creating", "Running", + "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus :ivar sql_dedicated_gateway_endpoint: SqlDedicatedGateway endpoint for the service. :vartype sql_dedicated_gateway_endpoint: str @@ -12742,29 +12677,29 @@ class SqlDedicatedGatewayServiceResourceProperties(ServiceResourceProperties): """ _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, + "creation_time": {"readonly": True}, + "instance_count": {"minimum": 0}, + "service_type": {"required": True}, + "status": {"readonly": True}, + "locations": {"readonly": True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'sql_dedicated_gateway_endpoint': {'key': 'sqlDedicatedGatewayEndpoint', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[SqlDedicatedGatewayRegionalServiceResource]'}, + "additional_properties": {"key": "", "type": "{object}"}, + "creation_time": {"key": "creationTime", "type": "iso-8601"}, + "instance_size": {"key": "instanceSize", "type": "str"}, + "instance_count": {"key": "instanceCount", "type": "int"}, + "service_type": {"key": "serviceType", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "sql_dedicated_gateway_endpoint": {"key": "sqlDedicatedGatewayEndpoint", "type": "str"}, + "locations": {"key": "locations", "type": "[SqlDedicatedGatewayRegionalServiceResource]"}, } def __init__( self, *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, + additional_properties: Optional[Dict[str, JSON]] = None, + instance_size: Optional[Union[str, "_models.ServiceSize"]] = None, instance_count: Optional[int] = None, sql_dedicated_gateway_endpoint: Optional[str] = None, **kwargs @@ -12772,22 +12707,27 @@ def __init__( """ :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :paramtype additional_properties: dict[str, any] - :keyword instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". + :paramtype additional_properties: dict[str, JSON] + :keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s", + "Cosmos.D8s", and "Cosmos.D16s". :paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :keyword instance_count: Instance count for the service. :paramtype instance_count: int :keyword sql_dedicated_gateway_endpoint: SqlDedicatedGateway endpoint for the service. :paramtype sql_dedicated_gateway_endpoint: str """ - super(SqlDedicatedGatewayServiceResourceProperties, self).__init__(additional_properties=additional_properties, instance_size=instance_size, instance_count=instance_count, **kwargs) - self.service_type = 'SqlDedicatedGateway' # type: str + super().__init__( + additional_properties=additional_properties, + instance_size=instance_size, + instance_count=instance_count, + **kwargs + ) + self.service_type = "SqlDedicatedGateway" # type: str self.sql_dedicated_gateway_endpoint = sql_dedicated_gateway_endpoint self.locations = None -class SqlRoleAssignmentCreateUpdateParameters(msrest.serialization.Model): +class SqlRoleAssignmentCreateUpdateParameters(_serialization.Model): """Parameters to create and update an Azure Cosmos DB SQL Role Assignment. :ivar role_definition_id: The unique identifier for the associated Role Definition. @@ -12802,9 +12742,9 @@ class SqlRoleAssignmentCreateUpdateParameters(msrest.serialization.Model): """ _attribute_map = { - 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + "role_definition_id": {"key": "properties.roleDefinitionId", "type": "str"}, + "scope": {"key": "properties.scope", "type": "str"}, + "principal_id": {"key": "properties.principalId", "type": "str"}, } def __init__( @@ -12826,7 +12766,7 @@ def __init__( inferred using the tenant associated with the subscription. :paramtype principal_id: str """ - super(SqlRoleAssignmentCreateUpdateParameters, self).__init__(**kwargs) + super().__init__(**kwargs) self.role_definition_id = role_definition_id self.scope = scope self.principal_id = principal_id @@ -12855,18 +12795,18 @@ class SqlRoleAssignmentGetResults(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "role_definition_id": {"key": "properties.roleDefinitionId", "type": "str"}, + "scope": {"key": "properties.scope", "type": "str"}, + "principal_id": {"key": "properties.principalId", "type": "str"}, } def __init__( @@ -12888,13 +12828,13 @@ def __init__( inferred using the tenant associated with the subscription. :paramtype principal_id: str """ - super(SqlRoleAssignmentGetResults, self).__init__(**kwargs) + super().__init__(**kwargs) self.role_definition_id = role_definition_id self.scope = scope self.principal_id = principal_id -class SqlRoleAssignmentListResult(msrest.serialization.Model): +class SqlRoleAssignmentListResult(_serialization.Model): """The relevant Role Assignments. Variables are only populated by the server, and will be ignored when sending a request. @@ -12904,31 +12844,27 @@ class SqlRoleAssignmentListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[SqlRoleAssignmentGetResults]'}, + "value": {"key": "value", "type": "[SqlRoleAssignmentGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(SqlRoleAssignmentListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class SqlRoleDefinitionCreateUpdateParameters(msrest.serialization.Model): +class SqlRoleDefinitionCreateUpdateParameters(_serialization.Model): """Parameters to create and update an Azure Cosmos DB SQL Role Definition. :ivar role_name: A user-friendly name for the Role Definition. Must be unique for the database account. :vartype role_name: str - :ivar type: Indicates whether the Role Definition was built-in or user created. Possible values - include: "BuiltInRole", "CustomRole". + :ivar type: Indicates whether the Role Definition was built-in or user created. Known values + are: "BuiltInRole" and "CustomRole". :vartype type: str or ~azure.mgmt.cosmosdb.models.RoleDefinitionType :ivar assignable_scopes: A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on @@ -12941,27 +12877,27 @@ class SqlRoleDefinitionCreateUpdateParameters(msrest.serialization.Model): """ _attribute_map = { - 'role_name': {'key': 'properties.roleName', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, - 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, + "role_name": {"key": "properties.roleName", "type": "str"}, + "type": {"key": "properties.type", "type": "str"}, + "assignable_scopes": {"key": "properties.assignableScopes", "type": "[str]"}, + "permissions": {"key": "properties.permissions", "type": "[Permission]"}, } def __init__( self, *, role_name: Optional[str] = None, - type: Optional[Union[str, "RoleDefinitionType"]] = None, + type: Optional[Union[str, "_models.RoleDefinitionType"]] = None, assignable_scopes: Optional[List[str]] = None, - permissions: Optional[List["Permission"]] = None, + permissions: Optional[List["_models.Permission"]] = None, **kwargs ): """ :keyword role_name: A user-friendly name for the Role Definition. Must be unique for the database account. :paramtype role_name: str - :keyword type: Indicates whether the Role Definition was built-in or user created. Possible - values include: "BuiltInRole", "CustomRole". + :keyword type: Indicates whether the Role Definition was built-in or user created. Known values + are: "BuiltInRole" and "CustomRole". :paramtype type: str or ~azure.mgmt.cosmosdb.models.RoleDefinitionType :keyword assignable_scopes: A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition @@ -12972,7 +12908,7 @@ def __init__( :keyword permissions: The set of operations allowed through this Role Definition. :paramtype permissions: list[~azure.mgmt.cosmosdb.models.Permission] """ - super(SqlRoleDefinitionCreateUpdateParameters, self).__init__(**kwargs) + super().__init__(**kwargs) self.role_name = role_name self.type = type self.assignable_scopes = assignable_scopes @@ -12994,7 +12930,7 @@ class SqlRoleDefinitionGetResults(ARMProxyResource): account. :vartype role_name: str :ivar type_properties_type: Indicates whether the Role Definition was built-in or user created. - Possible values include: "BuiltInRole", "CustomRole". + Known values are: "BuiltInRole" and "CustomRole". :vartype type_properties_type: str or ~azure.mgmt.cosmosdb.models.RoleDefinitionType :ivar assignable_scopes: A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on @@ -13007,28 +12943,28 @@ class SqlRoleDefinitionGetResults(ARMProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'role_name': {'key': 'properties.roleName', 'type': 'str'}, - 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, - 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, - 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "role_name": {"key": "properties.roleName", "type": "str"}, + "type_properties_type": {"key": "properties.type", "type": "str"}, + "assignable_scopes": {"key": "properties.assignableScopes", "type": "[str]"}, + "permissions": {"key": "properties.permissions", "type": "[Permission]"}, } def __init__( self, *, role_name: Optional[str] = None, - type_properties_type: Optional[Union[str, "RoleDefinitionType"]] = None, + type_properties_type: Optional[Union[str, "_models.RoleDefinitionType"]] = None, assignable_scopes: Optional[List[str]] = None, - permissions: Optional[List["Permission"]] = None, + permissions: Optional[List["_models.Permission"]] = None, **kwargs ): """ @@ -13036,7 +12972,7 @@ def __init__( database account. :paramtype role_name: str :keyword type_properties_type: Indicates whether the Role Definition was built-in or user - created. Possible values include: "BuiltInRole", "CustomRole". + created. Known values are: "BuiltInRole" and "CustomRole". :paramtype type_properties_type: str or ~azure.mgmt.cosmosdb.models.RoleDefinitionType :keyword assignable_scopes: A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition @@ -13047,14 +12983,14 @@ def __init__( :keyword permissions: The set of operations allowed through this Role Definition. :paramtype permissions: list[~azure.mgmt.cosmosdb.models.Permission] """ - super(SqlRoleDefinitionGetResults, self).__init__(**kwargs) + super().__init__(**kwargs) self.role_name = role_name self.type_properties_type = type_properties_type self.assignable_scopes = assignable_scopes self.permissions = permissions -class SqlRoleDefinitionListResult(msrest.serialization.Model): +class SqlRoleDefinitionListResult(_serialization.Model): """The relevant Role Definitions. Variables are only populated by the server, and will be ignored when sending a request. @@ -13064,20 +13000,16 @@ class SqlRoleDefinitionListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[SqlRoleDefinitionGetResults]'}, + "value": {"key": "value", "type": "[SqlRoleDefinitionGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(SqlRoleDefinitionListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None @@ -13096,16 +13028,16 @@ class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a storedProcedure. + :ivar resource: The standard JSON format of a storedProcedure. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -13113,105 +13045,95 @@ class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "SqlStoredProcedureResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "SqlStoredProcedureResource", + resource: "_models.SqlStoredProcedureResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a storedProcedure. + :keyword resource: The standard JSON format of a storedProcedure. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(SqlStoredProcedureCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class SqlStoredProcedureResource(msrest.serialization.Model): +class SqlStoredProcedureResource(_serialization.Model): """Cosmos DB SQL storedProcedure resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB SQL storedProcedure. + :ivar id: Name of the Cosmos DB SQL storedProcedure. Required. :vartype id: str :ivar body: Body of the Stored Procedure. :vartype body: str """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'body': {'key': 'body', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "body": {"key": "body", "type": "str"}, } - def __init__( - self, - *, - id: str, - body: Optional[str] = None, - **kwargs - ): + def __init__(self, *, id: str, body: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB SQL storedProcedure. + :keyword id: Name of the Cosmos DB SQL storedProcedure. Required. :paramtype id: str :keyword body: Body of the Stored Procedure. :paramtype body: str """ - super(SqlStoredProcedureResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id self.body = body -class SqlStoredProcedureGetPropertiesResource(ExtendedResourceProperties, SqlStoredProcedureResource): +class SqlStoredProcedureGetPropertiesResource(SqlStoredProcedureResource, ExtendedResourceProperties): """SqlStoredProcedureGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB SQL storedProcedure. - :vartype id: str - :ivar body: Body of the Stored Procedure. - :vartype body: str :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -13219,42 +13141,40 @@ class SqlStoredProcedureGetPropertiesResource(ExtendedResourceProperties, SqlSto :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :ivar id: Name of the Cosmos DB SQL storedProcedure. Required. + :vartype id: str + :ivar body: Body of the Stored Procedure. + :vartype body: str """ _validation = { - 'id': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'body': {'key': 'body', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "body": {"key": "body", "type": "str"}, } - def __init__( - self, - *, - id: str, - body: Optional[str] = None, - **kwargs - ): + def __init__(self, *, id: str, body: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB SQL storedProcedure. + :keyword id: Name of the Cosmos DB SQL storedProcedure. Required. :paramtype id: str :keyword body: Body of the Stored Procedure. :paramtype body: str """ - super(SqlStoredProcedureGetPropertiesResource, self).__init__(id=id, body=body, **kwargs) - self.id = id - self.body = body + super().__init__(id=id, body=body, **kwargs) self.rid = None self.ts = None self.etag = None + self.id = id + self.body = body class SqlStoredProcedureGetResults(ARMResourceProperties): @@ -13270,12 +13190,12 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -13284,19 +13204,19 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureGetPropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "SqlStoredProcedureGetPropertiesResource"}, } def __init__( @@ -13304,30 +13224,30 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["SqlStoredProcedureGetPropertiesResource"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.SqlStoredProcedureGetPropertiesResource"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword resource: :paramtype resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetPropertiesResource """ - super(SqlStoredProcedureGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource -class SqlStoredProcedureListResult(msrest.serialization.Model): +class SqlStoredProcedureListResult(_serialization.Model): """The List operation response, that contains the storedProcedures and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -13337,20 +13257,16 @@ class SqlStoredProcedureListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[SqlStoredProcedureGetResults]'}, + "value": {"key": "value", "type": "[SqlStoredProcedureGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(SqlStoredProcedureListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None @@ -13369,16 +13285,16 @@ class SqlTriggerCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a trigger. + :ivar resource: The standard JSON format of a trigger. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.SqlTriggerResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -13386,126 +13302,117 @@ class SqlTriggerCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "SqlTriggerResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "SqlTriggerResource", + resource: "_models.SqlTriggerResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a trigger. + :keyword resource: The standard JSON format of a trigger. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.SqlTriggerResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(SqlTriggerCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class SqlTriggerResource(msrest.serialization.Model): +class SqlTriggerResource(_serialization.Model): """Cosmos DB SQL trigger resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB SQL trigger. + :ivar id: Name of the Cosmos DB SQL trigger. Required. :vartype id: str :ivar body: Body of the Trigger. :vartype body: str - :ivar trigger_type: Type of the Trigger. Possible values include: "Pre", "Post". + :ivar trigger_type: Type of the Trigger. Known values are: "Pre" and "Post". :vartype trigger_type: str or ~azure.mgmt.cosmosdb.models.TriggerType - :ivar trigger_operation: The operation the trigger is associated with. Possible values include: - "All", "Create", "Update", "Delete", "Replace". + :ivar trigger_operation: The operation the trigger is associated with. Known values are: "All", + "Create", "Update", "Delete", and "Replace". :vartype trigger_operation: str or ~azure.mgmt.cosmosdb.models.TriggerOperation """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'body': {'key': 'body', 'type': 'str'}, - 'trigger_type': {'key': 'triggerType', 'type': 'str'}, - 'trigger_operation': {'key': 'triggerOperation', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "body": {"key": "body", "type": "str"}, + "trigger_type": {"key": "triggerType", "type": "str"}, + "trigger_operation": {"key": "triggerOperation", "type": "str"}, } def __init__( self, *, - id: str, + id: str, # pylint: disable=redefined-builtin body: Optional[str] = None, - trigger_type: Optional[Union[str, "TriggerType"]] = None, - trigger_operation: Optional[Union[str, "TriggerOperation"]] = None, + trigger_type: Optional[Union[str, "_models.TriggerType"]] = None, + trigger_operation: Optional[Union[str, "_models.TriggerOperation"]] = None, **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB SQL trigger. + :keyword id: Name of the Cosmos DB SQL trigger. Required. :paramtype id: str :keyword body: Body of the Trigger. :paramtype body: str - :keyword trigger_type: Type of the Trigger. Possible values include: "Pre", "Post". + :keyword trigger_type: Type of the Trigger. Known values are: "Pre" and "Post". :paramtype trigger_type: str or ~azure.mgmt.cosmosdb.models.TriggerType - :keyword trigger_operation: The operation the trigger is associated with. Possible values - include: "All", "Create", "Update", "Delete", "Replace". + :keyword trigger_operation: The operation the trigger is associated with. Known values are: + "All", "Create", "Update", "Delete", and "Replace". :paramtype trigger_operation: str or ~azure.mgmt.cosmosdb.models.TriggerOperation """ - super(SqlTriggerResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id self.body = body self.trigger_type = trigger_type self.trigger_operation = trigger_operation -class SqlTriggerGetPropertiesResource(ExtendedResourceProperties, SqlTriggerResource): +class SqlTriggerGetPropertiesResource(SqlTriggerResource, ExtendedResourceProperties): """SqlTriggerGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB SQL trigger. - :vartype id: str - :ivar body: Body of the Trigger. - :vartype body: str - :ivar trigger_type: Type of the Trigger. Possible values include: "Pre", "Post". - :vartype trigger_type: str or ~azure.mgmt.cosmosdb.models.TriggerType - :ivar trigger_operation: The operation the trigger is associated with. Possible values include: - "All", "Create", "Update", "Delete", "Replace". - :vartype trigger_operation: str or ~azure.mgmt.cosmosdb.models.TriggerOperation :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -13513,53 +13420,62 @@ class SqlTriggerGetPropertiesResource(ExtendedResourceProperties, SqlTriggerReso :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :ivar id: Name of the Cosmos DB SQL trigger. Required. + :vartype id: str + :ivar body: Body of the Trigger. + :vartype body: str + :ivar trigger_type: Type of the Trigger. Known values are: "Pre" and "Post". + :vartype trigger_type: str or ~azure.mgmt.cosmosdb.models.TriggerType + :ivar trigger_operation: The operation the trigger is associated with. Known values are: "All", + "Create", "Update", "Delete", and "Replace". + :vartype trigger_operation: str or ~azure.mgmt.cosmosdb.models.TriggerOperation """ _validation = { - 'id': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'body': {'key': 'body', 'type': 'str'}, - 'trigger_type': {'key': 'triggerType', 'type': 'str'}, - 'trigger_operation': {'key': 'triggerOperation', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "body": {"key": "body", "type": "str"}, + "trigger_type": {"key": "triggerType", "type": "str"}, + "trigger_operation": {"key": "triggerOperation", "type": "str"}, } def __init__( self, *, - id: str, + id: str, # pylint: disable=redefined-builtin body: Optional[str] = None, - trigger_type: Optional[Union[str, "TriggerType"]] = None, - trigger_operation: Optional[Union[str, "TriggerOperation"]] = None, + trigger_type: Optional[Union[str, "_models.TriggerType"]] = None, + trigger_operation: Optional[Union[str, "_models.TriggerOperation"]] = None, **kwargs ): """ - :keyword id: Required. Name of the Cosmos DB SQL trigger. + :keyword id: Name of the Cosmos DB SQL trigger. Required. :paramtype id: str :keyword body: Body of the Trigger. :paramtype body: str - :keyword trigger_type: Type of the Trigger. Possible values include: "Pre", "Post". + :keyword trigger_type: Type of the Trigger. Known values are: "Pre" and "Post". :paramtype trigger_type: str or ~azure.mgmt.cosmosdb.models.TriggerType - :keyword trigger_operation: The operation the trigger is associated with. Possible values - include: "All", "Create", "Update", "Delete", "Replace". + :keyword trigger_operation: The operation the trigger is associated with. Known values are: + "All", "Create", "Update", "Delete", and "Replace". :paramtype trigger_operation: str or ~azure.mgmt.cosmosdb.models.TriggerOperation """ - super(SqlTriggerGetPropertiesResource, self).__init__(id=id, body=body, trigger_type=trigger_type, trigger_operation=trigger_operation, **kwargs) + super().__init__(id=id, body=body, trigger_type=trigger_type, trigger_operation=trigger_operation, **kwargs) + self.rid = None + self.ts = None + self.etag = None self.id = id self.body = body self.trigger_type = trigger_type self.trigger_operation = trigger_operation - self.rid = None - self.ts = None - self.etag = None class SqlTriggerGetResults(ARMResourceProperties): @@ -13575,12 +13491,12 @@ class SqlTriggerGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -13589,19 +13505,19 @@ class SqlTriggerGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerGetPropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "SqlTriggerGetPropertiesResource"}, } def __init__( @@ -13609,30 +13525,30 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["SqlTriggerGetPropertiesResource"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.SqlTriggerGetPropertiesResource"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword resource: :paramtype resource: ~azure.mgmt.cosmosdb.models.SqlTriggerGetPropertiesResource """ - super(SqlTriggerGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource -class SqlTriggerListResult(msrest.serialization.Model): +class SqlTriggerListResult(_serialization.Model): """The List operation response, that contains the triggers and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -13642,20 +13558,16 @@ class SqlTriggerListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[SqlTriggerGetResults]'}, + "value": {"key": "value", "type": "[SqlTriggerGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(SqlTriggerListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None @@ -13674,16 +13586,16 @@ class SqlUserDefinedFunctionCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a userDefinedFunction. + :ivar resource: The standard JSON format of a userDefinedFunction. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -13691,105 +13603,95 @@ class SqlUserDefinedFunctionCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "SqlUserDefinedFunctionResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "SqlUserDefinedFunctionResource", + resource: "_models.SqlUserDefinedFunctionResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a userDefinedFunction. + :keyword resource: The standard JSON format of a userDefinedFunction. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(SqlUserDefinedFunctionCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class SqlUserDefinedFunctionResource(msrest.serialization.Model): +class SqlUserDefinedFunctionResource(_serialization.Model): """Cosmos DB SQL userDefinedFunction resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB SQL userDefinedFunction. + :ivar id: Name of the Cosmos DB SQL userDefinedFunction. Required. :vartype id: str :ivar body: Body of the User Defined Function. :vartype body: str """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'body': {'key': 'body', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "body": {"key": "body", "type": "str"}, } - def __init__( - self, - *, - id: str, - body: Optional[str] = None, - **kwargs - ): + def __init__(self, *, id: str, body: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB SQL userDefinedFunction. + :keyword id: Name of the Cosmos DB SQL userDefinedFunction. Required. :paramtype id: str :keyword body: Body of the User Defined Function. :paramtype body: str """ - super(SqlUserDefinedFunctionResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id self.body = body -class SqlUserDefinedFunctionGetPropertiesResource(ExtendedResourceProperties, SqlUserDefinedFunctionResource): +class SqlUserDefinedFunctionGetPropertiesResource(SqlUserDefinedFunctionResource, ExtendedResourceProperties): """SqlUserDefinedFunctionGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB SQL userDefinedFunction. - :vartype id: str - :ivar body: Body of the User Defined Function. - :vartype body: str :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -13797,42 +13699,40 @@ class SqlUserDefinedFunctionGetPropertiesResource(ExtendedResourceProperties, Sq :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :ivar id: Name of the Cosmos DB SQL userDefinedFunction. Required. + :vartype id: str + :ivar body: Body of the User Defined Function. + :vartype body: str """ _validation = { - 'id': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'body': {'key': 'body', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "body": {"key": "body", "type": "str"}, } - def __init__( - self, - *, - id: str, - body: Optional[str] = None, - **kwargs - ): + def __init__(self, *, id: str, body: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB SQL userDefinedFunction. + :keyword id: Name of the Cosmos DB SQL userDefinedFunction. Required. :paramtype id: str :keyword body: Body of the User Defined Function. :paramtype body: str """ - super(SqlUserDefinedFunctionGetPropertiesResource, self).__init__(id=id, body=body, **kwargs) - self.id = id - self.body = body + super().__init__(id=id, body=body, **kwargs) self.rid = None self.ts = None self.etag = None + self.id = id + self.body = body class SqlUserDefinedFunctionGetResults(ARMResourceProperties): @@ -13848,12 +13748,12 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -13862,19 +13762,19 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionGetPropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "SqlUserDefinedFunctionGetPropertiesResource"}, } def __init__( @@ -13882,30 +13782,30 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["SqlUserDefinedFunctionGetPropertiesResource"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.SqlUserDefinedFunctionGetPropertiesResource"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword resource: :paramtype resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetPropertiesResource """ - super(SqlUserDefinedFunctionGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource -class SqlUserDefinedFunctionListResult(msrest.serialization.Model): +class SqlUserDefinedFunctionListResult(_serialization.Model): """The List operation response, that contains the userDefinedFunctions and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -13915,79 +13815,75 @@ class SqlUserDefinedFunctionListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[SqlUserDefinedFunctionGetResults]'}, + "value": {"key": "value", "type": "[SqlUserDefinedFunctionGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(SqlUserDefinedFunctionListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class SystemData(msrest.serialization.Model): +class SystemData(_serialization.Model): """Metadata pertaining to creation and last modification of the resource. :ivar created_by: The identity that created the resource. :vartype created_by: str - :ivar created_by_type: The type of identity that created the resource. Possible values include: - "User", "Application", "ManagedIdentity", "Key". + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". :vartype created_by_type: str or ~azure.mgmt.cosmosdb.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str - :ivar last_modified_by_type: The type of identity that last modified the resource. Possible - values include: "User", "Application", "ManagedIdentity", "Key". + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". :vartype last_modified_by_type: str or ~azure.mgmt.cosmosdb.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + "created_by": {"key": "createdBy", "type": "str"}, + "created_by_type": {"key": "createdByType", "type": "str"}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, + "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, + "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, } def __init__( self, *, created_by: Optional[str] = None, - created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, created_at: Optional[datetime.datetime] = None, last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, **kwargs ): """ :keyword created_by: The identity that created the resource. :paramtype created_by: str - :keyword created_by_type: The type of identity that created the resource. Possible values - include: "User", "Application", "ManagedIdentity", "Key". + :keyword created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". :paramtype created_by_type: str or ~azure.mgmt.cosmosdb.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str - :keyword last_modified_by_type: The type of identity that last modified the resource. Possible - values include: "User", "Application", "ManagedIdentity", "Key". + :keyword last_modified_by_type: The type of identity that last modified the resource. Known + values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype last_modified_by_type: str or ~azure.mgmt.cosmosdb.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ - super(SystemData, self).__init__(**kwargs) + super().__init__(**kwargs) self.created_by = created_by self.created_by_type = created_by_type self.created_at = created_at @@ -14011,16 +13907,16 @@ class TableCreateUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a Table. + :ivar resource: The standard JSON format of a Table. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.TableResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. @@ -14028,52 +13924,52 @@ class TableCreateUpdateParameters(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'TableResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "TableResource"}, + "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, - resource: "TableResource", + resource: "_models.TableResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + options: Optional["_models.CreateUpdateOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a Table. + :keyword resource: The standard JSON format of a Table. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.TableResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ - super(TableCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options @@ -14089,15 +13985,15 @@ class TableGetPropertiesOptions(OptionsResource): """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs ): """ @@ -14107,49 +14003,42 @@ def __init__( :keyword autoscale_settings: Specifies the Autoscale settings. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ - super(TableGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super().__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) -class TableResource(msrest.serialization.Model): +class TableResource(_serialization.Model): """Cosmos DB table resource object. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB table. + :ivar id: Name of the Cosmos DB table. Required. :vartype id: str """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - *, - id: str, - **kwargs - ): + def __init__(self, *, id: str, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB table. + :keyword id: Name of the Cosmos DB table. Required. :paramtype id: str """ - super(TableResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id -class TableGetPropertiesResource(ExtendedResourceProperties, TableResource): +class TableGetPropertiesResource(TableResource, ExtendedResourceProperties): """TableGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Required. Name of the Cosmos DB table. - :vartype id: str :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -14157,37 +14046,34 @@ class TableGetPropertiesResource(ExtendedResourceProperties, TableResource): :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :ivar id: Name of the Cosmos DB table. Required. + :vartype id: str """ _validation = { - 'id': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - *, - id: str, - **kwargs - ): + def __init__(self, *, id: str, **kwargs): # pylint: disable=redefined-builtin """ - :keyword id: Required. Name of the Cosmos DB table. + :keyword id: Name of the Cosmos DB table. Required. :paramtype id: str """ - super(TableGetPropertiesResource, self).__init__(id=id, **kwargs) - self.id = id + super().__init__(id=id, **kwargs) self.rid = None self.ts = None self.etag = None + self.id = id class TableGetResults(ARMResourceProperties): @@ -14203,12 +14089,12 @@ class TableGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -14219,20 +14105,20 @@ class TableGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'TableGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'TableGetPropertiesOptions'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "TableGetPropertiesResource"}, + "options": {"key": "properties.options", "type": "TableGetPropertiesOptions"}, } def __init__( @@ -14240,20 +14126,20 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["TableGetPropertiesResource"] = None, - options: Optional["TableGetPropertiesOptions"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.TableGetPropertiesResource"] = None, + options: Optional["_models.TableGetPropertiesOptions"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -14262,12 +14148,12 @@ def __init__( :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.TableGetPropertiesOptions """ - super(TableGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options -class TableListResult(msrest.serialization.Model): +class TableListResult(_serialization.Model): """The List operation response, that contains the Table and their properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -14277,24 +14163,20 @@ class TableListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[TableGetResults]'}, + "value": {"key": "value", "type": "[TableGetResults]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(TableListResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class ThroughputPolicyResource(msrest.serialization.Model): +class ThroughputPolicyResource(_serialization.Model): """Cosmos DB resource throughput policy. :ivar is_enabled: Determines whether the ThroughputPolicy is active or not. @@ -14305,17 +14187,11 @@ class ThroughputPolicyResource(msrest.serialization.Model): """ _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'increment_percent': {'key': 'incrementPercent', 'type': 'int'}, + "is_enabled": {"key": "isEnabled", "type": "bool"}, + "increment_percent": {"key": "incrementPercent", "type": "int"}, } - def __init__( - self, - *, - is_enabled: Optional[bool] = None, - increment_percent: Optional[int] = None, - **kwargs - ): + def __init__(self, *, is_enabled: Optional[bool] = None, increment_percent: Optional[int] = None, **kwargs): """ :keyword is_enabled: Determines whether the ThroughputPolicy is active or not. :paramtype is_enabled: bool @@ -14323,12 +14199,12 @@ def __init__( time throughput policy kicks in. :paramtype increment_percent: int """ - super(ThroughputPolicyResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.is_enabled = is_enabled self.increment_percent = increment_percent -class ThroughputSettingsResource(msrest.serialization.Model): +class ThroughputSettingsResource(_serialization.Model): """Cosmos DB resource throughput object. Either throughput is required or autoscaleSettings is required, but not both. Variables are only populated by the server, and will be ignored when sending a request. @@ -14346,22 +14222,22 @@ class ThroughputSettingsResource(msrest.serialization.Model): """ _validation = { - 'minimum_throughput': {'readonly': True}, - 'offer_replace_pending': {'readonly': True}, + "minimum_throughput": {"readonly": True}, + "offer_replace_pending": {"readonly": True}, } _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettingsResource'}, - 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, - 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettingsResource"}, + "minimum_throughput": {"key": "minimumThroughput", "type": "str"}, + "offer_replace_pending": {"key": "offerReplacePending", "type": "str"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettingsResource"] = None, + autoscale_settings: Optional["_models.AutoscaleSettingsResource"] = None, **kwargs ): """ @@ -14372,18 +14248,25 @@ def __init__( required or autoscaleSettings is required, but not both. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettingsResource """ - super(ThroughputSettingsResource, self).__init__(**kwargs) + super().__init__(**kwargs) self.throughput = throughput self.autoscale_settings = autoscale_settings self.minimum_throughput = None self.offer_replace_pending = None -class ThroughputSettingsGetPropertiesResource(ExtendedResourceProperties, ThroughputSettingsResource): +class ThroughputSettingsGetPropertiesResource(ThroughputSettingsResource, ExtendedResourceProperties): """ThroughputSettingsGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. + :ivar rid: A system generated property. A unique identifier. + :vartype rid: str + :ivar ts: A system generated property that denotes the last updated timestamp of the resource. + :vartype ts: float + :ivar etag: A system generated property representing the resource etag required for optimistic + concurrency control. + :vartype etag: str :ivar throughput: Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both. :vartype throughput: int @@ -14394,38 +14277,31 @@ class ThroughputSettingsGetPropertiesResource(ExtendedResourceProperties, Throug :vartype minimum_throughput: str :ivar offer_replace_pending: The throughput replace is pending. :vartype offer_replace_pending: str - :ivar rid: A system generated property. A unique identifier. - :vartype rid: str - :ivar ts: A system generated property that denotes the last updated timestamp of the resource. - :vartype ts: float - :ivar etag: A system generated property representing the resource etag required for optimistic - concurrency control. - :vartype etag: str """ _validation = { - 'minimum_throughput': {'readonly': True}, - 'offer_replace_pending': {'readonly': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + "rid": {"readonly": True}, + "ts": {"readonly": True}, + "etag": {"readonly": True}, + "minimum_throughput": {"readonly": True}, + "offer_replace_pending": {"readonly": True}, } _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettingsResource'}, - 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, - 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + "rid": {"key": "_rid", "type": "str"}, + "ts": {"key": "_ts", "type": "float"}, + "etag": {"key": "_etag", "type": "str"}, + "throughput": {"key": "throughput", "type": "int"}, + "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettingsResource"}, + "minimum_throughput": {"key": "minimumThroughput", "type": "str"}, + "offer_replace_pending": {"key": "offerReplacePending", "type": "str"}, } def __init__( self, *, throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettingsResource"] = None, + autoscale_settings: Optional["_models.AutoscaleSettingsResource"] = None, **kwargs ): """ @@ -14436,14 +14312,14 @@ def __init__( required or autoscaleSettings is required, but not both. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettingsResource """ - super(ThroughputSettingsGetPropertiesResource, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super().__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + self.rid = None + self.ts = None + self.etag = None self.throughput = throughput self.autoscale_settings = autoscale_settings self.minimum_throughput = None self.offer_replace_pending = None - self.rid = None - self.ts = None - self.etag = None class ThroughputSettingsGetResults(ARMResourceProperties): @@ -14459,12 +14335,12 @@ class ThroughputSettingsGetResults(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity @@ -14473,19 +14349,19 @@ class ThroughputSettingsGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsGetPropertiesResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "ThroughputSettingsGetPropertiesResource"}, } def __init__( @@ -14493,26 +14369,26 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["ThroughputSettingsGetPropertiesResource"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + resource: Optional["_models.ThroughputSettingsGetPropertiesResource"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword resource: :paramtype resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetPropertiesResource """ - super(ThroughputSettingsGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource @@ -14531,65 +14407,65 @@ class ThroughputSettingsUpdateParameters(ARMResourceProperties): :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str - :ivar tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource groups). A maximum of - 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters - and value no greater than 256 characters. For example, the default experience for a template - type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also - include "Table", "Graph", "DocumentDB", and "MongoDB". + :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :ivar resource: Required. The standard JSON format of a resource throughput. + :ivar resource: The standard JSON format of a resource throughput. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsResource """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsResource'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "resource": {"key": "properties.resource", "type": "ThroughputSettingsResource"}, } def __init__( self, *, - resource: "ThroughputSettingsResource", + resource: "_models.ThroughputSettingsResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, **kwargs ): """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str - :keyword tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". + :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be + used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can + be provided for a resource. Each tag must have a key no greater than 128 characters and value + no greater than 256 characters. For example, the default experience for a template type is set + with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", + "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :keyword resource: Required. The standard JSON format of a resource throughput. + :keyword resource: The standard JSON format of a resource throughput. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsResource """ - super(ThroughputSettingsUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource -class UniqueKey(msrest.serialization.Model): +class UniqueKey(_serialization.Model): """The unique key on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. :ivar paths: List of paths must be unique for each document in the Azure Cosmos DB service. @@ -14597,24 +14473,19 @@ class UniqueKey(msrest.serialization.Model): """ _attribute_map = { - 'paths': {'key': 'paths', 'type': '[str]'}, + "paths": {"key": "paths", "type": "[str]"}, } - def __init__( - self, - *, - paths: Optional[List[str]] = None, - **kwargs - ): + def __init__(self, *, paths: Optional[List[str]] = None, **kwargs): """ :keyword paths: List of paths must be unique for each document in the Azure Cosmos DB service. :paramtype paths: list[str] """ - super(UniqueKey, self).__init__(**kwargs) + super().__init__(**kwargs) self.paths = paths -class UniqueKeyPolicy(msrest.serialization.Model): +class UniqueKeyPolicy(_serialization.Model): """The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. :ivar unique_keys: List of unique keys on that enforces uniqueness constraint on documents in @@ -14623,25 +14494,20 @@ class UniqueKeyPolicy(msrest.serialization.Model): """ _attribute_map = { - 'unique_keys': {'key': 'uniqueKeys', 'type': '[UniqueKey]'}, + "unique_keys": {"key": "uniqueKeys", "type": "[UniqueKey]"}, } - def __init__( - self, - *, - unique_keys: Optional[List["UniqueKey"]] = None, - **kwargs - ): + def __init__(self, *, unique_keys: Optional[List["_models.UniqueKey"]] = None, **kwargs): """ :keyword unique_keys: List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. :paramtype unique_keys: list[~azure.mgmt.cosmosdb.models.UniqueKey] """ - super(UniqueKeyPolicy, self).__init__(**kwargs) + super().__init__(**kwargs) self.unique_keys = unique_keys -class UsagesResult(msrest.serialization.Model): +class UsagesResult(_serialization.Model): """The response to a list usage request. Variables are only populated by the server, and will be ignored when sending a request. @@ -14651,24 +14517,20 @@ class UsagesResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, + "value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[Usage]'}, + "value": {"key": "value", "type": "[Usage]"}, } - def __init__( - self, - **kwargs - ): - """ - """ - super(UsagesResult, self).__init__(**kwargs) + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) self.value = None -class VirtualNetworkRule(msrest.serialization.Model): +class VirtualNetworkRule(_serialization.Model): """Virtual Network ACL Rule object. :ivar id: Resource ID of a subnet, for example: @@ -14680,14 +14542,14 @@ class VirtualNetworkRule(msrest.serialization.Model): """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ignore_missing_v_net_service_endpoint': {'key': 'ignoreMissingVNetServiceEndpoint', 'type': 'bool'}, + "id": {"key": "id", "type": "str"}, + "ignore_missing_v_net_service_endpoint": {"key": "ignoreMissingVNetServiceEndpoint", "type": "bool"}, } def __init__( self, *, - id: Optional[str] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin ignore_missing_v_net_service_endpoint: Optional[bool] = None, **kwargs ): @@ -14699,6 +14561,6 @@ def __init__( has vnet service endpoint enabled. :paramtype ignore_missing_v_net_service_endpoint: bool """ - super(VirtualNetworkRule, self).__init__(**kwargs) + super().__init__(**kwargs) self.id = id self.ignore_missing_v_net_service_endpoint = ignore_missing_v_net_service_endpoint diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_patch.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_patch.py new file mode 100644 index 00000000000..f7dd3251033 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/__init__.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/__init__.py index 5839e943283..b9aee75bbc6 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/__init__.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/__init__.py @@ -46,44 +46,50 @@ from ._restorable_table_resources_operations import RestorableTableResourcesOperations from ._service_operations import ServiceOperations +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'DatabaseAccountsOperations', - 'Operations', - 'DatabaseOperations', - 'CollectionOperations', - 'CollectionRegionOperations', - 'DatabaseAccountRegionOperations', - 'PercentileSourceTargetOperations', - 'PercentileTargetOperations', - 'PercentileOperations', - 'CollectionPartitionRegionOperations', - 'CollectionPartitionOperations', - 'PartitionKeyRangeIdOperations', - 'PartitionKeyRangeIdRegionOperations', - 'GraphResourcesOperations', - 'SqlResourcesOperations', - 'MongoDBResourcesOperations', - 'TableResourcesOperations', - 'CassandraResourcesOperations', - 'GremlinResourcesOperations', - 'LocationsOperations', - 'DataTransferJobsOperations', - 'CassandraClustersOperations', - 'CassandraDataCentersOperations', - 'NotebookWorkspacesOperations', - 'PrivateEndpointConnectionsOperations', - 'PrivateLinkResourcesOperations', - 'RestorableDatabaseAccountsOperations', - 'RestorableSqlDatabasesOperations', - 'RestorableSqlContainersOperations', - 'RestorableSqlResourcesOperations', - 'RestorableMongodbDatabasesOperations', - 'RestorableMongodbCollectionsOperations', - 'RestorableMongodbResourcesOperations', - 'RestorableGremlinDatabasesOperations', - 'RestorableGremlinGraphsOperations', - 'RestorableGremlinResourcesOperations', - 'RestorableTablesOperations', - 'RestorableTableResourcesOperations', - 'ServiceOperations', + "DatabaseAccountsOperations", + "Operations", + "DatabaseOperations", + "CollectionOperations", + "CollectionRegionOperations", + "DatabaseAccountRegionOperations", + "PercentileSourceTargetOperations", + "PercentileTargetOperations", + "PercentileOperations", + "CollectionPartitionRegionOperations", + "CollectionPartitionOperations", + "PartitionKeyRangeIdOperations", + "PartitionKeyRangeIdRegionOperations", + "GraphResourcesOperations", + "SqlResourcesOperations", + "MongoDBResourcesOperations", + "TableResourcesOperations", + "CassandraResourcesOperations", + "GremlinResourcesOperations", + "LocationsOperations", + "DataTransferJobsOperations", + "CassandraClustersOperations", + "CassandraDataCentersOperations", + "NotebookWorkspacesOperations", + "PrivateEndpointConnectionsOperations", + "PrivateLinkResourcesOperations", + "RestorableDatabaseAccountsOperations", + "RestorableSqlDatabasesOperations", + "RestorableSqlContainersOperations", + "RestorableSqlResourcesOperations", + "RestorableMongodbDatabasesOperations", + "RestorableMongodbCollectionsOperations", + "RestorableMongodbResourcesOperations", + "RestorableGremlinDatabasesOperations", + "RestorableGremlinGraphsOperations", + "RestorableGremlinResourcesOperations", + "RestorableTablesOperations", + "RestorableTableResourcesOperations", + "ServiceOperations", ] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_cassandra_clusters_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_cassandra_clusters_operations.py index 6177b1baff5..72ae81ada2c 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_cassandra_clusters_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_cassandra_clusters_operations.py @@ -6,541 +6,515 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_by_subscription_request( - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - accept = "application/json" +def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/cassandraClusters") + _url = kwargs.pop( + "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/cassandraClusters" + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_list_by_resource_group_request( - subscription_id: str, - resource_group_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - accept = "application/json" +def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_request( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - accept = "application/json" +def build_get_request(resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_request_initial( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - **kwargs: Any + +def build_delete_request( + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_request_initial( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + +def build_create_update_request( + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_request_initial( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_update_request( + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_invoke_command_request_initial( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_invoke_command_request( + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_list_backups_request( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - **kwargs: Any + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_backup_request( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - backup_id: str, - **kwargs: Any + resource_group_name: str, cluster_name: str, backup_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - "backupId": _SERIALIZER.url("backup_id", backup_id, 'str', max_length=15, min_length=1, pattern=r'^[0-9]+$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), + "backupId": _SERIALIZER.url("backup_id", backup_id, "str", max_length=15, min_length=1, pattern=r"^[0-9]+$"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deallocate_request_initial( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - **kwargs: Any +def build_deallocate_request( + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_start_request_initial( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - **kwargs: Any + +def build_start_request( + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_status_request( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - **kwargs: Any + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/status") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/status", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class CassandraClustersOperations(object): - """CassandraClustersOperations operations. - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. +class CassandraClustersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`cassandra_clusters` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list_by_subscription( - self, - **kwargs: Any - ) -> Iterable["_models.ListClusters"]: + def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ClusterResource"]: """List all managed Cassandra clusters in this subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListClusters or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.ListClusters] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either ClusterResource or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.ClusterResource] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ListClusters] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListClusters"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata['url'], + template_url=self.list_by_subscription.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -554,10 +528,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -567,56 +539,58 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/cassandraClusters"} # type: ignore + list_by_subscription.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/cassandraClusters"} # type: ignore @distributed_trace - def list_by_resource_group( - self, - resource_group_name: str, - **kwargs: Any - ) -> Iterable["_models.ListClusters"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.ClusterResource"]: """List all managed Cassandra clusters in this resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListClusters or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.ListClusters] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either ClusterResource or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.ClusterResource] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ListClusters] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListClusters"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata['url'], + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -630,10 +604,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -643,100 +615,102 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters"} # type: ignore + list_by_resource_group.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters"} # type: ignore @distributed_trace - def get( - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> "_models.ClusterResource": + def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _models.ClusterResource: """Get the properties of a managed Cassandra cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterResource, or the result of cls(response) + :return: ClusterResource or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ClusterResource - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterResource"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClusterResource] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any + self, resource_group_name: str, cluster_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_request( resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -746,21 +720,16 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> LROPoller[None]: + def begin_delete(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]: """Deletes a managed Cassandra cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -772,80 +741,94 @@ def begin_delete( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore def _create_update_initial( - self, - resource_group_name: str, - cluster_name: str, - body: "_models.ClusterResource", - **kwargs: Any - ) -> "_models.ClusterResource": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterResource"] + self, resource_group_name: str, cluster_name: str, body: Union[_models.ClusterResource, IO], **kwargs: Any + ) -> _models.ClusterResource: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(body, 'ClusterResource') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClusterResource] - request = build_create_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "ClusterResource") + + request = build_create_update_request( resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_initial.metadata['url'], + content=_content, + template_url=self._create_update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -853,36 +836,42 @@ def _create_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore - + _create_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore - @distributed_trace + @overload def begin_create_update( self, resource_group_name: str, cluster_name: str, - body: "_models.ClusterResource", + body: _models.ClusterResource, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller["_models.ClusterResource"]: + ) -> LROPoller[_models.ClusterResource]: """Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :param body: The properties specifying the desired state of the managed Cassandra cluster. + Required. :type body: ~azure.mgmt.cosmosdb.models.ClusterResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -894,86 +883,169 @@ def begin_create_update( :return: An instance of LROPoller that returns either ClusterResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ClusterResource] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterResource"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + def begin_create_update( + self, + resource_group_name: str, + cluster_name: str, + body: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ClusterResource]: + """Create or update a managed Cassandra cluster. When updating, you must specify all writable + properties. To update only some properties, use PATCH. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param body: The properties specifying the desired state of the managed Cassandra cluster. + Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ClusterResource or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ClusterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_update( + self, resource_group_name: str, cluster_name: str, body: Union[_models.ClusterResource, IO], **kwargs: Any + ) -> LROPoller[_models.ClusterResource]: + """Create or update a managed Cassandra cluster. When updating, you must specify all writable + properties. To update only some properties, use PATCH. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param body: The properties specifying the desired state of the managed Cassandra cluster. Is + either a model type or a IO type. Required. + :type body: ~azure.mgmt.cosmosdb.models.ClusterResource or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ClusterResource or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ClusterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClusterResource] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_initial( + raw_result = self._create_update_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore + begin_create_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - body: "_models.ClusterResource", - **kwargs: Any - ) -> "_models.ClusterResource": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterResource"] + self, resource_group_name: str, cluster_name: str, body: Union[_models.ClusterResource, IO], **kwargs: Any + ) -> _models.ClusterResource: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(body, 'ClusterResource') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClusterResource] - request = build_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "ClusterResource") + + request = build_update_request( resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_initial.metadata['url'], + content=_content, + template_url=self._update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -981,35 +1053,40 @@ def _update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if response.status_code == 202: - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore - + _update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore - @distributed_trace + @overload def begin_update( self, resource_group_name: str, cluster_name: str, - body: "_models.ClusterResource", + body: _models.ClusterResource, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller["_models.ClusterResource"]: + ) -> LROPoller[_models.ClusterResource]: """Updates some of the properties of a managed Cassandra cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param body: Parameters to provide for specifying the managed Cassandra cluster. + :param body: Parameters to provide for specifying the managed Cassandra cluster. Required. :type body: ~azure.mgmt.cosmosdb.models.ClusterResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1021,118 +1098,203 @@ def begin_update( :return: An instance of LROPoller that returns either ClusterResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ClusterResource] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterResource"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + body: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ClusterResource]: + """Updates some of the properties of a managed Cassandra cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param body: Parameters to provide for specifying the managed Cassandra cluster. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ClusterResource or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ClusterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, resource_group_name: str, cluster_name: str, body: Union[_models.ClusterResource, IO], **kwargs: Any + ) -> LROPoller[_models.ClusterResource]: + """Updates some of the properties of a managed Cassandra cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param body: Parameters to provide for specifying the managed Cassandra cluster. Is either a + model type or a IO type. Required. + :type body: ~azure.mgmt.cosmosdb.models.ClusterResource or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ClusterResource or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ClusterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClusterResource] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._update_initial( + raw_result = self._update_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ClusterResource', pipeline_response) + deserialized = self._deserialize("ClusterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore + begin_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}"} # type: ignore def _invoke_command_initial( - self, - resource_group_name: str, - cluster_name: str, - body: "_models.CommandPostBody", - **kwargs: Any - ) -> "_models.CommandOutput": - cls = kwargs.pop('cls', None) # type: ClsType["_models.CommandOutput"] + self, resource_group_name: str, cluster_name: str, body: Union[_models.CommandPostBody, IO], **kwargs: Any + ) -> _models.CommandOutput: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(body, 'CommandPostBody') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CommandOutput] - request = build_invoke_command_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "CommandPostBody") + + request = build_invoke_command_request( resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._invoke_command_initial.metadata['url'], + content=_content, + template_url=self._invoke_command_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('CommandOutput', pipeline_response) + deserialized = self._deserialize("CommandOutput", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _invoke_command_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand"} # type: ignore - + _invoke_command_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand"} # type: ignore - @distributed_trace + @overload def begin_invoke_command( self, resource_group_name: str, cluster_name: str, - body: "_models.CommandPostBody", + body: _models.CommandPostBody, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller["_models.CommandOutput"]: + ) -> LROPoller[_models.CommandOutput]: """Invoke a command like nodetool for cassandra maintenance. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param body: Specification which command to run where. + :param body: Specification which command to run where. Required. :type body: ~azure.mgmt.cosmosdb.models.CommandPostBody + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1144,100 +1306,174 @@ def begin_invoke_command( :return: An instance of LROPoller that returns either CommandOutput or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CommandOutput] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CommandOutput"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + def begin_invoke_command( + self, + resource_group_name: str, + cluster_name: str, + body: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommandOutput]: + """Invoke a command like nodetool for cassandra maintenance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param body: Specification which command to run where. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CommandOutput or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CommandOutput] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_invoke_command( + self, resource_group_name: str, cluster_name: str, body: Union[_models.CommandPostBody, IO], **kwargs: Any + ) -> LROPoller[_models.CommandOutput]: + """Invoke a command like nodetool for cassandra maintenance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param body: Specification which command to run where. Is either a model type or a IO type. + Required. + :type body: ~azure.mgmt.cosmosdb.models.CommandPostBody or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CommandOutput or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CommandOutput] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CommandOutput] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._invoke_command_initial( + raw_result = self._invoke_command_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('CommandOutput', pipeline_response) + deserialized = self._deserialize("CommandOutput", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_invoke_command.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand"} # type: ignore + begin_invoke_command.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand"} # type: ignore @distributed_trace def list_backups( - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> Iterable["_models.ListBackups"]: + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> Iterable["_models.BackupResource"]: """List the backups of this cluster that are available to restore. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListBackups or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.ListBackups] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either BackupResource or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.BackupResource] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ListBackups] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListBackups"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_backups_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_backups.metadata['url'], + template_url=self.list_backups.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_backups_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1251,10 +1487,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1264,104 +1498,107 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups"} # type: ignore + list_backups.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups"} # type: ignore @distributed_trace def get_backup( - self, - resource_group_name: str, - cluster_name: str, - backup_id: str, - **kwargs: Any - ) -> "_models.BackupResource": + self, resource_group_name: str, cluster_name: str, backup_id: str, **kwargs: Any + ) -> _models.BackupResource: """Get the properties of an individual backup of this cluster that is available to restore. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param backup_id: Id of a restorable backup of a Cassandra cluster. + :param backup_id: Id of a restorable backup of a Cassandra cluster. Required. :type backup_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResource, or the result of cls(response) + :return: BackupResource or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.BackupResource - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResource"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupResource] - request = build_get_backup_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, cluster_name=cluster_name, backup_id=backup_id, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_backup.metadata['url'], + template_url=self.get_backup.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackupResource', pipeline_response) + deserialized = self._deserialize("BackupResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}"} # type: ignore - + get_backup.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}"} # type: ignore def _deallocate_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any + self, resource_group_name: str, cluster_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_deallocate_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_deallocate_request( resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._deallocate_initial.metadata['url'], + template_url=self._deallocate_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202]: @@ -1371,23 +1608,18 @@ def _deallocate_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _deallocate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate"} # type: ignore - + _deallocate_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate"} # type: ignore @distributed_trace - def begin_deallocate( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> LROPoller[None]: + def begin_deallocate(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]: """Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1399,75 +1631,82 @@ def begin_deallocate( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._deallocate_initial( + raw_result = self._deallocate_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_deallocate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate"} # type: ignore + begin_deallocate.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate"} # type: ignore def _start_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any + self, resource_group_name: str, cluster_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_start_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_start_request( resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._start_initial.metadata['url'], + template_url=self._start_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202]: @@ -1477,23 +1716,18 @@ def _start_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _start_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start"} # type: ignore - + _start_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start"} # type: ignore @distributed_trace - def begin_start( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> LROPoller[None]: + def begin_start(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]: """Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1505,99 +1739,106 @@ def begin_start( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._start_initial( + raw_result = self._start_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start"} # type: ignore + begin_start.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start"} # type: ignore @distributed_trace def status( - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> "_models.CassandraClusterPublicStatus": + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> _models.CassandraClusterPublicStatus: """Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: CassandraClusterPublicStatus, or the result of cls(response) + :return: CassandraClusterPublicStatus or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatus - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraClusterPublicStatus"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraClusterPublicStatus] - request = build_status_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.status.metadata['url'], + template_url=self.status.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('CassandraClusterPublicStatus', pipeline_response) + deserialized = self._deserialize("CassandraClusterPublicStatus", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/status"} # type: ignore - + status.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/status"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_cassandra_data_centers_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_cassandra_data_centers_operations.py index e5d916ffdb1..5d54224976d 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_cassandra_data_centers_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_cassandra_data_centers_operations.py @@ -6,303 +6,321 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - accept = "application/json" +def build_list_request(resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_request( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - data_center_name: str, - **kwargs: Any + resource_group_name: str, cluster_name: str, data_center_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - "dataCenterName": _SERIALIZER.url("data_center_name", data_center_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), + "dataCenterName": _SERIALIZER.url( + "data_center_name", + data_center_name, + "str", + max_length=100, + min_length=1, + pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$", + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request_initial( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - data_center_name: str, - **kwargs: Any + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, cluster_name: str, data_center_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - "dataCenterName": _SERIALIZER.url("data_center_name", data_center_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), + "dataCenterName": _SERIALIZER.url( + "data_center_name", + data_center_name, + "str", + max_length=100, + min_length=1, + pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$", + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_update_request_initial( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - data_center_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_update_request( + resource_group_name: str, cluster_name: str, data_center_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - "dataCenterName": _SERIALIZER.url("data_center_name", data_center_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), + "dataCenterName": _SERIALIZER.url( + "data_center_name", + data_center_name, + "str", + max_length=100, + min_length=1, + pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$", + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_update_request_initial( - subscription_id: str, - resource_group_name: str, - cluster_name: str, - data_center_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_update_request( + resource_group_name: str, cluster_name: str, data_center_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - "dataCenterName": _SERIALIZER.url("data_center_name", data_center_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url( + "cluster_name", cluster_name, "str", max_length=100, min_length=1, pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$" + ), + "dataCenterName": _SERIALIZER.url( + "data_center_name", + data_center_name, + "str", + max_length=100, + min_length=1, + pattern=r"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$", + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - -class CassandraDataCentersOperations(object): - """CassandraDataCentersOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +class CassandraDataCentersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`cassandra_data_centers` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( - self, - resource_group_name: str, - cluster_name: str, - **kwargs: Any - ) -> Iterable["_models.ListDataCenters"]: + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> Iterable["_models.DataCenterResource"]: """List all data centers in a particular managed Cassandra cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListDataCenters or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.ListDataCenters] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either DataCenterResource or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.DataCenterResource] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ListDataCenters] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListDataCenters"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, cluster_name=cluster_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -316,10 +334,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -329,106 +345,108 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters"} # type: ignore @distributed_trace def get( - self, - resource_group_name: str, - cluster_name: str, - data_center_name: str, - **kwargs: Any - ) -> "_models.DataCenterResource": + self, resource_group_name: str, cluster_name: str, data_center_name: str, **kwargs: Any + ) -> _models.DataCenterResource: """Get the properties of a managed Cassandra data center. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param data_center_name: Data center name in a managed Cassandra cluster. + :param data_center_name: Data center name in a managed Cassandra cluster. Required. :type data_center_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DataCenterResource, or the result of cls(response) + :return: DataCenterResource or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DataCenterResource - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCenterResource"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataCenterResource] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - data_center_name: str, - **kwargs: Any + self, resource_group_name: str, cluster_name: str, data_center_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_request( resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -438,24 +456,20 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - cluster_name: str, - data_center_name: str, - **kwargs: Any + def begin_delete( + self, resource_group_name: str, cluster_name: str, data_center_name: str, **kwargs: Any ) -> LROPoller[None]: """Delete a managed Cassandra data center. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param data_center_name: Data center name in a managed Cassandra cluster. + :param data_center_name: Data center name in a managed Cassandra cluster. Required. :type data_center_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -467,83 +481,101 @@ def begin_delete( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore def _create_update_initial( self, resource_group_name: str, cluster_name: str, data_center_name: str, - body: "_models.DataCenterResource", + body: Union[_models.DataCenterResource, IO], **kwargs: Any - ) -> "_models.DataCenterResource": - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCenterResource"] + ) -> _models.DataCenterResource: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(body, 'DataCenterResource') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataCenterResource] - request = build_create_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "DataCenterResource") + + request = build_create_update_request( resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_initial.metadata['url'], + content=_content, + template_url=self._create_update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -551,18 +583,97 @@ def _create_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + _create_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + @overload + def begin_create_update( + self, + resource_group_name: str, + cluster_name: str, + data_center_name: str, + body: _models.DataCenterResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataCenterResource]: + """Create or update a managed Cassandra data center. When updating, overwrite all properties. To + update only some properties, use PATCH. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param data_center_name: Data center name in a managed Cassandra cluster. Required. + :type data_center_name: str + :param body: Parameters specifying the managed Cassandra data center. Required. + :type body: ~azure.mgmt.cosmosdb.models.DataCenterResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DataCenterResource or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update( + self, + resource_group_name: str, + cluster_name: str, + data_center_name: str, + body: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataCenterResource]: + """Create or update a managed Cassandra data center. When updating, overwrite all properties. To + update only some properties, use PATCH. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param data_center_name: Data center name in a managed Cassandra cluster. Required. + :type data_center_name: str + :param body: Parameters specifying the managed Cassandra data center. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DataCenterResource or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update( @@ -570,20 +681,25 @@ def begin_create_update( resource_group_name: str, cluster_name: str, data_center_name: str, - body: "_models.DataCenterResource", + body: Union[_models.DataCenterResource, IO], **kwargs: Any - ) -> LROPoller["_models.DataCenterResource"]: + ) -> LROPoller[_models.DataCenterResource]: """Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param data_center_name: Data center name in a managed Cassandra cluster. + :param data_center_name: Data center name in a managed Cassandra cluster. Required. :type data_center_name: str - :param body: Parameters specifying the managed Cassandra data center. - :type body: ~azure.mgmt.cosmosdb.models.DataCenterResource + :param body: Parameters specifying the managed Cassandra data center. Is either a model type or + a IO type. Required. + :type body: ~azure.mgmt.cosmosdb.models.DataCenterResource or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -595,89 +711,106 @@ def begin_create_update( :return: An instance of LROPoller that returns either DataCenterResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCenterResource"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataCenterResource] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_initial( + raw_result = self._create_update_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + begin_create_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore def _update_initial( self, resource_group_name: str, cluster_name: str, data_center_name: str, - body: "_models.DataCenterResource", + body: Union[_models.DataCenterResource, IO], **kwargs: Any - ) -> "_models.DataCenterResource": - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCenterResource"] + ) -> _models.DataCenterResource: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(body, 'DataCenterResource') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataCenterResource] - request = build_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "DataCenterResource") + + request = build_update_request( resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_initial.metadata['url'], + content=_content, + template_url=self._update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -685,18 +818,95 @@ def _update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if response.status_code == 202: - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + _update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + data_center_name: str, + body: _models.DataCenterResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataCenterResource]: + """Update some of the properties of a managed Cassandra data center. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param data_center_name: Data center name in a managed Cassandra cluster. Required. + :type data_center_name: str + :param body: Parameters to provide for specifying the managed Cassandra data center. Required. + :type body: ~azure.mgmt.cosmosdb.models.DataCenterResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DataCenterResource or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + data_center_name: str, + body: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataCenterResource]: + """Update some of the properties of a managed Cassandra data center. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. Required. + :type cluster_name: str + :param data_center_name: Data center name in a managed Cassandra cluster. Required. + :type data_center_name: str + :param body: Parameters to provide for specifying the managed Cassandra data center. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DataCenterResource or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_update( @@ -704,19 +914,24 @@ def begin_update( resource_group_name: str, cluster_name: str, data_center_name: str, - body: "_models.DataCenterResource", + body: Union[_models.DataCenterResource, IO], **kwargs: Any - ) -> LROPoller["_models.DataCenterResource"]: + ) -> LROPoller[_models.DataCenterResource]: """Update some of the properties of a managed Cassandra data center. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. + :param cluster_name: Managed Cassandra cluster name. Required. :type cluster_name: str - :param data_center_name: Data center name in a managed Cassandra cluster. + :param data_center_name: Data center name in a managed Cassandra cluster. Required. :type data_center_name: str - :param body: Parameters to provide for specifying the managed Cassandra data center. - :type body: ~azure.mgmt.cosmosdb.models.DataCenterResource + :param body: Parameters to provide for specifying the managed Cassandra data center. Is either + a model type or a IO type. Required. + :type body: ~azure.mgmt.cosmosdb.models.DataCenterResource or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -728,48 +943,51 @@ def begin_update( :return: An instance of LROPoller that returns either DataCenterResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCenterResource"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataCenterResource] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._update_initial( + raw_result = self._update_initial( # type: ignore resource_group_name=resource_group_name, cluster_name=cluster_name, data_center_name=data_center_name, body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('DataCenterResource', pipeline_response) + deserialized = self._deserialize("DataCenterResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore + begin_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_cassandra_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_cassandra_resources_operations.py index c29258edcc9..3f3939a2420 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_cassandra_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_cassandra_resources_operations.py @@ -6,1068 +6,1023 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_cassandra_keyspaces_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_cassandra_keyspace_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, keyspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_cassandra_keyspace_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_create_update_cassandra_keyspace_request( + resource_group_name: str, account_name: str, keyspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_cassandra_keyspace_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any +def build_delete_cassandra_keyspace_request( + resource_group_name: str, account_name: str, keyspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_get_cassandra_keyspace_throughput_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, keyspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_cassandra_keyspace_throughput_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_update_cassandra_keyspace_throughput_request( + resource_group_name: str, account_name: str, keyspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_cassandra_keyspace_to_autoscale_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any +def build_migrate_cassandra_keyspace_to_autoscale_request( + resource_group_name: str, account_name: str, keyspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_cassandra_keyspace_to_manual_throughput_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any +def build_migrate_cassandra_keyspace_to_manual_throughput_request( + resource_group_name: str, account_name: str, keyspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_list_cassandra_tables_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, keyspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_cassandra_table_request( - subscription_id: str, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_cassandra_table_request_initial( - subscription_id: str, +def build_create_update_cassandra_table_request( resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_cassandra_table_request_initial( - subscription_id: str, +def build_delete_cassandra_table_request( resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_get_cassandra_table_throughput_request( - subscription_id: str, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_cassandra_table_throughput_request_initial( - subscription_id: str, +def build_update_cassandra_table_throughput_request( resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_cassandra_table_to_autoscale_request_initial( - subscription_id: str, +def build_migrate_cassandra_table_to_autoscale_request( resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_cassandra_table_to_manual_throughput_request_initial( - subscription_id: str, +def build_migrate_cassandra_table_to_manual_throughput_request( resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_list_cassandra_views_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, keyspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_cassandra_view_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "viewName": _SERIALIZER.url("view_name", view_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "viewName": _SERIALIZER.url("view_name", view_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_cassandra_view_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_create_update_cassandra_view_request( + resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "viewName": _SERIALIZER.url("view_name", view_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "viewName": _SERIALIZER.url("view_name", view_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_cassandra_view_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any +def build_delete_cassandra_view_request( + resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "viewName": _SERIALIZER.url("view_name", view_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "viewName": _SERIALIZER.url("view_name", view_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_get_cassandra_view_throughput_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "viewName": _SERIALIZER.url("view_name", view_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "viewName": _SERIALIZER.url("view_name", view_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_cassandra_view_throughput_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_update_cassandra_view_throughput_request( + resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "viewName": _SERIALIZER.url("view_name", view_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "viewName": _SERIALIZER.url("view_name", view_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_cassandra_view_to_autoscale_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any +def build_migrate_cassandra_view_to_autoscale_request( + resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "viewName": _SERIALIZER.url("view_name", view_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "viewName": _SERIALIZER.url("view_name", view_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_cassandra_view_to_manual_throughput_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any +def build_migrate_cassandra_view_to_manual_throughput_request( + resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, 'str'), - "viewName": _SERIALIZER.url("view_name", view_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "keyspaceName": _SERIALIZER.url("keyspace_name", keyspace_name, "str"), + "viewName": _SERIALIZER.url("view_name", view_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class CassandraResourcesOperations(object): # pylint: disable=too-many-public-methods - """CassandraResourcesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class CassandraResourcesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`cassandra_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_cassandra_keyspaces( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.CassandraKeyspaceListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.CassandraKeyspaceGetResults"]: """Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either CassandraKeyspaceListResult or the result of + :return: An iterator like instance of either CassandraKeyspaceGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.CassandraKeyspaceListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraKeyspaceListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraKeyspaceListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_cassandra_keyspaces_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_cassandra_keyspaces.metadata['url'], + template_url=self.list_cassandra_keyspaces.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_cassandra_keyspaces_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1081,10 +1036,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1094,112 +1047,128 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_cassandra_keyspaces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces"} # type: ignore + list_cassandra_keyspaces.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces"} # type: ignore @distributed_trace def get_cassandra_keyspace( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> "_models.CassandraKeyspaceGetResults": + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> _models.CassandraKeyspaceGetResults: """Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: CassandraKeyspaceGetResults, or the result of cls(response) + :return: CassandraKeyspaceGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraKeyspaceGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraKeyspaceGetResults] - request = build_get_cassandra_keyspace_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_cassandra_keyspace.metadata['url'], + template_url=self.get_cassandra_keyspace.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('CassandraKeyspaceGetResults', pipeline_response) + deserialized = self._deserialize("CassandraKeyspaceGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_cassandra_keyspace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore - + get_cassandra_keyspace.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore def _create_update_cassandra_keyspace_initial( self, resource_group_name: str, account_name: str, keyspace_name: str, - create_update_cassandra_keyspace_parameters: "_models.CassandraKeyspaceCreateUpdateParameters", + create_update_cassandra_keyspace_parameters: Union[_models.CassandraKeyspaceCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.CassandraKeyspaceGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CassandraKeyspaceGetResults"]] + ) -> Optional[_models.CassandraKeyspaceGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_cassandra_keyspace_parameters, 'CassandraKeyspaceCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.CassandraKeyspaceGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_cassandra_keyspace_parameters, (IO, bytes)): + _content = create_update_cassandra_keyspace_parameters + else: + _json = self._serialize.body( + create_update_cassandra_keyspace_parameters, "CassandraKeyspaceCreateUpdateParameters" + ) - request = build_create_update_cassandra_keyspace_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_cassandra_keyspace_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_cassandra_keyspace_initial.metadata['url'], + content=_content, + template_url=self._create_update_cassandra_keyspace_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1208,15 +1177,95 @@ def _create_update_cassandra_keyspace_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('CassandraKeyspaceGetResults', pipeline_response) + deserialized = self._deserialize("CassandraKeyspaceGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_cassandra_keyspace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore + _create_update_cassandra_keyspace_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore + + @overload + def begin_create_update_cassandra_keyspace( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + create_update_cassandra_keyspace_parameters: _models.CassandraKeyspaceCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CassandraKeyspaceGetResults]: + """Create or update an Azure Cosmos DB Cassandra keyspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param create_update_cassandra_keyspace_parameters: The parameters to provide for the current + Cassandra keyspace. Required. + :type create_update_cassandra_keyspace_parameters: + ~azure.mgmt.cosmosdb.models.CassandraKeyspaceCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CassandraKeyspaceGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_cassandra_keyspace( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + create_update_cassandra_keyspace_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CassandraKeyspaceGetResults]: + """Create or update an Azure Cosmos DB Cassandra keyspace. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param create_update_cassandra_keyspace_parameters: The parameters to provide for the current + Cassandra keyspace. Required. + :type create_update_cassandra_keyspace_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CassandraKeyspaceGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_cassandra_keyspace( @@ -1224,21 +1273,25 @@ def begin_create_update_cassandra_keyspace( resource_group_name: str, account_name: str, keyspace_name: str, - create_update_cassandra_keyspace_parameters: "_models.CassandraKeyspaceCreateUpdateParameters", + create_update_cassandra_keyspace_parameters: Union[_models.CassandraKeyspaceCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.CassandraKeyspaceGetResults"]: + ) -> LROPoller[_models.CassandraKeyspaceGetResults]: """Create or update an Azure Cosmos DB Cassandra keyspace. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :param create_update_cassandra_keyspace_parameters: The parameters to provide for the current - Cassandra keyspace. + Cassandra keyspace. Is either a model type or a IO type. Required. :type create_update_cassandra_keyspace_parameters: - ~azure.mgmt.cosmosdb.models.CassandraKeyspaceCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.CassandraKeyspaceCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1250,84 +1303,89 @@ def begin_create_update_cassandra_keyspace( :return: An instance of LROPoller that returns either CassandraKeyspaceGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraKeyspaceGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraKeyspaceGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_cassandra_keyspace_initial( + raw_result = self._create_update_cassandra_keyspace_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, create_update_cassandra_keyspace_parameters=create_update_cassandra_keyspace_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('CassandraKeyspaceGetResults', pipeline_response) + deserialized = self._deserialize("CassandraKeyspaceGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_cassandra_keyspace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore + begin_create_update_cassandra_keyspace.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore def _delete_cassandra_keyspace_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_cassandra_keyspace_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_cassandra_keyspace_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_cassandra_keyspace_initial.metadata['url'], + template_url=self._delete_cassandra_keyspace_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1337,24 +1395,20 @@ def _delete_cassandra_keyspace_initial( # pylint: disable=inconsistent-return-s if cls: return cls(pipeline_response, None, {}) - _delete_cassandra_keyspace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore - + _delete_cassandra_keyspace_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore @distributed_trace - def begin_delete_cassandra_keyspace( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any + def begin_delete_cassandra_keyspace( + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB Cassandra keyspace. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1366,146 +1420,166 @@ def begin_delete_cassandra_keyspace( # pylint: disable=inconsistent-return-stat Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_cassandra_keyspace_initial( + raw_result = self._delete_cassandra_keyspace_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_cassandra_keyspace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore + begin_delete_cassandra_keyspace.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}"} # type: ignore @distributed_trace def get_cassandra_keyspace_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_cassandra_keyspace_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_cassandra_keyspace_throughput.metadata['url'], + template_url=self.get_cassandra_keyspace_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_cassandra_keyspace_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default"} # type: ignore - + get_cassandra_keyspace_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default"} # type: ignore def _update_cassandra_keyspace_throughput_initial( self, resource_group_name: str, account_name: str, keyspace_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_cassandra_keyspace_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_cassandra_keyspace_throughput_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_cassandra_keyspace_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_cassandra_keyspace_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1514,37 +1588,42 @@ def _update_cassandra_keyspace_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_cassandra_keyspace_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default"} # type: ignore + _update_cassandra_keyspace_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default"} # type: ignore - - @distributed_trace + @overload def begin_update_cassandra_keyspace_throughput( self, resource_group_name: str, account_name: str, keyspace_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB Cassandra Keyspace. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current Cassandra Keyspace. + current Cassandra Keyspace. Required. :type update_throughput_parameters: ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1556,84 +1635,168 @@ def begin_update_cassandra_keyspace_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_cassandra_keyspace_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, + + @overload + def begin_update_cassandra_keyspace_throughput( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Cassandra Keyspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Cassandra Keyspace. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update_cassandra_keyspace_throughput( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Cassandra Keyspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Cassandra Keyspace. Is either a model type or a IO type. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_cassandra_keyspace_throughput_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, keyspace_name=keyspace_name, update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_cassandra_keyspace_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default"} # type: ignore + begin_update_cassandra_keyspace_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default"} # type: ignore def _migrate_cassandra_keyspace_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_cassandra_keyspace_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_cassandra_keyspace_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_cassandra_keyspace_to_autoscale_initial.metadata['url'], + template_url=self._migrate_cassandra_keyspace_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1642,31 +1805,27 @@ def _migrate_cassandra_keyspace_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_cassandra_keyspace_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_cassandra_keyspace_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace def begin_migrate_cassandra_keyspace_to_autoscale( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1679,81 +1838,86 @@ def begin_migrate_cassandra_keyspace_to_autoscale( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_cassandra_keyspace_to_autoscale_initial( + raw_result = self._migrate_cassandra_keyspace_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_cassandra_keyspace_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_cassandra_keyspace_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale"} # type: ignore def _migrate_cassandra_keyspace_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_cassandra_keyspace_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_cassandra_keyspace_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_cassandra_keyspace_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_cassandra_keyspace_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1762,31 +1926,27 @@ def _migrate_cassandra_keyspace_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_cassandra_keyspace_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_cassandra_keyspace_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def begin_migrate_cassandra_keyspace_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1799,104 +1959,109 @@ def begin_migrate_cassandra_keyspace_to_manual_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_cassandra_keyspace_to_manual_throughput_initial( + raw_result = self._migrate_cassandra_keyspace_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_cassandra_keyspace_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_cassandra_keyspace_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def list_cassandra_tables( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> Iterable["_models.CassandraTableListResult"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> Iterable["_models.CassandraTableGetResults"]: """Lists the Cassandra table under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either CassandraTableListResult or the result of + :return: An iterator like instance of either CassandraTableGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.CassandraTableListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.CassandraTableGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraTableListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraTableListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_cassandra_tables_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_cassandra_tables.metadata['url'], + template_url=self.list_cassandra_tables.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_cassandra_tables_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1910,10 +2075,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1923,77 +2086,76 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_cassandra_tables.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables"} # type: ignore + list_cassandra_tables.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables"} # type: ignore @distributed_trace def get_cassandra_table( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any - ) -> "_models.CassandraTableGetResults": + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any + ) -> _models.CassandraTableGetResults: """Gets the Cassandra table under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: CassandraTableGetResults, or the result of cls(response) + :return: CassandraTableGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.CassandraTableGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraTableGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraTableGetResults] - request = build_get_cassandra_table_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_cassandra_table.metadata['url'], + template_url=self.get_cassandra_table.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('CassandraTableGetResults', pipeline_response) + deserialized = self._deserialize("CassandraTableGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_cassandra_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore - + get_cassandra_table.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore def _create_update_cassandra_table_initial( self, @@ -2001,39 +2163,55 @@ def _create_update_cassandra_table_initial( account_name: str, keyspace_name: str, table_name: str, - create_update_cassandra_table_parameters: "_models.CassandraTableCreateUpdateParameters", + create_update_cassandra_table_parameters: Union[_models.CassandraTableCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.CassandraTableGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CassandraTableGetResults"]] + ) -> Optional[_models.CassandraTableGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_cassandra_table_parameters, 'CassandraTableCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.CassandraTableGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_cassandra_table_parameters, (IO, bytes)): + _content = create_update_cassandra_table_parameters + else: + _json = self._serialize.body( + create_update_cassandra_table_parameters, "CassandraTableCreateUpdateParameters" + ) - request = build_create_update_cassandra_table_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_cassandra_table_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_cassandra_table_initial.metadata['url'], + content=_content, + template_url=self._create_update_cassandra_table_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2042,15 +2220,101 @@ def _create_update_cassandra_table_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('CassandraTableGetResults', pipeline_response) + deserialized = self._deserialize("CassandraTableGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_cassandra_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore + _create_update_cassandra_table_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore + @overload + def begin_create_update_cassandra_table( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + table_name: str, + create_update_cassandra_table_parameters: _models.CassandraTableCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CassandraTableGetResults]: + """Create or update an Azure Cosmos DB Cassandra Table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param create_update_cassandra_table_parameters: The parameters to provide for the current + Cassandra Table. Required. + :type create_update_cassandra_table_parameters: + ~azure.mgmt.cosmosdb.models.CassandraTableCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CassandraTableGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CassandraTableGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_cassandra_table( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + table_name: str, + create_update_cassandra_table_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CassandraTableGetResults]: + """Create or update an Azure Cosmos DB Cassandra Table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param create_update_cassandra_table_parameters: The parameters to provide for the current + Cassandra Table. Required. + :type create_update_cassandra_table_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CassandraTableGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CassandraTableGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_cassandra_table( @@ -2059,23 +2323,27 @@ def begin_create_update_cassandra_table( account_name: str, keyspace_name: str, table_name: str, - create_update_cassandra_table_parameters: "_models.CassandraTableCreateUpdateParameters", + create_update_cassandra_table_parameters: Union[_models.CassandraTableCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.CassandraTableGetResults"]: + ) -> LROPoller[_models.CassandraTableGetResults]: """Create or update an Azure Cosmos DB Cassandra Table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :param create_update_cassandra_table_parameters: The parameters to provide for the current - Cassandra Table. + Cassandra Table. Is either a model type or a IO type. Required. :type create_update_cassandra_table_parameters: - ~azure.mgmt.cosmosdb.models.CassandraTableCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.CassandraTableCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -2087,19 +2355,19 @@ def begin_create_update_cassandra_table( :return: An instance of LROPoller that returns either CassandraTableGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CassandraTableGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraTableGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraTableGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_cassandra_table_initial( + raw_result = self._create_update_cassandra_table_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, @@ -2107,67 +2375,71 @@ def begin_create_update_cassandra_table( create_update_cassandra_table_parameters=create_update_cassandra_table_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('CassandraTableGetResults', pipeline_response) + deserialized = self._deserialize("CassandraTableGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_cassandra_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore + begin_create_update_cassandra_table.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore def _delete_cassandra_table_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_cassandra_table_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_cassandra_table_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_cassandra_table_initial.metadata['url'], + template_url=self._delete_cassandra_table_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -2177,27 +2449,22 @@ def _delete_cassandra_table_initial( # pylint: disable=inconsistent-return-stat if cls: return cls(pipeline_response, None, {}) - _delete_cassandra_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore - + _delete_cassandra_table_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore @distributed_trace - def begin_delete_cassandra_table( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any + def begin_delete_cassandra_table( + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB Cassandra table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2209,113 +2476,118 @@ def begin_delete_cassandra_table( # pylint: disable=inconsistent-return-stateme Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_cassandra_table_initial( + raw_result = self._delete_cassandra_table_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_cassandra_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore + begin_delete_cassandra_table.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}"} # type: ignore @distributed_trace def get_cassandra_table_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_cassandra_table_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_cassandra_table_throughput.metadata['url'], + template_url=self.get_cassandra_table_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_cassandra_table_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default"} # type: ignore - + get_cassandra_table_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default"} # type: ignore def _update_cassandra_table_throughput_initial( self, @@ -2323,39 +2595,53 @@ def _update_cassandra_table_throughput_initial( account_name: str, keyspace_name: str, table_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_cassandra_table_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_cassandra_table_throughput_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_cassandra_table_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_cassandra_table_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2364,15 +2650,101 @@ def _update_cassandra_table_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_cassandra_table_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default"} # type: ignore + _update_cassandra_table_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default"} # type: ignore + @overload + def begin_update_cassandra_table_throughput( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + table_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Cassandra table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Cassandra table. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_cassandra_table_throughput( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + table_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Cassandra table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Cassandra table. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_update_cassandra_table_throughput( @@ -2381,23 +2753,27 @@ def begin_update_cassandra_table_throughput( account_name: str, keyspace_name: str, table_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB Cassandra table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current Cassandra table. + current Cassandra table. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -2409,19 +2785,19 @@ def begin_update_cassandra_table_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._update_cassandra_table_throughput_initial( + raw_result = self._update_cassandra_table_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, @@ -2429,67 +2805,71 @@ def begin_update_cassandra_table_throughput( update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_cassandra_table_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default"} # type: ignore + begin_update_cassandra_table_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default"} # type: ignore def _migrate_cassandra_table_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_cassandra_table_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_cassandra_table_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_cassandra_table_to_autoscale_initial.metadata['url'], + template_url=self._migrate_cassandra_table_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2498,34 +2878,29 @@ def _migrate_cassandra_table_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_cassandra_table_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + _migrate_cassandra_table_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - - @distributed_trace - def begin_migrate_cassandra_table_to_autoscale( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + @distributed_trace + def begin_migrate_cassandra_table_to_autoscale( + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2538,84 +2913,88 @@ def begin_migrate_cassandra_table_to_autoscale( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_cassandra_table_to_autoscale_initial( + raw_result = self._migrate_cassandra_table_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_cassandra_table_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_cassandra_table_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore def _migrate_cassandra_table_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_cassandra_table_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_cassandra_table_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_cassandra_table_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_cassandra_table_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2624,34 +3003,29 @@ def _migrate_cassandra_table_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_cassandra_table_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_cassandra_table_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def begin_migrate_cassandra_table_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - table_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, table_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2664,105 +3038,110 @@ def begin_migrate_cassandra_table_to_manual_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_cassandra_table_to_manual_throughput_initial( + raw_result = self._migrate_cassandra_table_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, table_name=table_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_cassandra_table_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_cassandra_table_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def list_cassandra_views( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> Iterable["_models.CassandraViewListResult"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, **kwargs: Any + ) -> Iterable["_models.CassandraViewGetResults"]: """Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either CassandraViewListResult or the result of + :return: An iterator like instance of either CassandraViewGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.CassandraViewListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraViewListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraViewListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_cassandra_views_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_cassandra_views.metadata['url'], + template_url=self.list_cassandra_views.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_cassandra_views_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -2776,10 +3155,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2789,77 +3166,76 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_cassandra_views.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views"} # type: ignore + list_cassandra_views.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views"} # type: ignore @distributed_trace def get_cassandra_view( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> "_models.CassandraViewGetResults": + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any + ) -> _models.CassandraViewGetResults: """Gets the Cassandra view under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: CassandraViewGetResults, or the result of cls(response) + :return: CassandraViewGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.CassandraViewGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraViewGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraViewGetResults] - request = build_get_cassandra_view_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_cassandra_view.metadata['url'], + template_url=self.get_cassandra_view.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('CassandraViewGetResults', pipeline_response) + deserialized = self._deserialize("CassandraViewGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_cassandra_view.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore - + get_cassandra_view.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore def _create_update_cassandra_view_initial( self, @@ -2867,39 +3243,53 @@ def _create_update_cassandra_view_initial( account_name: str, keyspace_name: str, view_name: str, - create_update_cassandra_view_parameters: "_models.CassandraViewCreateUpdateParameters", + create_update_cassandra_view_parameters: Union[_models.CassandraViewCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.CassandraViewGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CassandraViewGetResults"]] + ) -> Optional[_models.CassandraViewGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_cassandra_view_parameters, 'CassandraViewCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.CassandraViewGetResults]] - request = build_create_update_cassandra_view_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_cassandra_view_parameters, (IO, bytes)): + _content = create_update_cassandra_view_parameters + else: + _json = self._serialize.body(create_update_cassandra_view_parameters, "CassandraViewCreateUpdateParameters") + + request = build_create_update_cassandra_view_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_cassandra_view_initial.metadata['url'], + content=_content, + template_url=self._create_update_cassandra_view_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2908,15 +3298,101 @@ def _create_update_cassandra_view_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('CassandraViewGetResults', pipeline_response) + deserialized = self._deserialize("CassandraViewGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_cassandra_view_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore + _create_update_cassandra_view_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore + + @overload + def begin_create_update_cassandra_view( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + view_name: str, + create_update_cassandra_view_parameters: _models.CassandraViewCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CassandraViewGetResults]: + """Create or update an Azure Cosmos DB Cassandra View. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param view_name: Cosmos DB view name. Required. + :type view_name: str + :param create_update_cassandra_view_parameters: The parameters to provide for the current + Cassandra View. Required. + :type create_update_cassandra_view_parameters: + ~azure.mgmt.cosmosdb.models.CassandraViewCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CassandraViewGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_cassandra_view( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + view_name: str, + create_update_cassandra_view_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CassandraViewGetResults]: + """Create or update an Azure Cosmos DB Cassandra View. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param view_name: Cosmos DB view name. Required. + :type view_name: str + :param create_update_cassandra_view_parameters: The parameters to provide for the current + Cassandra View. Required. + :type create_update_cassandra_view_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CassandraViewGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_cassandra_view( @@ -2925,23 +3401,27 @@ def begin_create_update_cassandra_view( account_name: str, keyspace_name: str, view_name: str, - create_update_cassandra_view_parameters: "_models.CassandraViewCreateUpdateParameters", + create_update_cassandra_view_parameters: Union[_models.CassandraViewCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.CassandraViewGetResults"]: + ) -> LROPoller[_models.CassandraViewGetResults]: """Create or update an Azure Cosmos DB Cassandra View. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :param create_update_cassandra_view_parameters: The parameters to provide for the current - Cassandra View. + Cassandra View. Is either a model type or a IO type. Required. :type create_update_cassandra_view_parameters: - ~azure.mgmt.cosmosdb.models.CassandraViewCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.CassandraViewCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -2953,19 +3433,19 @@ def begin_create_update_cassandra_view( :return: An instance of LROPoller that returns either CassandraViewGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraViewGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CassandraViewGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_cassandra_view_initial( + raw_result = self._create_update_cassandra_view_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, @@ -2973,67 +3453,71 @@ def begin_create_update_cassandra_view( create_update_cassandra_view_parameters=create_update_cassandra_view_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('CassandraViewGetResults', pipeline_response) + deserialized = self._deserialize("CassandraViewGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_cassandra_view.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore + begin_create_update_cassandra_view.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore def _delete_cassandra_view_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_cassandra_view_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_cassandra_view_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_cassandra_view_initial.metadata['url'], + template_url=self._delete_cassandra_view_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -3043,27 +3527,22 @@ def _delete_cassandra_view_initial( # pylint: disable=inconsistent-return-state if cls: return cls(pipeline_response, None, {}) - _delete_cassandra_view_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore - + _delete_cassandra_view_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore @distributed_trace - def begin_delete_cassandra_view( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any + def begin_delete_cassandra_view( + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB Cassandra view. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3075,113 +3554,118 @@ def begin_delete_cassandra_view( # pylint: disable=inconsistent-return-statemen Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_cassandra_view_initial( + raw_result = self._delete_cassandra_view_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_cassandra_view.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore + begin_delete_cassandra_view.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}"} # type: ignore @distributed_trace def get_cassandra_view_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_cassandra_view_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_cassandra_view_throughput.metadata['url'], + template_url=self.get_cassandra_view_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_cassandra_view_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"} # type: ignore - + get_cassandra_view_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"} # type: ignore def _update_cassandra_view_throughput_initial( self, @@ -3189,39 +3673,53 @@ def _update_cassandra_view_throughput_initial( account_name: str, keyspace_name: str, view_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_cassandra_view_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_cassandra_view_throughput_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_cassandra_view_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_cassandra_view_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3230,15 +3728,101 @@ def _update_cassandra_view_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_cassandra_view_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"} # type: ignore + _update_cassandra_view_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"} # type: ignore + + @overload + def begin_update_cassandra_view_throughput( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + view_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Cassandra view. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param view_name: Cosmos DB view name. Required. + :type view_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Cassandra view. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_cassandra_view_throughput( + self, + resource_group_name: str, + account_name: str, + keyspace_name: str, + view_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Cassandra view. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. Required. + :type keyspace_name: str + :param view_name: Cosmos DB view name. Required. + :type view_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Cassandra view. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_update_cassandra_view_throughput( @@ -3247,23 +3831,27 @@ def begin_update_cassandra_view_throughput( account_name: str, keyspace_name: str, view_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB Cassandra view. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current Cassandra view. + current Cassandra view. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -3275,19 +3863,19 @@ def begin_update_cassandra_view_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._update_cassandra_view_throughput_initial( + raw_result = self._update_cassandra_view_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, @@ -3295,67 +3883,71 @@ def begin_update_cassandra_view_throughput( update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_cassandra_view_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"} # type: ignore + begin_update_cassandra_view_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default"} # type: ignore def _migrate_cassandra_view_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_cassandra_view_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_cassandra_view_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_cassandra_view_to_autoscale_initial.metadata['url'], + template_url=self._migrate_cassandra_view_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3364,34 +3956,29 @@ def _migrate_cassandra_view_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_cassandra_view_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_cassandra_view_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace def begin_migrate_cassandra_view_to_autoscale( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3404,84 +3991,88 @@ def begin_migrate_cassandra_view_to_autoscale( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_cassandra_view_to_autoscale_initial( + raw_result = self._migrate_cassandra_view_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_cassandra_view_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_cassandra_view_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale"} # type: ignore def _migrate_cassandra_view_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_cassandra_view_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_cassandra_view_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_cassandra_view_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_cassandra_view_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3490,34 +4081,29 @@ def _migrate_cassandra_view_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_cassandra_view_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_cassandra_view_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def begin_migrate_cassandra_view_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, keyspace_name: str, view_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. + :param keyspace_name: Cosmos DB keyspace name. Required. :type keyspace_name: str - :param view_name: Cosmos DB view name. + :param view_name: Cosmos DB view name. Required. :type view_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3530,46 +4116,49 @@ def begin_migrate_cassandra_view_to_manual_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_cassandra_view_to_manual_throughput_initial( + raw_result = self._migrate_cassandra_view_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, keyspace_name=keyspace_name, view_name=view_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_cassandra_view_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_cassandra_view_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_operations.py index b6f34022143..cb47c68b013 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_operations.py @@ -7,172 +7,186 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_metrics_request( - subscription_id: str, resource_group_name: str, account_name: str, database_rid: str, collection_rid: str, + subscription_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metrics") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metrics", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseRid": _SERIALIZER.url("database_rid", database_rid, 'str'), - "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseRid": _SERIALIZER.url("database_rid", database_rid, "str"), + "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_list_usages_request( - subscription_id: str, resource_group_name: str, account_name: str, database_rid: str, collection_rid: str, + subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/usages") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/usages", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseRid": _SERIALIZER.url("database_rid", database_rid, 'str'), - "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseRid": _SERIALIZER.url("database_rid", database_rid, "str"), + "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_list_metric_definitions_request( - subscription_id: str, resource_group_name: str, account_name: str, database_rid: str, collection_rid: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metricDefinitions") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metricDefinitions", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseRid": _SERIALIZER.url("database_rid", database_rid, 'str'), - "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseRid": _SERIALIZER.url("database_rid", database_rid, "str"), + "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class CollectionOperations(object): - """CollectionOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class CollectionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`collection` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -183,64 +197,68 @@ def list_metrics( collection_rid: str, filter: str, **kwargs: Any - ) -> Iterable["_models.MetricListResult"]: + ) -> Iterable["_models.Metric"]: """Retrieves the metrics determined by the given filter for the given database account and collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Metric or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.Metric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, collection_rid=collection_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -254,10 +272,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -267,11 +283,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metrics"} # type: ignore @distributed_trace def list_usages( @@ -282,63 +296,67 @@ def list_usages( collection_rid: str, filter: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.UsagesResult"]: + ) -> Iterable["_models.Usage"]: """Retrieves the usages (most recent storage data) for the given collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :param filter: An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either UsagesResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.UsagesResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Usage or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.UsagesResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_usages_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, collection_rid=collection_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_usages.metadata['url'], + api_version=api_version, + template_url=self.list_usages.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_usages_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -352,10 +370,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -365,72 +381,69 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/usages"} # type: ignore + list_usages.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/usages"} # type: ignore @distributed_trace def list_metric_definitions( - self, - resource_group_name: str, - account_name: str, - database_rid: str, - collection_rid: str, - **kwargs: Any - ) -> Iterable["_models.MetricDefinitionsListResult"]: + self, resource_group_name: str, account_name: str, database_rid: str, collection_rid: str, **kwargs: Any + ) -> Iterable["_models.MetricDefinition"]: """Retrieves metric definitions for the given collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricDefinitionsListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MetricDefinitionsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either MetricDefinition or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MetricDefinition] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricDefinitionsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricDefinitionsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metric_definitions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, collection_rid=collection_rid, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_metric_definitions.metadata['url'], + template_url=self.list_metric_definitions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metric_definitions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -444,10 +457,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -457,8 +468,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metricDefinitions"} # type: ignore + list_metric_definitions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metricDefinitions"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_partition_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_partition_operations.py index 1241c6e54dc..8f8fd58b70e 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_partition_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_partition_operations.py @@ -7,132 +7,144 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_metrics_request( - subscription_id: str, resource_group_name: str, account_name: str, database_rid: str, collection_rid: str, + subscription_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseRid": _SERIALIZER.url("database_rid", database_rid, 'str'), - "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseRid": _SERIALIZER.url("database_rid", database_rid, "str"), + "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_list_usages_request( - subscription_id: str, resource_group_name: str, account_name: str, database_rid: str, collection_rid: str, + subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/usages") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/usages", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseRid": _SERIALIZER.url("database_rid", database_rid, 'str'), - "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseRid": _SERIALIZER.url("database_rid", database_rid, "str"), + "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class CollectionPartitionOperations(object): - """CollectionPartitionOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class CollectionPartitionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`collection_partition` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -143,65 +155,68 @@ def list_metrics( collection_rid: str, filter: str, **kwargs: Any - ) -> Iterable["_models.PartitionMetricListResult"]: + ) -> Iterable["_models.PartitionMetric"]: """Retrieves the metrics determined by the given filter for the given collection, split by partition. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartitionMetricListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PartitionMetric or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PartitionMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, collection_rid=collection_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -215,10 +230,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -228,11 +241,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics"} # type: ignore @distributed_trace def list_usages( @@ -243,64 +254,67 @@ def list_usages( collection_rid: str, filter: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.PartitionUsagesResult"]: + ) -> Iterable["_models.PartitionUsage"]: """Retrieves the usages (most recent storage data) for the given collection, split by partition. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :param filter: An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartitionUsagesResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PartitionUsagesResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PartitionUsage or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PartitionUsage] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PartitionUsagesResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionUsagesResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_usages_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, collection_rid=collection_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_usages.metadata['url'], + api_version=api_version, + template_url=self.list_usages.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_usages_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -314,10 +328,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -327,8 +339,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/usages"} # type: ignore + list_usages.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/usages"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_partition_region_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_partition_region_operations.py index ad8b0f115f3..a4ac0b0a41f 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_partition_region_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_partition_region_operations.py @@ -7,90 +7,100 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_metrics_request( - subscription_id: str, resource_group_name: str, account_name: str, region: str, database_rid: str, collection_rid: str, + subscription_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "region": _SERIALIZER.url("region", region, 'str'), - "databaseRid": _SERIALIZER.url("database_rid", database_rid, 'str'), - "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "region": _SERIALIZER.url("region", region, "str"), + "databaseRid": _SERIALIZER.url("database_rid", database_rid, "str"), + "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class CollectionPartitionRegionOperations(object): - """CollectionPartitionRegionOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class CollectionPartitionRegionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`collection_partition_region` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -102,69 +112,71 @@ def list_metrics( collection_rid: str, filter: str, **kwargs: Any - ) -> Iterable["_models.PartitionMetricListResult"]: + ) -> Iterable["_models.PartitionMetric"]: """Retrieves the metrics determined by the given filter for the given collection and region, split by partition. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param region: Cosmos DB region, with spaces between words and each word capitalized. + :param region: Cosmos DB region, with spaces between words and each word capitalized. Required. :type region: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartitionMetricListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PartitionMetric or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PartitionMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, region=region, database_rid=database_rid, collection_rid=collection_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - region=region, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -178,10 +190,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -191,8 +201,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_region_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_region_operations.py index 2862ac15706..5d5a7fde6b2 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_region_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_collection_region_operations.py @@ -7,90 +7,100 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_metrics_request( - subscription_id: str, resource_group_name: str, account_name: str, region: str, database_rid: str, collection_rid: str, + subscription_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/metrics") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/metrics", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "region": _SERIALIZER.url("region", region, 'str'), - "databaseRid": _SERIALIZER.url("database_rid", database_rid, 'str'), - "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "region": _SERIALIZER.url("region", region, "str"), + "databaseRid": _SERIALIZER.url("database_rid", database_rid, "str"), + "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class CollectionRegionOperations(object): - """CollectionRegionOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class CollectionRegionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`collection_region` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -102,68 +112,71 @@ def list_metrics( collection_rid: str, filter: str, **kwargs: Any - ) -> Iterable["_models.MetricListResult"]: + ) -> Iterable["_models.Metric"]: """Retrieves the metrics determined by the given filter for the given database account, collection and region. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param region: Cosmos DB region, with spaces between words and each word capitalized. + :param region: Cosmos DB region, with spaces between words and each word capitalized. Required. :type region: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Metric or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.Metric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, region=region, database_rid=database_rid, collection_rid=collection_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - region=region, - database_rid=database_rid, - collection_rid=collection_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -177,10 +190,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -190,8 +201,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_data_transfer_jobs_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_data_transfer_jobs_operations.py index 105971c0052..2721c8a85bf 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_data_transfer_jobs_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_data_transfer_jobs_operations.py @@ -6,649 +6,731 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_create_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - job_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + resource_group_name: str, account_name: str, job_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "jobName": _SERIALIZER.url("job_name", job_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "jobName": _SERIALIZER.url("job_name", job_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) def build_get_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - job_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, job_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "jobName": _SERIALIZER.url("job_name", job_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "jobName": _SERIALIZER.url("job_name", job_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_pause_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - job_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, job_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/pause") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/pause", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "jobName": _SERIALIZER.url("job_name", job_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "jobName": _SERIALIZER.url("job_name", job_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_resume_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - job_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, job_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/resume") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/resume", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "jobName": _SERIALIZER.url("job_name", job_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "jobName": _SERIALIZER.url("job_name", job_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_cancel_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - job_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, job_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/cancel") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/cancel", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "jobName": _SERIALIZER.url("job_name", job_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "jobName": _SERIALIZER.url("job_name", job_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_list_by_database_account_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class DataTransferJobsOperations(object): - """DataTransferJobsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class DataTransferJobsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`data_transfer_jobs` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace + @overload def create( self, resource_group_name: str, account_name: str, job_name: str, - job_create_parameters: "_models.CreateJobRequest", + job_create_parameters: _models.CreateJobRequest, + *, + content_type: str = "application/json", **kwargs: Any - ) -> "_models.DataTransferJobGetResults": + ) -> _models.DataTransferJobGetResults: """Creates a Data Transfer Job. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param job_name: Name of the Data Transfer Job. + :param job_name: Name of the Data Transfer Job. Required. :type job_name: str - :param job_create_parameters: + :param job_create_parameters: Required. :type job_create_parameters: ~azure.mgmt.cosmosdb.models.CreateJobRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DataTransferJobGetResults, or the result of cls(response) + :return: DataTransferJobGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create( + self, + resource_group_name: str, + account_name: str, + job_name: str, + job_create_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataTransferJobGetResults: + """Creates a Data Transfer Job. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param job_name: Name of the Data Transfer Job. Required. + :type job_name: str + :param job_create_parameters: Required. + :type job_create_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataTransferJobGetResults or the result of cls(response) + :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create( + self, + resource_group_name: str, + account_name: str, + job_name: str, + job_create_parameters: Union[_models.CreateJobRequest, IO], + **kwargs: Any + ) -> _models.DataTransferJobGetResults: + """Creates a Data Transfer Job. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param job_name: Name of the Data Transfer Job. Required. + :type job_name: str + :param job_create_parameters: Is either a model type or a IO type. Required. + :type job_create_parameters: ~azure.mgmt.cosmosdb.models.CreateJobRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataTransferJobGetResults or the result of cls(response) + :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataTransferJobGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(job_create_parameters, 'CreateJobRequest') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataTransferJobGetResults] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(job_create_parameters, (IO, bytes)): + _content = job_create_parameters + else: + _json = self._serialize.body(job_create_parameters, "CreateJobRequest") request = build_create_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, job_name=job_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self.create.metadata['url'], + content=_content, + template_url=self.create.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DataTransferJobGetResults', pipeline_response) + deserialized = self._deserialize("DataTransferJobGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}"} # type: ignore - + create.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}"} # type: ignore @distributed_trace def get( - self, - resource_group_name: str, - account_name: str, - job_name: str, - **kwargs: Any - ) -> "_models.DataTransferJobGetResults": + self, resource_group_name: str, account_name: str, job_name: str, **kwargs: Any + ) -> _models.DataTransferJobGetResults: """Get a Data Transfer Job. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param job_name: Name of the Data Transfer Job. + :param job_name: Name of the Data Transfer Job. Required. :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DataTransferJobGetResults, or the result of cls(response) + :return: DataTransferJobGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataTransferJobGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataTransferJobGetResults] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, job_name=job_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DataTransferJobGetResults', pipeline_response) + deserialized = self._deserialize("DataTransferJobGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}"} # type: ignore @distributed_trace def pause( - self, - resource_group_name: str, - account_name: str, - job_name: str, - **kwargs: Any - ) -> "_models.DataTransferJobGetResults": + self, resource_group_name: str, account_name: str, job_name: str, **kwargs: Any + ) -> _models.DataTransferJobGetResults: """Pause a Data Transfer Job. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param job_name: Name of the Data Transfer Job. + :param job_name: Name of the Data Transfer Job. Required. :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DataTransferJobGetResults, or the result of cls(response) + :return: DataTransferJobGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataTransferJobGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataTransferJobGetResults] - request = build_pause_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, job_name=job_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.pause.metadata['url'], + template_url=self.pause.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DataTransferJobGetResults', pipeline_response) + deserialized = self._deserialize("DataTransferJobGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - pause.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/pause"} # type: ignore - + pause.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/pause"} # type: ignore @distributed_trace def resume( - self, - resource_group_name: str, - account_name: str, - job_name: str, - **kwargs: Any - ) -> "_models.DataTransferJobGetResults": + self, resource_group_name: str, account_name: str, job_name: str, **kwargs: Any + ) -> _models.DataTransferJobGetResults: """Resumes a Data Transfer Job. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param job_name: Name of the Data Transfer Job. + :param job_name: Name of the Data Transfer Job. Required. :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DataTransferJobGetResults, or the result of cls(response) + :return: DataTransferJobGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataTransferJobGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataTransferJobGetResults] - request = build_resume_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, job_name=job_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.resume.metadata['url'], + template_url=self.resume.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DataTransferJobGetResults', pipeline_response) + deserialized = self._deserialize("DataTransferJobGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/resume"} # type: ignore - + resume.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/resume"} # type: ignore @distributed_trace def cancel( - self, - resource_group_name: str, - account_name: str, - job_name: str, - **kwargs: Any - ) -> "_models.DataTransferJobGetResults": + self, resource_group_name: str, account_name: str, job_name: str, **kwargs: Any + ) -> _models.DataTransferJobGetResults: """Cancels a Data Transfer Job. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param job_name: Name of the Data Transfer Job. + :param job_name: Name of the Data Transfer Job. Required. :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DataTransferJobGetResults, or the result of cls(response) + :return: DataTransferJobGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DataTransferJobGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataTransferJobGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataTransferJobGetResults] - request = build_cancel_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, job_name=job_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.cancel.metadata['url'], + template_url=self.cancel.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DataTransferJobGetResults', pipeline_response) + deserialized = self._deserialize("DataTransferJobGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - cancel.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/cancel"} # type: ignore - + cancel.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/cancel"} # type: ignore @distributed_trace def list_by_database_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.DataTransferJobFeedResults"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.DataTransferJobGetResults"]: """Get a list of Data Transfer jobs. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either DataTransferJobFeedResults or the result of + :return: An iterator like instance of either DataTransferJobGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.DataTransferJobFeedResults] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.DataTransferJobGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DataTransferJobFeedResults] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DataTransferJobFeedResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_database_account.metadata['url'], + template_url=self.list_by_database_account.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -662,10 +744,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -675,8 +755,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_database_account.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs"} # type: ignore + list_by_database_account.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_account_region_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_account_region_operations.py index 7291d463b69..86e85f39ad9 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_account_region_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_account_region_operations.py @@ -7,148 +7,152 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_metrics_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - region: str, - *, - filter: str, - **kwargs: Any + resource_group_name: str, account_name: str, region: str, subscription_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/metrics") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/metrics", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "region": _SERIALIZER.url("region", region, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "region": _SERIALIZER.url("region", region, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class DatabaseAccountRegionOperations(object): - """DatabaseAccountRegionOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class DatabaseAccountRegionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`database_account_region` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( - self, - resource_group_name: str, - account_name: str, - region: str, - filter: str, - **kwargs: Any - ) -> Iterable["_models.MetricListResult"]: + self, resource_group_name: str, account_name: str, region: str, filter: str, **kwargs: Any + ) -> Iterable["_models.Metric"]: """Retrieves the metrics determined by the given filter for the given database account and region. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param region: Cosmos DB region, with spaces between words and each word capitalized. + :param region: Cosmos DB region, with spaces between words and each word capitalized. Required. :type region: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Metric or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.Metric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, region=region, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - region=region, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -162,10 +166,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -175,8 +177,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_accounts_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_accounts_operations.py index 32ec1177aa5..52d82445cc1 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_accounts_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_accounts_operations.py @@ -6,852 +6,879 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_get_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - accept = "application/json" +def build_get_request(resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_update_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_update_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_create_or_update_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) - - -def build_failover_priority_change_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_failover_priority_change_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_list_request( - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts") path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_by_resource_group_request( - resource_group_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts", + ) # pylint: disable=line-too-long path_format_arguments = { - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_list_keys_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_list_connection_strings_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_offline_region_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_offline_region_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_online_region_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_online_region_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_get_read_only_keys_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_list_read_only_keys_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_regenerate_key_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_regenerate_key_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_check_name_exists_request( - account_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + +def build_check_name_exists_request(account_name: str, **kwargs: Any) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL _url = kwargs.pop("template_url", "/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}") path_format_arguments = { - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="HEAD", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) def build_list_metrics_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - filter: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_list_usages_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - filter: Optional[str] = None, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_list_metric_definitions_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class DatabaseAccountsOperations(object): # pylint: disable=too-many-public-methods - """DatabaseAccountsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class DatabaseAccountsOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`database_accounts` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def get( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.DatabaseAccountGetResults": + def get(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _models.DatabaseAccountGetResults: """Retrieves the properties of an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DatabaseAccountGetResults, or the result of cls(response) + :return: DatabaseAccountGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountGetResults] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountGetResults', pipeline_response) + deserialized = self._deserialize("DatabaseAccountGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore def _update_initial( self, resource_group_name: str, account_name: str, - update_parameters: "_models.DatabaseAccountUpdateParameters", + update_parameters: Union[_models.DatabaseAccountUpdateParameters, IO], **kwargs: Any - ) -> "_models.DatabaseAccountGetResults": - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountGetResults"] + ) -> _models.DatabaseAccountGetResults: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_parameters, 'DatabaseAccountUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountGetResults] - request = build_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_parameters, (IO, bytes)): + _content = update_parameters + else: + _json = self._serialize.body(update_parameters, "DatabaseAccountUpdateParameters") + + request = build_update_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_initial.metadata['url'], + content=_content, + template_url=self._update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountGetResults', pipeline_response) + deserialized = self._deserialize("DatabaseAccountGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore + _update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + account_name: str, + update_parameters: _models.DatabaseAccountUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DatabaseAccountGetResults]: + """Updates the properties of an existing Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param update_parameters: The parameters to provide for the current database account. Required. + :type update_parameters: ~azure.mgmt.cosmosdb.models.DatabaseAccountUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DatabaseAccountGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + account_name: str, + update_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DatabaseAccountGetResults]: + """Updates the properties of an existing Azure Cosmos DB database account. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param update_parameters: The parameters to provide for the current database account. Required. + :type update_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DatabaseAccountGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_update( self, resource_group_name: str, account_name: str, - update_parameters: "_models.DatabaseAccountUpdateParameters", + update_parameters: Union[_models.DatabaseAccountUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.DatabaseAccountGetResults"]: + ) -> LROPoller[_models.DatabaseAccountGetResults]: """Updates the properties of an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param update_parameters: The parameters to provide for the current database account. - :type update_parameters: ~azure.mgmt.cosmosdb.models.DatabaseAccountUpdateParameters + :param update_parameters: The parameters to provide for the current database account. Is either + a model type or a IO type. Required. + :type update_parameters: ~azure.mgmt.cosmosdb.models.DatabaseAccountUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -863,120 +890,143 @@ def begin_update( :return: An instance of LROPoller that returns either DatabaseAccountGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._update_initial( + raw_result = self._update_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, update_parameters=update_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('DatabaseAccountGetResults', pipeline_response) + deserialized = self._deserialize("DatabaseAccountGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore + begin_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore def _create_or_update_initial( self, resource_group_name: str, account_name: str, - create_update_parameters: "_models.DatabaseAccountCreateUpdateParameters", + create_update_parameters: Union[_models.DatabaseAccountCreateUpdateParameters, IO], **kwargs: Any - ) -> "_models.DatabaseAccountGetResults": - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountGetResults"] + ) -> _models.DatabaseAccountGetResults: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountGetResults] - request = build_create_or_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_parameters, (IO, bytes)): + _content = create_update_parameters + else: + _json = self._serialize.body(create_update_parameters, "DatabaseAccountCreateUpdateParameters") + + request = build_create_or_update_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_or_update_initial.metadata['url'], + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountGetResults', pipeline_response) + deserialized = self._deserialize("DatabaseAccountGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore - + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore - @distributed_trace + @overload def begin_create_or_update( self, resource_group_name: str, account_name: str, - create_update_parameters: "_models.DatabaseAccountCreateUpdateParameters", + create_update_parameters: _models.DatabaseAccountCreateUpdateParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller["_models.DatabaseAccountGetResults"]: + ) -> LROPoller[_models.DatabaseAccountGetResults]: """Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param create_update_parameters: The parameters to provide for the current database account. + Required. :type create_update_parameters: ~azure.mgmt.cosmosdb.models.DatabaseAccountCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -988,81 +1038,162 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either DatabaseAccountGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + create_update_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DatabaseAccountGetResults]: + """Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when + performing updates on an account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_parameters: The parameters to provide for the current database account. + Required. + :type create_update_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DatabaseAccountGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + create_update_parameters: Union[_models.DatabaseAccountCreateUpdateParameters, IO], + **kwargs: Any + ) -> LROPoller[_models.DatabaseAccountGetResults]: + """Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when + performing updates on an account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_parameters: The parameters to provide for the current database account. Is + either a model type or a IO type. Required. + :type create_update_parameters: + ~azure.mgmt.cosmosdb.models.DatabaseAccountCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DatabaseAccountGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._create_or_update_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, create_update_parameters=create_update_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('DatabaseAccountGetResults', pipeline_response) + deserialized = self._deserialize("DatabaseAccountGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1072,21 +1203,16 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> LROPoller[None]: + def begin_delete(self, resource_group_name: str, account_name: str, **kwargs: Any) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1098,80 +1224,98 @@ def begin_delete( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}"} # type: ignore def _failover_priority_change_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, account_name: str, - failover_parameters: "_models.FailoverPolicies", + failover_parameters: Union[_models.FailoverPolicies, IO], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(failover_parameters, 'FailoverPolicies') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_failover_priority_change_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(failover_parameters, (IO, bytes)): + _content = failover_parameters + else: + _json = self._serialize.body(failover_parameters, "FailoverPolicies") + + request = build_failover_priority_change_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._failover_priority_change_initial.metadata['url'], + content=_content, + template_url=self._failover_priority_change_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1181,15 +1325,90 @@ def _failover_priority_change_initial( # pylint: disable=inconsistent-return-st if cls: return cls(pipeline_response, None, {}) - _failover_priority_change_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange"} # type: ignore + _failover_priority_change_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange"} # type: ignore + + @overload + def begin_failover_priority_change( + self, + resource_group_name: str, + account_name: str, + failover_parameters: _models.FailoverPolicies, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Changes the failover priority for the Azure Cosmos DB database account. A failover priority of + 0 indicates a write region. The maximum value for a failover priority = (total number of + regions - 1). Failover priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param failover_parameters: The new failover policies for the database account. Required. + :type failover_parameters: ~azure.mgmt.cosmosdb.models.FailoverPolicies + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_failover_priority_change( + self, + resource_group_name: str, + account_name: str, + failover_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Changes the failover priority for the Azure Cosmos DB database account. A failover priority of + 0 indicates a write region. The maximum value for a failover priority = (total number of + regions - 1). Failover priority values must be unique for each of the regions in which the + database account exists. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param failover_parameters: The new failover policies for the database account. Required. + :type failover_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def begin_failover_priority_change( # pylint: disable=inconsistent-return-statements + def begin_failover_priority_change( self, resource_group_name: str, account_name: str, - failover_parameters: "_models.FailoverPolicies", + failover_parameters: Union[_models.FailoverPolicies, IO], **kwargs: Any ) -> LROPoller[None]: """Changes the failover priority for the Azure Cosmos DB database account. A failover priority of @@ -1198,11 +1417,16 @@ def begin_failover_priority_change( # pylint: disable=inconsistent-return-state database account exists. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param failover_parameters: The new failover policies for the database account. - :type failover_parameters: ~azure.mgmt.cosmosdb.models.FailoverPolicies + :param failover_parameters: The new failover policies for the database account. Is either a + model type or a IO type. Required. + :type failover_parameters: ~azure.mgmt.cosmosdb.models.FailoverPolicies or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1213,88 +1437,97 @@ def begin_failover_priority_change( # pylint: disable=inconsistent-return-state Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._failover_priority_change_initial( + raw_result = self._failover_priority_change_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, failover_parameters=failover_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_failover_priority_change.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange"} # type: ignore + begin_failover_priority_change.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange"} # type: ignore @distributed_trace - def list( - self, - **kwargs: Any - ) -> Iterable["_models.DatabaseAccountsListResult"]: + def list(self, **kwargs: Any) -> Iterable["_models.DatabaseAccountGetResults"]: """Lists all the Azure Cosmos DB database accounts available under the subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either DatabaseAccountsListResult or the result of + :return: An iterator like instance of either DatabaseAccountGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.DatabaseAccountsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1308,10 +1541,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1321,57 +1552,61 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts"} # type: ignore @distributed_trace def list_by_resource_group( - self, - resource_group_name: str, - **kwargs: Any - ) -> Iterable["_models.DatabaseAccountsListResult"]: + self, resource_group_name: str, **kwargs: Any + ) -> Iterable["_models.DatabaseAccountGetResults"]: """Lists all the Azure Cosmos DB database accounts available under the given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either DatabaseAccountsListResult or the result of + :return: An iterator like instance of either DatabaseAccountGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.DatabaseAccountsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata['url'], + template_url=self.list_by_resource_group.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1385,10 +1620,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1398,191 +1631,216 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts"} # type: ignore + list_by_resource_group.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts"} # type: ignore @distributed_trace def list_keys( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.DatabaseAccountListKeysResult": + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.DatabaseAccountListKeysResult: """Lists the access keys for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DatabaseAccountListKeysResult, or the result of cls(response) + :return: DatabaseAccountListKeysResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DatabaseAccountListKeysResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountListKeysResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountListKeysResult] - request = build_list_keys_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_keys.metadata['url'], + template_url=self.list_keys.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountListKeysResult', pipeline_response) + deserialized = self._deserialize("DatabaseAccountListKeysResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys"} # type: ignore - + list_keys.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys"} # type: ignore @distributed_trace def list_connection_strings( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.DatabaseAccountListConnectionStringsResult": + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.DatabaseAccountListConnectionStringsResult: """Lists the connection strings for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DatabaseAccountListConnectionStringsResult, or the result of cls(response) + :return: DatabaseAccountListConnectionStringsResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DatabaseAccountListConnectionStringsResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountListConnectionStringsResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountListConnectionStringsResult] - request = build_list_connection_strings_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_connection_strings.metadata['url'], + template_url=self.list_connection_strings.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountListConnectionStringsResult', pipeline_response) + deserialized = self._deserialize("DatabaseAccountListConnectionStringsResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings"} # type: ignore - + list_connection_strings.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings"} # type: ignore def _offline_region_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, account_name: str, - region_parameter_for_offline: "_models.RegionForOnlineOffline", + region_parameter_for_offline: Union[_models.RegionForOnlineOffline, IO], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(region_parameter_for_offline, 'RegionForOnlineOffline') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_offline_region_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(region_parameter_for_offline, (IO, bytes)): + _content = region_parameter_for_offline + else: + _json = self._serialize.body(region_parameter_for_offline, "RegionForOnlineOffline") + + request = build_offline_region_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._offline_region_initial.metadata['url'], + content=_content, + template_url=self._offline_region_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _offline_region_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion"} # type: ignore - + _offline_region_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion"} # type: ignore - @distributed_trace - def begin_offline_region( # pylint: disable=inconsistent-return-statements + @overload + def begin_offline_region( self, resource_group_name: str, account_name: str, - region_parameter_for_offline: "_models.RegionForOnlineOffline", + region_parameter_for_offline: _models.RegionForOnlineOffline, + *, + content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: """Offline the specified region for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param region_parameter_for_offline: Cosmos DB region to offline for the database account. + Required. :type region_parameter_for_offline: ~azure.mgmt.cosmosdb.models.RegionForOnlineOffline + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1593,111 +1851,206 @@ def begin_offline_region( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + def begin_offline_region( + self, + resource_group_name: str, + account_name: str, + region_parameter_for_offline: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Offline the specified region for the specified Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param region_parameter_for_offline: Cosmos DB region to offline for the database account. + Required. + :type region_parameter_for_offline: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_offline_region( + self, + resource_group_name: str, + account_name: str, + region_parameter_for_offline: Union[_models.RegionForOnlineOffline, IO], + **kwargs: Any + ) -> LROPoller[None]: + """Offline the specified region for the specified Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param region_parameter_for_offline: Cosmos DB region to offline for the database account. Is + either a model type or a IO type. Required. + :type region_parameter_for_offline: ~azure.mgmt.cosmosdb.models.RegionForOnlineOffline or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._offline_region_initial( + raw_result = self._offline_region_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, region_parameter_for_offline=region_parameter_for_offline, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_offline_region.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion"} # type: ignore + begin_offline_region.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion"} # type: ignore def _online_region_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, account_name: str, - region_parameter_for_online: "_models.RegionForOnlineOffline", + region_parameter_for_online: Union[_models.RegionForOnlineOffline, IO], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(region_parameter_for_online, 'RegionForOnlineOffline') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_online_region_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(region_parameter_for_online, (IO, bytes)): + _content = region_parameter_for_online + else: + _json = self._serialize.body(region_parameter_for_online, "RegionForOnlineOffline") + + request = build_online_region_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._online_region_initial.metadata['url'], + content=_content, + template_url=self._online_region_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _online_region_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion"} # type: ignore - + _online_region_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion"} # type: ignore - @distributed_trace - def begin_online_region( # pylint: disable=inconsistent-return-statements + @overload + def begin_online_region( self, resource_group_name: str, account_name: str, - region_parameter_for_online: "_models.RegionForOnlineOffline", + region_parameter_for_online: _models.RegionForOnlineOffline, + *, + content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: """Online the specified region for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param region_parameter_for_online: Cosmos DB region to online for the database account. + Required. :type region_parameter_for_online: ~azure.mgmt.cosmosdb.models.RegionForOnlineOffline + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1708,199 +2061,293 @@ def begin_online_region( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + def begin_online_region( + self, + resource_group_name: str, + account_name: str, + region_parameter_for_online: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Online the specified region for the specified Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param region_parameter_for_online: Cosmos DB region to online for the database account. + Required. + :type region_parameter_for_online: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_online_region( + self, + resource_group_name: str, + account_name: str, + region_parameter_for_online: Union[_models.RegionForOnlineOffline, IO], + **kwargs: Any + ) -> LROPoller[None]: + """Online the specified region for the specified Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param region_parameter_for_online: Cosmos DB region to online for the database account. Is + either a model type or a IO type. Required. + :type region_parameter_for_online: ~azure.mgmt.cosmosdb.models.RegionForOnlineOffline or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._online_region_initial( + raw_result = self._online_region_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, region_parameter_for_online=region_parameter_for_online, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_online_region.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion"} # type: ignore + begin_online_region.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion"} # type: ignore @distributed_trace def get_read_only_keys( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.DatabaseAccountListReadOnlyKeysResult": + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.DatabaseAccountListReadOnlyKeysResult: """Lists the read-only access keys for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DatabaseAccountListReadOnlyKeysResult, or the result of cls(response) + :return: DatabaseAccountListReadOnlyKeysResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DatabaseAccountListReadOnlyKeysResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountListReadOnlyKeysResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountListReadOnlyKeysResult] - request = build_get_read_only_keys_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_read_only_keys.metadata['url'], + template_url=self.get_read_only_keys.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountListReadOnlyKeysResult', pipeline_response) + deserialized = self._deserialize("DatabaseAccountListReadOnlyKeysResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_read_only_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys"} # type: ignore - + get_read_only_keys.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys"} # type: ignore @distributed_trace def list_read_only_keys( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.DatabaseAccountListReadOnlyKeysResult": + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.DatabaseAccountListReadOnlyKeysResult: """Lists the read-only access keys for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DatabaseAccountListReadOnlyKeysResult, or the result of cls(response) + :return: DatabaseAccountListReadOnlyKeysResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.DatabaseAccountListReadOnlyKeysResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseAccountListReadOnlyKeysResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DatabaseAccountListReadOnlyKeysResult] - request = build_list_read_only_keys_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_read_only_keys.metadata['url'], + template_url=self.list_read_only_keys.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DatabaseAccountListReadOnlyKeysResult', pipeline_response) + deserialized = self._deserialize("DatabaseAccountListReadOnlyKeysResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_read_only_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys"} # type: ignore - + list_read_only_keys.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys"} # type: ignore def _regenerate_key_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, account_name: str, - key_to_regenerate: "_models.DatabaseAccountRegenerateKeyParameters", + key_to_regenerate: Union[_models.DatabaseAccountRegenerateKeyParameters, IO], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_regenerate_key_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(key_to_regenerate, (IO, bytes)): + _content = key_to_regenerate + else: + _json = self._serialize.body(key_to_regenerate, "DatabaseAccountRegenerateKeyParameters") + + request = build_regenerate_key_request( resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._regenerate_key_initial.metadata['url'], + content=_content, + template_url=self._regenerate_key_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1910,25 +2357,100 @@ def _regenerate_key_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _regenerate_key_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey"} # type: ignore + _regenerate_key_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey"} # type: ignore + @overload + def begin_regenerate_key( + self, + resource_group_name: str, + account_name: str, + key_to_regenerate: _models.DatabaseAccountRegenerateKeyParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Regenerates an access key for the specified Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param key_to_regenerate: The name of the key to regenerate. Required. + :type key_to_regenerate: ~azure.mgmt.cosmosdb.models.DatabaseAccountRegenerateKeyParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_regenerate_key( + self, + resource_group_name: str, + account_name: str, + key_to_regenerate: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Regenerates an access key for the specified Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param key_to_regenerate: The name of the key to regenerate. Required. + :type key_to_regenerate: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def begin_regenerate_key( # pylint: disable=inconsistent-return-statements + def begin_regenerate_key( self, resource_group_name: str, account_name: str, - key_to_regenerate: "_models.DatabaseAccountRegenerateKeyParameters", + key_to_regenerate: Union[_models.DatabaseAccountRegenerateKeyParameters, IO], **kwargs: Any ) -> LROPoller[None]: """Regenerates an access key for the specified Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param key_to_regenerate: The name of the key to regenerate. - :type key_to_regenerate: ~azure.mgmt.cosmosdb.models.DatabaseAccountRegenerateKeyParameters + :param key_to_regenerate: The name of the key to regenerate. Is either a model type or a IO + type. Required. + :type key_to_regenerate: ~azure.mgmt.cosmosdb.models.DatabaseAccountRegenerateKeyParameters or + IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1939,87 +2461,93 @@ def begin_regenerate_key( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._regenerate_key_initial( + raw_result = self._regenerate_key_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, key_to_regenerate=key_to_regenerate, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_regenerate_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey"} # type: ignore + begin_regenerate_key.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey"} # type: ignore @distributed_trace - def check_name_exists( - self, - account_name: str, - **kwargs: Any - ) -> bool: + def check_name_exists(self, account_name: str, **kwargs: Any) -> bool: """Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: bool, or the result of cls(response) + :return: bool or the result of cls(response) :rtype: bool - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_check_name_exists_request( account_name=account_name, api_version=api_version, - template_url=self.check_name_exists.metadata['url'], + template_url=self.check_name_exists.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2030,65 +2558,66 @@ def check_name_exists( return cls(pipeline_response, None, {}) return 200 <= response.status_code <= 299 - check_name_exists.metadata = {'url': "/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}"} # type: ignore - + check_name_exists.metadata = {"url": "/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}"} # type: ignore @distributed_trace def list_metrics( - self, - resource_group_name: str, - account_name: str, - filter: str, - **kwargs: Any - ) -> Iterable["_models.MetricListResult"]: + self, resource_group_name: str, account_name: str, filter: str, **kwargs: Any + ) -> Iterable["_models.Metric"]: """Retrieves the metrics determined by the given filter for the given database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Metric or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.Metric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -2102,10 +2631,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2115,68 +2642,68 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics"} # type: ignore @distributed_trace def list_usages( - self, - resource_group_name: str, - account_name: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_models.UsagesResult"]: + self, resource_group_name: str, account_name: str, filter: Optional[str] = None, **kwargs: Any + ) -> Iterable["_models.Usage"]: """Retrieves the usages (most recent data) for the given database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param filter: An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either UsagesResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.UsagesResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Usage or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.UsagesResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_usages_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_usages.metadata['url'], + api_version=api_version, + template_url=self.list_usages.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_usages_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -2190,10 +2717,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2203,62 +2728,63 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages"} # type: ignore + list_usages.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages"} # type: ignore @distributed_trace def list_metric_definitions( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.MetricDefinitionsListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.MetricDefinition"]: """Retrieves metric definitions for the given database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricDefinitionsListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MetricDefinitionsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either MetricDefinition or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MetricDefinition] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricDefinitionsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricDefinitionsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metric_definitions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_metric_definitions.metadata['url'], + template_url=self.list_metric_definitions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metric_definitions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -2272,10 +2798,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2285,8 +2809,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions"} # type: ignore + list_metric_definitions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_operations.py index 58111a46e3f..c7e45861ce4 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_operations.py @@ -7,229 +7,233 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_metrics_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_rid: str, - *, - filter: str, - **kwargs: Any + resource_group_name: str, account_name: str, database_rid: str, subscription_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metrics") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metrics", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseRid": _SERIALIZER.url("database_rid", database_rid, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseRid": _SERIALIZER.url("database_rid", database_rid, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_list_usages_request( - subscription_id: str, resource_group_name: str, account_name: str, database_rid: str, + subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/usages") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/usages", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseRid": _SERIALIZER.url("database_rid", database_rid, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseRid": _SERIALIZER.url("database_rid", database_rid, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_list_metric_definitions_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_rid: str, - **kwargs: Any + resource_group_name: str, account_name: str, database_rid: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metricDefinitions") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metricDefinitions", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseRid": _SERIALIZER.url("database_rid", database_rid, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseRid": _SERIALIZER.url("database_rid", database_rid, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class DatabaseOperations(object): - """DatabaseOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class DatabaseOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`database` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( - self, - resource_group_name: str, - account_name: str, - database_rid: str, - filter: str, - **kwargs: Any - ) -> Iterable["_models.MetricListResult"]: + self, resource_group_name: str, account_name: str, database_rid: str, filter: str, **kwargs: Any + ) -> Iterable["_models.Metric"]: """Retrieves the metrics determined by the given filter for the given database account and database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Metric or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.Metric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -243,10 +247,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -256,11 +258,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metrics"} # type: ignore @distributed_trace def list_usages( @@ -270,59 +270,64 @@ def list_usages( database_rid: str, filter: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.UsagesResult"]: + ) -> Iterable["_models.Usage"]: """Retrieves the usages (most recent data) for the given database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str :param filter: An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either UsagesResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.UsagesResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Usage or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.UsagesResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_usages_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_usages.metadata['url'], + api_version=api_version, + template_url=self.list_usages.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_usages_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -336,10 +341,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -349,67 +352,66 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/usages"} # type: ignore + list_usages.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/usages"} # type: ignore @distributed_trace def list_metric_definitions( - self, - resource_group_name: str, - account_name: str, - database_rid: str, - **kwargs: Any - ) -> Iterable["_models.MetricDefinitionsListResult"]: + self, resource_group_name: str, account_name: str, database_rid: str, **kwargs: Any + ) -> Iterable["_models.MetricDefinition"]: """Retrieves metric definitions for the given database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MetricDefinitionsListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MetricDefinitionsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either MetricDefinition or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MetricDefinition] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MetricDefinitionsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricDefinitionsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metric_definitions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_metric_definitions.metadata['url'], + template_url=self.list_metric_definitions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metric_definitions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -423,10 +425,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -436,8 +436,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metricDefinitions"} # type: ignore + list_metric_definitions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metricDefinitions"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_graph_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_graph_resources_operations.py index 97dcafd9c03..20241795f0e 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_graph_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_graph_resources_operations.py @@ -6,252 +6,251 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_graphs_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_graph_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - graph_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, graph_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "graphName": _SERIALIZER.url("graph_name", graph_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "graphName": _SERIALIZER.url("graph_name", graph_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_update_graph_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - graph_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_update_graph_request( + resource_group_name: str, account_name: str, graph_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "graphName": _SERIALIZER.url("graph_name", graph_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "graphName": _SERIALIZER.url("graph_name", graph_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_graph_resource_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - graph_name: str, - **kwargs: Any + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_graph_resource_request( + resource_group_name: str, account_name: str, graph_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "graphName": _SERIALIZER.url("graph_name", graph_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "graphName": _SERIALIZER.url("graph_name", graph_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) - -class GraphResourcesOperations(object): - """GraphResourcesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +class GraphResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`graph_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_graphs( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.GraphResourcesListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.GraphResourceGetResults"]: """Lists the graphs under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either GraphResourcesListResult or the result of + :return: An iterator like instance of either GraphResourceGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.GraphResourcesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.GraphResourceGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GraphResourcesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphResourcesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_graphs_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_graphs.metadata['url'], + template_url=self.list_graphs.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_graphs_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -265,10 +264,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -278,112 +275,126 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_graphs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs"} # type: ignore + list_graphs.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs"} # type: ignore @distributed_trace def get_graph( - self, - resource_group_name: str, - account_name: str, - graph_name: str, - **kwargs: Any - ) -> "_models.GraphResourceGetResults": + self, resource_group_name: str, account_name: str, graph_name: str, **kwargs: Any + ) -> _models.GraphResourceGetResults: """Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param graph_name: Cosmos DB graph resource name. + :param graph_name: Cosmos DB graph resource name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: GraphResourceGetResults, or the result of cls(response) + :return: GraphResourceGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.GraphResourceGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphResourceGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GraphResourceGetResults] - request = build_get_graph_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_graph.metadata['url'], + template_url=self.get_graph.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('GraphResourceGetResults', pipeline_response) + deserialized = self._deserialize("GraphResourceGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_graph.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore - + get_graph.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore def _create_update_graph_initial( self, resource_group_name: str, account_name: str, graph_name: str, - create_update_graph_parameters: "_models.GraphResourceCreateUpdateParameters", + create_update_graph_parameters: Union[_models.GraphResourceCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.GraphResourceGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GraphResourceGetResults"]] + ) -> Optional[_models.GraphResourceGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_graph_parameters, 'GraphResourceCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.GraphResourceGetResults]] - request = build_create_update_graph_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_graph_parameters, (IO, bytes)): + _content = create_update_graph_parameters + else: + _json = self._serialize.body(create_update_graph_parameters, "GraphResourceCreateUpdateParameters") + + request = build_create_update_graph_request( resource_group_name=resource_group_name, account_name=account_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_graph_initial.metadata['url'], + content=_content, + template_url=self._create_update_graph_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -392,36 +403,42 @@ def _create_update_graph_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('GraphResourceGetResults', pipeline_response) + deserialized = self._deserialize("GraphResourceGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_graph_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore - + _create_update_graph_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore - @distributed_trace + @overload def begin_create_update_graph( self, resource_group_name: str, account_name: str, graph_name: str, - create_update_graph_parameters: "_models.GraphResourceCreateUpdateParameters", + create_update_graph_parameters: _models.GraphResourceCreateUpdateParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller["_models.GraphResourceGetResults"]: + ) -> LROPoller[_models.GraphResourceGetResults]: """Create or update an Azure Cosmos DB Graph. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param graph_name: Cosmos DB graph resource name. + :param graph_name: Cosmos DB graph resource name. Required. :type graph_name: str :param create_update_graph_parameters: The parameters to provide for the current graph. + Required. :type create_update_graph_parameters: ~azure.mgmt.cosmosdb.models.GraphResourceCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -433,84 +450,168 @@ def begin_create_update_graph( :return: An instance of LROPoller that returns either GraphResourceGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.GraphResourceGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphResourceGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + + @overload + def begin_create_update_graph( + self, + resource_group_name: str, + account_name: str, + graph_name: str, + create_update_graph_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.GraphResourceGetResults]: + """Create or update an Azure Cosmos DB Graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param graph_name: Cosmos DB graph resource name. Required. + :type graph_name: str + :param create_update_graph_parameters: The parameters to provide for the current graph. + Required. + :type create_update_graph_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either GraphResourceGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.GraphResourceGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_update_graph( + self, + resource_group_name: str, + account_name: str, + graph_name: str, + create_update_graph_parameters: Union[_models.GraphResourceCreateUpdateParameters, IO], + **kwargs: Any + ) -> LROPoller[_models.GraphResourceGetResults]: + """Create or update an Azure Cosmos DB Graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param graph_name: Cosmos DB graph resource name. Required. + :type graph_name: str + :param create_update_graph_parameters: The parameters to provide for the current graph. Is + either a model type or a IO type. Required. + :type create_update_graph_parameters: + ~azure.mgmt.cosmosdb.models.GraphResourceCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either GraphResourceGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.GraphResourceGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.GraphResourceGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_graph_initial( + raw_result = self._create_update_graph_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, graph_name=graph_name, create_update_graph_parameters=create_update_graph_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('GraphResourceGetResults', pipeline_response) + deserialized = self._deserialize("GraphResourceGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_graph.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore + begin_create_update_graph.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore def _delete_graph_resource_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - graph_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, graph_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_graph_resource_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_graph_resource_request( resource_group_name=resource_group_name, account_name=account_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_graph_resource_initial.metadata['url'], + template_url=self._delete_graph_resource_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -520,24 +621,20 @@ def _delete_graph_resource_initial( # pylint: disable=inconsistent-return-state if cls: return cls(pipeline_response, None, {}) - _delete_graph_resource_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore - + _delete_graph_resource_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore @distributed_trace - def begin_delete_graph_resource( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - graph_name: str, - **kwargs: Any + def begin_delete_graph_resource( + self, resource_group_name: str, account_name: str, graph_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB Graph Resource. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param graph_name: Cosmos DB graph resource name. + :param graph_name: Cosmos DB graph resource name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -549,42 +646,46 @@ def begin_delete_graph_resource( # pylint: disable=inconsistent-return-statemen Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_graph_resource_initial( + raw_result = self._delete_graph_resource_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, graph_name=graph_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_graph_resource.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore + begin_delete_graph_resource.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_gremlin_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_gremlin_resources_operations.py index ee7a57ea451..5b73d317cd4 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_gremlin_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_gremlin_resources_operations.py @@ -6,788 +6,773 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_gremlin_databases_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_gremlin_database_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_gremlin_database_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_create_update_gremlin_database_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_gremlin_database_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any +def build_delete_gremlin_database_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_get_gremlin_database_throughput_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_gremlin_database_throughput_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_update_gremlin_database_throughput_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_gremlin_database_to_autoscale_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any +def build_migrate_gremlin_database_to_autoscale_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_gremlin_database_to_manual_throughput_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any +def build_migrate_gremlin_database_to_manual_throughput_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_list_gremlin_graphs_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_gremlin_graph_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, graph_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "graphName": _SERIALIZER.url("graph_name", graph_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "graphName": _SERIALIZER.url("graph_name", graph_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_gremlin_graph_request_initial( - subscription_id: str, +def build_create_update_gremlin_graph_request( resource_group_name: str, account_name: str, database_name: str, graph_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "graphName": _SERIALIZER.url("graph_name", graph_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "graphName": _SERIALIZER.url("graph_name", graph_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_gremlin_graph_request_initial( - subscription_id: str, +def build_delete_gremlin_graph_request( resource_group_name: str, account_name: str, database_name: str, graph_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "graphName": _SERIALIZER.url("graph_name", graph_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "graphName": _SERIALIZER.url("graph_name", graph_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_get_gremlin_graph_throughput_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, graph_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "graphName": _SERIALIZER.url("graph_name", graph_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "graphName": _SERIALIZER.url("graph_name", graph_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_gremlin_graph_throughput_request_initial( - subscription_id: str, +def build_update_gremlin_graph_throughput_request( resource_group_name: str, account_name: str, database_name: str, graph_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "graphName": _SERIALIZER.url("graph_name", graph_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "graphName": _SERIALIZER.url("graph_name", graph_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_gremlin_graph_to_autoscale_request_initial( - subscription_id: str, +def build_migrate_gremlin_graph_to_autoscale_request( resource_group_name: str, account_name: str, database_name: str, graph_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "graphName": _SERIALIZER.url("graph_name", graph_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "graphName": _SERIALIZER.url("graph_name", graph_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_gremlin_graph_to_manual_throughput_request_initial( - subscription_id: str, +def build_migrate_gremlin_graph_to_manual_throughput_request( resource_group_name: str, account_name: str, database_name: str, graph_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "graphName": _SERIALIZER.url("graph_name", graph_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "graphName": _SERIALIZER.url("graph_name", graph_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_retrieve_continuous_backup_information_request_initial( - subscription_id: str, +def build_retrieve_continuous_backup_information_request( resource_group_name: str, account_name: str, database_name: str, graph_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/retrieveContinuousBackupInformation") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/retrieveContinuousBackupInformation", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "graphName": _SERIALIZER.url("graph_name", graph_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "graphName": _SERIALIZER.url("graph_name", graph_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - -class GremlinResourcesOperations(object): # pylint: disable=too-many-public-methods - """GremlinResourcesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class GremlinResourcesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`gremlin_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_gremlin_databases( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.GremlinDatabaseListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.GremlinDatabaseGetResults"]: """Lists the Gremlin databases under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either GremlinDatabaseListResult or the result of + :return: An iterator like instance of either GremlinDatabaseGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.GremlinDatabaseListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GremlinDatabaseListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GremlinDatabaseListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_gremlin_databases_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_gremlin_databases.metadata['url'], + template_url=self.list_gremlin_databases.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_gremlin_databases_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -801,10 +786,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -814,112 +797,128 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_gremlin_databases.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases"} # type: ignore + list_gremlin_databases.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases"} # type: ignore @distributed_trace def get_gremlin_database( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> "_models.GremlinDatabaseGetResults": + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> _models.GremlinDatabaseGetResults: """Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: GremlinDatabaseGetResults, or the result of cls(response) + :return: GremlinDatabaseGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.GremlinDatabaseGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GremlinDatabaseGetResults] - request = build_get_gremlin_database_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_gremlin_database.metadata['url'], + template_url=self.get_gremlin_database.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('GremlinDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("GremlinDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_gremlin_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore - + get_gremlin_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore def _create_update_gremlin_database_initial( self, resource_group_name: str, account_name: str, database_name: str, - create_update_gremlin_database_parameters: "_models.GremlinDatabaseCreateUpdateParameters", + create_update_gremlin_database_parameters: Union[_models.GremlinDatabaseCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.GremlinDatabaseGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GremlinDatabaseGetResults"]] + ) -> Optional[_models.GremlinDatabaseGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_gremlin_database_parameters, 'GremlinDatabaseCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.GremlinDatabaseGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_gremlin_database_parameters, (IO, bytes)): + _content = create_update_gremlin_database_parameters + else: + _json = self._serialize.body( + create_update_gremlin_database_parameters, "GremlinDatabaseCreateUpdateParameters" + ) - request = build_create_update_gremlin_database_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_gremlin_database_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_gremlin_database_initial.metadata['url'], + content=_content, + template_url=self._create_update_gremlin_database_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -928,15 +927,95 @@ def _create_update_gremlin_database_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('GremlinDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("GremlinDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_gremlin_database_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore + _create_update_gremlin_database_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore + + @overload + def begin_create_update_gremlin_database( + self, + resource_group_name: str, + account_name: str, + database_name: str, + create_update_gremlin_database_parameters: _models.GremlinDatabaseCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.GremlinDatabaseGetResults]: + """Create or update an Azure Cosmos DB Gremlin database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param create_update_gremlin_database_parameters: The parameters to provide for the current + Gremlin database. Required. + :type create_update_gremlin_database_parameters: + ~azure.mgmt.cosmosdb.models.GremlinDatabaseCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either GremlinDatabaseGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_gremlin_database( + self, + resource_group_name: str, + account_name: str, + database_name: str, + create_update_gremlin_database_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.GremlinDatabaseGetResults]: + """Create or update an Azure Cosmos DB Gremlin database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param create_update_gremlin_database_parameters: The parameters to provide for the current + Gremlin database. Required. + :type create_update_gremlin_database_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either GremlinDatabaseGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_gremlin_database( @@ -944,21 +1023,25 @@ def begin_create_update_gremlin_database( resource_group_name: str, account_name: str, database_name: str, - create_update_gremlin_database_parameters: "_models.GremlinDatabaseCreateUpdateParameters", + create_update_gremlin_database_parameters: Union[_models.GremlinDatabaseCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.GremlinDatabaseGetResults"]: + ) -> LROPoller[_models.GremlinDatabaseGetResults]: """Create or update an Azure Cosmos DB Gremlin database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :param create_update_gremlin_database_parameters: The parameters to provide for the current - Gremlin database. + Gremlin database. Is either a model type or a IO type. Required. :type create_update_gremlin_database_parameters: - ~azure.mgmt.cosmosdb.models.GremlinDatabaseCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.GremlinDatabaseCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -970,84 +1053,89 @@ def begin_create_update_gremlin_database( :return: An instance of LROPoller that returns either GremlinDatabaseGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GremlinDatabaseGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.GremlinDatabaseGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_gremlin_database_initial( + raw_result = self._create_update_gremlin_database_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, create_update_gremlin_database_parameters=create_update_gremlin_database_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('GremlinDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("GremlinDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_gremlin_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore + begin_create_update_gremlin_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore def _delete_gremlin_database_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_gremlin_database_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_gremlin_database_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_gremlin_database_initial.metadata['url'], + template_url=self._delete_gremlin_database_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1057,24 +1145,20 @@ def _delete_gremlin_database_initial( # pylint: disable=inconsistent-return-sta if cls: return cls(pipeline_response, None, {}) - _delete_gremlin_database_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore - + _delete_gremlin_database_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore @distributed_trace - def begin_delete_gremlin_database( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + def begin_delete_gremlin_database( + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB Gremlin database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1086,146 +1170,166 @@ def begin_delete_gremlin_database( # pylint: disable=inconsistent-return-statem Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_gremlin_database_initial( + raw_result = self._delete_gremlin_database_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_gremlin_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore + begin_delete_gremlin_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}"} # type: ignore @distributed_trace def get_gremlin_database_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_gremlin_database_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_gremlin_database_throughput.metadata['url'], + template_url=self.get_gremlin_database_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_gremlin_database_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default"} # type: ignore - + get_gremlin_database_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default"} # type: ignore def _update_gremlin_database_throughput_initial( self, resource_group_name: str, account_name: str, database_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_gremlin_database_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_gremlin_database_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_gremlin_database_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_gremlin_database_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1234,37 +1338,42 @@ def _update_gremlin_database_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_gremlin_database_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default"} # type: ignore + _update_gremlin_database_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default"} # type: ignore - - @distributed_trace + @overload def begin_update_gremlin_database_throughput( self, resource_group_name: str, account_name: str, database_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB Gremlin database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current Gremlin database. + current Gremlin database. Required. :type update_throughput_parameters: ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1276,84 +1385,168 @@ def begin_update_gremlin_database_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_gremlin_database_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - update_throughput_parameters=update_throughput_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - - begin_update_gremlin_database_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default"} # type: ignore - - def _migrate_gremlin_database_to_autoscale_initial( + @overload + def begin_update_gremlin_database_throughput( self, resource_group_name: str, account_name: str, database_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Gremlin database. - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Gremlin database. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ - - request = build_migrate_gremlin_database_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + @distributed_trace + def begin_update_gremlin_database_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Gremlin database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Gremlin database. Is either a model type or a IO type. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_gremlin_database_throughput_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + update_throughput_parameters=update_throughput_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_gremlin_database_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default"} # type: ignore + + def _migrate_gremlin_database_to_autoscale_initial( + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_gremlin_database_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_gremlin_database_to_autoscale_initial.metadata['url'], + template_url=self._migrate_gremlin_database_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1362,31 +1555,27 @@ def _migrate_gremlin_database_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_gremlin_database_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_gremlin_database_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace def begin_migrate_gremlin_database_to_autoscale( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1399,81 +1588,86 @@ def begin_migrate_gremlin_database_to_autoscale( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_gremlin_database_to_autoscale_initial( + raw_result = self._migrate_gremlin_database_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_gremlin_database_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_gremlin_database_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore def _migrate_gremlin_database_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_gremlin_database_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_gremlin_database_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_gremlin_database_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_gremlin_database_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1482,31 +1676,27 @@ def _migrate_gremlin_database_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_gremlin_database_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_gremlin_database_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def begin_migrate_gremlin_database_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1519,104 +1709,109 @@ def begin_migrate_gremlin_database_to_manual_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_gremlin_database_to_manual_throughput_initial( + raw_result = self._migrate_gremlin_database_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_gremlin_database_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_gremlin_database_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def list_gremlin_graphs( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Iterable["_models.GremlinGraphListResult"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Iterable["_models.GremlinGraphGetResults"]: """Lists the Gremlin graph under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either GremlinGraphListResult or the result of + :return: An iterator like instance of either GremlinGraphGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.GremlinGraphListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GremlinGraphListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GremlinGraphListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_gremlin_graphs_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_gremlin_graphs.metadata['url'], + template_url=self.list_gremlin_graphs.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_gremlin_graphs_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1630,10 +1825,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1643,77 +1836,76 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_gremlin_graphs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs"} # type: ignore + list_gremlin_graphs.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs"} # type: ignore @distributed_trace def get_gremlin_graph( - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any - ) -> "_models.GremlinGraphGetResults": + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any + ) -> _models.GremlinGraphGetResults: """Gets the Gremlin graph under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: GremlinGraphGetResults, or the result of cls(response) + :return: GremlinGraphGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.GremlinGraphGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.GremlinGraphGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GremlinGraphGetResults] - request = build_get_gremlin_graph_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_gremlin_graph.metadata['url'], + template_url=self.get_gremlin_graph.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('GremlinGraphGetResults', pipeline_response) + deserialized = self._deserialize("GremlinGraphGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_gremlin_graph.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore - + get_gremlin_graph.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore def _create_update_gremlin_graph_initial( self, @@ -1721,39 +1913,53 @@ def _create_update_gremlin_graph_initial( account_name: str, database_name: str, graph_name: str, - create_update_gremlin_graph_parameters: "_models.GremlinGraphCreateUpdateParameters", + create_update_gremlin_graph_parameters: Union[_models.GremlinGraphCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.GremlinGraphGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GremlinGraphGetResults"]] + ) -> Optional[_models.GremlinGraphGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_gremlin_graph_parameters, 'GremlinGraphCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.GremlinGraphGetResults]] - request = build_create_update_gremlin_graph_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_gremlin_graph_parameters, (IO, bytes)): + _content = create_update_gremlin_graph_parameters + else: + _json = self._serialize.body(create_update_gremlin_graph_parameters, "GremlinGraphCreateUpdateParameters") + + request = build_create_update_gremlin_graph_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_gremlin_graph_initial.metadata['url'], + content=_content, + template_url=self._create_update_gremlin_graph_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1762,15 +1968,101 @@ def _create_update_gremlin_graph_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('GremlinGraphGetResults', pipeline_response) + deserialized = self._deserialize("GremlinGraphGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_gremlin_graph_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore + _create_update_gremlin_graph_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore + @overload + def begin_create_update_gremlin_graph( + self, + resource_group_name: str, + account_name: str, + database_name: str, + graph_name: str, + create_update_gremlin_graph_parameters: _models.GremlinGraphCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.GremlinGraphGetResults]: + """Create or update an Azure Cosmos DB Gremlin graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param graph_name: Cosmos DB graph name. Required. + :type graph_name: str + :param create_update_gremlin_graph_parameters: The parameters to provide for the current + Gremlin graph. Required. + :type create_update_gremlin_graph_parameters: + ~azure.mgmt.cosmosdb.models.GremlinGraphCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either GremlinGraphGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_gremlin_graph( + self, + resource_group_name: str, + account_name: str, + database_name: str, + graph_name: str, + create_update_gremlin_graph_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.GremlinGraphGetResults]: + """Create or update an Azure Cosmos DB Gremlin graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param graph_name: Cosmos DB graph name. Required. + :type graph_name: str + :param create_update_gremlin_graph_parameters: The parameters to provide for the current + Gremlin graph. Required. + :type create_update_gremlin_graph_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either GremlinGraphGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_gremlin_graph( @@ -1779,23 +2071,27 @@ def begin_create_update_gremlin_graph( account_name: str, database_name: str, graph_name: str, - create_update_gremlin_graph_parameters: "_models.GremlinGraphCreateUpdateParameters", + create_update_gremlin_graph_parameters: Union[_models.GremlinGraphCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.GremlinGraphGetResults"]: + ) -> LROPoller[_models.GremlinGraphGetResults]: """Create or update an Azure Cosmos DB Gremlin graph. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :param create_update_gremlin_graph_parameters: The parameters to provide for the current - Gremlin graph. + Gremlin graph. Is either a model type or a IO type. Required. :type create_update_gremlin_graph_parameters: - ~azure.mgmt.cosmosdb.models.GremlinGraphCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.GremlinGraphCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1807,19 +2103,19 @@ def begin_create_update_gremlin_graph( :return: An instance of LROPoller that returns either GremlinGraphGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GremlinGraphGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.GremlinGraphGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_gremlin_graph_initial( + raw_result = self._create_update_gremlin_graph_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -1827,67 +2123,71 @@ def begin_create_update_gremlin_graph( create_update_gremlin_graph_parameters=create_update_gremlin_graph_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('GremlinGraphGetResults', pipeline_response) + deserialized = self._deserialize("GremlinGraphGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_gremlin_graph.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore + begin_create_update_gremlin_graph.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore def _delete_gremlin_graph_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_gremlin_graph_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_gremlin_graph_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_gremlin_graph_initial.metadata['url'], + template_url=self._delete_gremlin_graph_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1897,27 +2197,22 @@ def _delete_gremlin_graph_initial( # pylint: disable=inconsistent-return-statem if cls: return cls(pipeline_response, None, {}) - _delete_gremlin_graph_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore - + _delete_gremlin_graph_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore @distributed_trace - def begin_delete_gremlin_graph( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any + def begin_delete_gremlin_graph( + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB Gremlin graph. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1929,113 +2224,118 @@ def begin_delete_gremlin_graph( # pylint: disable=inconsistent-return-statement Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_gremlin_graph_initial( + raw_result = self._delete_gremlin_graph_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_gremlin_graph.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore + begin_delete_gremlin_graph.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}"} # type: ignore @distributed_trace def get_gremlin_graph_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_gremlin_graph_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_gremlin_graph_throughput.metadata['url'], + template_url=self.get_gremlin_graph_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_gremlin_graph_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default"} # type: ignore - + get_gremlin_graph_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default"} # type: ignore def _update_gremlin_graph_throughput_initial( self, @@ -2043,39 +2343,53 @@ def _update_gremlin_graph_throughput_initial( account_name: str, database_name: str, graph_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_gremlin_graph_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_gremlin_graph_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_gremlin_graph_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_gremlin_graph_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2084,15 +2398,101 @@ def _update_gremlin_graph_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_gremlin_graph_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default"} # type: ignore + _update_gremlin_graph_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default"} # type: ignore + @overload + def begin_update_gremlin_graph_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + graph_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Gremlin graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param graph_name: Cosmos DB graph name. Required. + :type graph_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Gremlin graph. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_gremlin_graph_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + graph_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Gremlin graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param graph_name: Cosmos DB graph name. Required. + :type graph_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current Gremlin graph. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_update_gremlin_graph_throughput( @@ -2101,23 +2501,27 @@ def begin_update_gremlin_graph_throughput( account_name: str, database_name: str, graph_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB Gremlin graph. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current Gremlin graph. + current Gremlin graph. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -2129,19 +2533,19 @@ def begin_update_gremlin_graph_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._update_gremlin_graph_throughput_initial( + raw_result = self._update_gremlin_graph_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -2149,67 +2553,71 @@ def begin_update_gremlin_graph_throughput( update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_gremlin_graph_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default"} # type: ignore + begin_update_gremlin_graph_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default"} # type: ignore def _migrate_gremlin_graph_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_gremlin_graph_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_gremlin_graph_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_gremlin_graph_to_autoscale_initial.metadata['url'], + template_url=self._migrate_gremlin_graph_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2218,34 +2626,29 @@ def _migrate_gremlin_graph_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_gremlin_graph_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_gremlin_graph_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace def begin_migrate_gremlin_graph_to_autoscale( - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2258,84 +2661,88 @@ def begin_migrate_gremlin_graph_to_autoscale( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_gremlin_graph_to_autoscale_initial( + raw_result = self._migrate_gremlin_graph_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_gremlin_graph_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_gremlin_graph_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale"} # type: ignore def _migrate_gremlin_graph_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_gremlin_graph_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_gremlin_graph_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_gremlin_graph_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_gremlin_graph_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2344,34 +2751,29 @@ def _migrate_gremlin_graph_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_gremlin_graph_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_gremlin_graph_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def begin_migrate_gremlin_graph_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - graph_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, graph_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2384,49 +2786,52 @@ def begin_migrate_gremlin_graph_to_manual_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_gremlin_graph_to_manual_throughput_initial( + raw_result = self._migrate_gremlin_graph_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_gremlin_graph_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_gremlin_graph_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore def _retrieve_continuous_backup_information_initial( self, @@ -2434,39 +2839,53 @@ def _retrieve_continuous_backup_information_initial( account_name: str, database_name: str, graph_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> Optional["_models.BackupInformation"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupInformation"]] + ) -> Optional[_models.BackupInformation]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(location, 'ContinuousBackupRestoreLocation') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.BackupInformation]] - request = build_retrieve_continuous_backup_information_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(location, (IO, bytes)): + _content = location + else: + _json = self._serialize.body(location, "ContinuousBackupRestoreLocation") + + request = build_retrieve_continuous_backup_information_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, graph_name=graph_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._retrieve_continuous_backup_information_initial.metadata['url'], + content=_content, + template_url=self._retrieve_continuous_backup_information_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2475,15 +2894,98 @@ def _retrieve_continuous_backup_information_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _retrieve_continuous_backup_information_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/retrieveContinuousBackupInformation"} # type: ignore + _retrieve_continuous_backup_information_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/retrieveContinuousBackupInformation"} # type: ignore + @overload + def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + graph_name: str, + location: _models.ContinuousBackupRestoreLocation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a gremlin graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param graph_name: Cosmos DB graph name. Required. + :type graph_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + graph_name: str, + location: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a gremlin graph. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param graph_name: Cosmos DB graph name. Required. + :type graph_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_retrieve_continuous_backup_information( @@ -2492,21 +2994,26 @@ def begin_retrieve_continuous_backup_information( account_name: str, database_name: str, graph_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> LROPoller["_models.BackupInformation"]: + ) -> LROPoller[_models.BackupInformation]: """Retrieves continuous backup information for a gremlin graph. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param graph_name: Cosmos DB graph name. + :param graph_name: Cosmos DB graph name. Required. :type graph_name: str - :param location: The name of the continuous backup restore location. - :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :param location: The name of the continuous backup restore location. Is either a model type or + a IO type. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -2518,19 +3025,19 @@ def begin_retrieve_continuous_backup_information( :return: An instance of LROPoller that returns either BackupInformation or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupInformation] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._retrieve_continuous_backup_information_initial( + raw_result = self._retrieve_continuous_backup_information_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -2538,29 +3045,34 @@ def begin_retrieve_continuous_backup_information( location=location, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_retrieve_continuous_backup_information.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/retrieveContinuousBackupInformation"} # type: ignore + begin_retrieve_continuous_backup_information.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/retrieveContinuousBackupInformation"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_locations_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_locations_operations.py index a9cf37fdc93..e13ff57c4ce 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_locations_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_locations_operations.py @@ -7,151 +7,149 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request( - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - accept = "application/json" +def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations") path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_request( - subscription_id: str, - location: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str +def build_get_request(location: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}") + _url = kwargs.pop( + "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}" + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") -class LocationsOperations(object): - """LocationsOperations operations. + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. +class LocationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`locations` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list( - self, - **kwargs: Any - ) -> Iterable["_models.LocationListResult"]: + def list(self, **kwargs: Any) -> Iterable["_models.LocationGetResult"]: """List Cosmos DB locations and their properties. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LocationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.LocationListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either LocationGetResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.LocationGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.LocationListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -165,10 +163,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -178,62 +174,62 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations"} # type: ignore @distributed_trace - def get( - self, - location: str, - **kwargs: Any - ) -> "_models.LocationGetResult": + def get(self, location: str, **kwargs: Any) -> _models.LocationGetResult: """Get the properties of an existing Cosmos DB location. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: LocationGetResult, or the result of cls(response) + :return: LocationGetResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.LocationGetResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationGetResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.LocationGetResult] - request = build_get_request( - subscription_id=self._config.subscription_id, location=location, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('LocationGetResult', pipeline_response) + deserialized = self._deserialize("LocationGetResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_mongo_db_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_mongo_db_resources_operations.py index 3525ab579ff..03e4ca2c324 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_mongo_db_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_mongo_db_resources_operations.py @@ -6,1248 +6,1278 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_mongo_db_databases_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_mongo_db_database_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_mongo_db_database_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_create_update_mongo_db_database_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_mongo_db_database_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any +def build_delete_mongo_db_database_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_get_mongo_db_database_throughput_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_mongo_db_database_throughput_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_update_mongo_db_database_throughput_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_mongo_db_database_to_autoscale_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any +def build_migrate_mongo_db_database_to_autoscale_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_mongo_db_database_to_manual_throughput_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any +def build_migrate_mongo_db_database_to_manual_throughput_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_mongo_db_container_retrieve_throughput_distribution_request_initial( - subscription_id: str, +def build_mongo_db_database_retrieve_throughput_distribution_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_mongo_db_database_redistribute_throughput_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/redistributeThroughput", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_mongo_db_container_retrieve_throughput_distribution_request( resource_group_name: str, account_name: str, database_name: str, collection_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "collectionName": _SERIALIZER.url("collection_name", collection_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_mongo_db_container_redistribute_throughput_request_initial( - subscription_id: str, +def build_mongo_db_container_redistribute_throughput_request( resource_group_name: str, account_name: str, database_name: str, collection_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "collectionName": _SERIALIZER.url("collection_name", collection_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_list_mongo_db_collections_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_mongo_db_collection_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, collection_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "collectionName": _SERIALIZER.url("collection_name", collection_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_mongo_db_collection_request_initial( - subscription_id: str, +def build_create_update_mongo_db_collection_request( resource_group_name: str, account_name: str, database_name: str, collection_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "collectionName": _SERIALIZER.url("collection_name", collection_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_mongo_db_collection_request_initial( - subscription_id: str, +def build_delete_mongo_db_collection_request( resource_group_name: str, account_name: str, database_name: str, collection_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "collectionName": _SERIALIZER.url("collection_name", collection_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_list_mongo_db_collection_partition_merge_request_initial( - subscription_id: str, +def build_list_mongo_db_collection_partition_merge_request( resource_group_name: str, account_name: str, database_name: str, collection_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "collectionName": _SERIALIZER.url("collection_name", collection_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_get_mongo_db_collection_throughput_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, collection_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "collectionName": _SERIALIZER.url("collection_name", collection_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_mongo_db_collection_throughput_request_initial( - subscription_id: str, +def build_update_mongo_db_collection_throughput_request( resource_group_name: str, account_name: str, database_name: str, collection_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "collectionName": _SERIALIZER.url("collection_name", collection_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_mongo_db_collection_to_autoscale_request_initial( - subscription_id: str, +def build_migrate_mongo_db_collection_to_autoscale_request( resource_group_name: str, account_name: str, database_name: str, collection_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToAutoscale") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToAutoscale", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "collectionName": _SERIALIZER.url("collection_name", collection_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_mongo_db_collection_to_manual_throughput_request_initial( - subscription_id: str, +def build_migrate_mongo_db_collection_to_manual_throughput_request( resource_group_name: str, account_name: str, database_name: str, collection_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "collectionName": _SERIALIZER.url("collection_name", collection_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_get_mongo_role_definition_request( - mongo_role_definition_id: str, - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + mongo_role_definition_id: str, resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "mongoRoleDefinitionId": _SERIALIZER.url("mongo_role_definition_id", mongo_role_definition_id, 'str'), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "mongoRoleDefinitionId": _SERIALIZER.url("mongo_role_definition_id", mongo_role_definition_id, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_mongo_role_definition_request_initial( - mongo_role_definition_id: str, - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_create_update_mongo_role_definition_request( + mongo_role_definition_id: str, resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "mongoRoleDefinitionId": _SERIALIZER.url("mongo_role_definition_id", mongo_role_definition_id, 'str'), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "mongoRoleDefinitionId": _SERIALIZER.url("mongo_role_definition_id", mongo_role_definition_id, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_mongo_role_definition_request_initial( - mongo_role_definition_id: str, - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_mongo_role_definition_request( + mongo_role_definition_id: str, resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "mongoRoleDefinitionId": _SERIALIZER.url("mongo_role_definition_id", mongo_role_definition_id, 'str'), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "mongoRoleDefinitionId": _SERIALIZER.url("mongo_role_definition_id", mongo_role_definition_id, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) def build_list_mongo_role_definitions_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_mongo_user_definition_request( - mongo_user_definition_id: str, - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + mongo_user_definition_id: str, resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "mongoUserDefinitionId": _SERIALIZER.url("mongo_user_definition_id", mongo_user_definition_id, 'str'), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "mongoUserDefinitionId": _SERIALIZER.url("mongo_user_definition_id", mongo_user_definition_id, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_mongo_user_definition_request_initial( - mongo_user_definition_id: str, - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_create_update_mongo_user_definition_request( + mongo_user_definition_id: str, resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "mongoUserDefinitionId": _SERIALIZER.url("mongo_user_definition_id", mongo_user_definition_id, 'str'), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "mongoUserDefinitionId": _SERIALIZER.url("mongo_user_definition_id", mongo_user_definition_id, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_mongo_user_definition_request_initial( - mongo_user_definition_id: str, - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_mongo_user_definition_request( + mongo_user_definition_id: str, resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "mongoUserDefinitionId": _SERIALIZER.url("mongo_user_definition_id", mongo_user_definition_id, 'str'), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "mongoUserDefinitionId": _SERIALIZER.url("mongo_user_definition_id", mongo_user_definition_id, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) def build_list_mongo_user_definitions_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_retrieve_continuous_backup_information_request_initial( - subscription_id: str, +def build_retrieve_continuous_backup_information_request( resource_group_name: str, account_name: str, database_name: str, collection_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "collectionName": _SERIALIZER.url("collection_name", collection_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - -class MongoDBResourcesOperations(object): # pylint: disable=too-many-public-methods - """MongoDBResourcesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class MongoDBResourcesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`mongo_db_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_mongo_db_databases( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.MongoDBDatabaseListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.MongoDBDatabaseGetResults"]: """Lists the MongoDB databases under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MongoDBDatabaseListResult or the result of + :return: An iterator like instance of either MongoDBDatabaseGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MongoDBDatabaseListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoDBDatabaseListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoDBDatabaseListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_mongo_db_databases_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_mongo_db_databases.metadata['url'], + template_url=self.list_mongo_db_databases.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_mongo_db_databases_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1261,10 +1291,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1274,112 +1302,128 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_mongo_db_databases.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases"} # type: ignore + list_mongo_db_databases.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases"} # type: ignore @distributed_trace def get_mongo_db_database( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> "_models.MongoDBDatabaseGetResults": + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> _models.MongoDBDatabaseGetResults: """Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: MongoDBDatabaseGetResults, or the result of cls(response) + :return: MongoDBDatabaseGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoDBDatabaseGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoDBDatabaseGetResults] - request = build_get_mongo_db_database_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_mongo_db_database.metadata['url'], + template_url=self.get_mongo_db_database.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('MongoDBDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("MongoDBDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_mongo_db_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore - + get_mongo_db_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore def _create_update_mongo_db_database_initial( self, resource_group_name: str, account_name: str, database_name: str, - create_update_mongo_db_database_parameters: "_models.MongoDBDatabaseCreateUpdateParameters", + create_update_mongo_db_database_parameters: Union[_models.MongoDBDatabaseCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.MongoDBDatabaseGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MongoDBDatabaseGetResults"]] + ) -> Optional[_models.MongoDBDatabaseGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_mongo_db_database_parameters, 'MongoDBDatabaseCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.MongoDBDatabaseGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_mongo_db_database_parameters, (IO, bytes)): + _content = create_update_mongo_db_database_parameters + else: + _json = self._serialize.body( + create_update_mongo_db_database_parameters, "MongoDBDatabaseCreateUpdateParameters" + ) - request = build_create_update_mongo_db_database_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_mongo_db_database_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_mongo_db_database_initial.metadata['url'], + content=_content, + template_url=self._create_update_mongo_db_database_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1388,37 +1432,42 @@ def _create_update_mongo_db_database_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MongoDBDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("MongoDBDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_mongo_db_database_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore + _create_update_mongo_db_database_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore - - @distributed_trace + @overload def begin_create_update_mongo_db_database( self, resource_group_name: str, account_name: str, database_name: str, - create_update_mongo_db_database_parameters: "_models.MongoDBDatabaseCreateUpdateParameters", + create_update_mongo_db_database_parameters: _models.MongoDBDatabaseCreateUpdateParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller["_models.MongoDBDatabaseGetResults"]: + ) -> LROPoller[_models.MongoDBDatabaseGetResults]: """Create or updates Azure Cosmos DB MongoDB database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :param create_update_mongo_db_database_parameters: The parameters to provide for the current - MongoDB database. + MongoDB database. Required. :type create_update_mongo_db_database_parameters: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1430,84 +1479,168 @@ def begin_create_update_mongo_db_database( :return: An instance of LROPoller that returns either MongoDBDatabaseGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoDBDatabaseGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_update_mongo_db_database_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - create_update_mongo_db_database_parameters=create_update_mongo_db_database_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('MongoDBDatabaseGetResults', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - - begin_create_update_mongo_db_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore - def _delete_mongo_db_database_initial( # pylint: disable=inconsistent-return-statements + @overload + def begin_create_update_mongo_db_database( self, resource_group_name: str, account_name: str, database_name: str, + create_update_mongo_db_database_parameters: IO, + *, + content_type: str = "application/json", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + ) -> LROPoller[_models.MongoDBDatabaseGetResults]: + """Create or updates Azure Cosmos DB MongoDB database. - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param create_update_mongo_db_database_parameters: The parameters to provide for the current + MongoDB database. Required. + :type create_update_mongo_db_database_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MongoDBDatabaseGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ - - request = build_delete_mongo_db_database_request_initial( - subscription_id=self._config.subscription_id, + @distributed_trace + def begin_create_update_mongo_db_database( + self, + resource_group_name: str, + account_name: str, + database_name: str, + create_update_mongo_db_database_parameters: Union[_models.MongoDBDatabaseCreateUpdateParameters, IO], + **kwargs: Any + ) -> LROPoller[_models.MongoDBDatabaseGetResults]: + """Create or updates Azure Cosmos DB MongoDB database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param create_update_mongo_db_database_parameters: The parameters to provide for the current + MongoDB database. Is either a model type or a IO type. Required. + :type create_update_mongo_db_database_parameters: + ~azure.mgmt.cosmosdb.models.MongoDBDatabaseCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MongoDBDatabaseGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoDBDatabaseGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_update_mongo_db_database_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + create_update_mongo_db_database_parameters=create_update_mongo_db_database_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("MongoDBDatabaseGetResults", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_update_mongo_db_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore + + def _delete_mongo_db_database_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_mongo_db_database_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_mongo_db_database_initial.metadata['url'], + template_url=self._delete_mongo_db_database_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1517,24 +1650,20 @@ def _delete_mongo_db_database_initial( # pylint: disable=inconsistent-return-st if cls: return cls(pipeline_response, None, {}) - _delete_mongo_db_database_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore - + _delete_mongo_db_database_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore @distributed_trace - def begin_delete_mongo_db_database( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + def begin_delete_mongo_db_database( + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB MongoDB database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1546,146 +1675,166 @@ def begin_delete_mongo_db_database( # pylint: disable=inconsistent-return-state Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_mongo_db_database_initial( + raw_result = self._delete_mongo_db_database_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_mongo_db_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore + begin_delete_mongo_db_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}"} # type: ignore @distributed_trace def get_mongo_db_database_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_mongo_db_database_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_mongo_db_database_throughput.metadata['url'], + template_url=self.get_mongo_db_database_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_mongo_db_database_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default"} # type: ignore - + get_mongo_db_database_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default"} # type: ignore def _update_mongo_db_database_throughput_initial( self, resource_group_name: str, account_name: str, database_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_mongo_db_database_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_mongo_db_database_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_mongo_db_database_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_mongo_db_database_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1694,15 +1843,95 @@ def _update_mongo_db_database_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_mongo_db_database_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default"} # type: ignore + _update_mongo_db_database_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default"} # type: ignore + + @overload + def begin_update_mongo_db_database_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of the an Azure Cosmos DB MongoDB database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current MongoDB database. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_mongo_db_database_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of the an Azure Cosmos DB MongoDB database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current MongoDB database. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_update_mongo_db_database_throughput( @@ -1710,21 +1939,25 @@ def begin_update_mongo_db_database_throughput( resource_group_name: str, account_name: str, database_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of the an Azure Cosmos DB MongoDB database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current MongoDB database. + current MongoDB database. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1736,84 +1969,89 @@ def begin_update_mongo_db_database_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._update_mongo_db_database_throughput_initial( + raw_result = self._update_mongo_db_database_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_mongo_db_database_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default"} # type: ignore + begin_update_mongo_db_database_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default"} # type: ignore def _migrate_mongo_db_database_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_mongo_db_database_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_mongo_db_database_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_mongo_db_database_to_autoscale_initial.metadata['url'], + template_url=self._migrate_mongo_db_database_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1822,31 +2060,27 @@ def _migrate_mongo_db_database_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_mongo_db_database_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_mongo_db_database_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace def begin_migrate_mongo_db_database_to_autoscale( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1859,81 +2093,86 @@ def begin_migrate_mongo_db_database_to_autoscale( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_mongo_db_database_to_autoscale_initial( + raw_result = self._migrate_mongo_db_database_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_mongo_db_database_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_mongo_db_database_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore def _migrate_mongo_db_database_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_mongo_db_database_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_mongo_db_database_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_mongo_db_database_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_mongo_db_database_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1942,31 +2181,27 @@ def _migrate_mongo_db_database_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_mongo_db_database_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_mongo_db_database_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def begin_migrate_mongo_db_database_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1979,88 +2214,103 @@ def begin_migrate_mongo_db_database_to_manual_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_mongo_db_database_to_manual_throughput_initial( + raw_result = self._migrate_mongo_db_database_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_mongo_db_database_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_mongo_db_database_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - def _mongo_db_container_retrieve_throughput_distribution_initial( + def _mongo_db_database_retrieve_throughput_distribution_initial( self, resource_group_name: str, account_name: str, database_name: str, - collection_name: str, - retrieve_throughput_parameters: "_models.RetrieveThroughputParameters", + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], **kwargs: Any - ) -> Optional["_models.PhysicalPartitionThroughputInfoResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionThroughputInfoResult"]] + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(retrieve_throughput_parameters, 'RetrieveThroughputParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] - request = build_mongo_db_container_retrieve_throughput_distribution_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(retrieve_throughput_parameters, (IO, bytes)): + _content = retrieve_throughput_parameters + else: + _json = self._serialize.body(retrieve_throughput_parameters, "RetrieveThroughputParameters") + + request = build_mongo_db_database_retrieve_throughput_distribution_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._mongo_db_container_retrieve_throughput_distribution_initial.metadata['url'], + content=_content, + template_url=self._mongo_db_database_retrieve_throughput_distribution_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2069,39 +2319,122 @@ def _mongo_db_container_retrieve_throughput_distribution_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _mongo_db_container_retrieve_throughput_distribution_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + _mongo_db_database_retrieve_throughput_distribution_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + + @overload + def begin_mongo_db_database_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + retrieve_throughput_parameters: _models.RetrieveThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB MongoDB database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current MongoDB database. Required. + :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_mongo_db_database_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + retrieve_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB MongoDB database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current MongoDB database. Required. + :type retrieve_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def begin_mongo_db_container_retrieve_throughput_distribution( + def begin_mongo_db_database_retrieve_throughput_distribution( self, resource_group_name: str, account_name: str, database_name: str, - collection_name: str, - retrieve_throughput_parameters: "_models.RetrieveThroughputParameters", + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], **kwargs: Any - ) -> LROPoller["_models.PhysicalPartitionThroughputInfoResult"]: - """Retrieve throughput distribution for an Azure Cosmos DB MongoDB container. + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB MongoDB database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. - :type collection_name: str :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput - distribution for the current MongoDB container. + distribution for the current MongoDB database. Is either a model type or a IO type. Required. :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -2114,92 +2447,108 @@ def begin_mongo_db_container_retrieve_throughput_distribution( the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionThroughputInfoResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._mongo_db_container_retrieve_throughput_distribution_initial( + raw_result = self._mongo_db_database_retrieve_throughput_distribution_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - collection_name=collection_name, retrieve_throughput_parameters=retrieve_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_mongo_db_container_retrieve_throughput_distribution.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + begin_mongo_db_database_retrieve_throughput_distribution.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore - def _mongo_db_container_redistribute_throughput_initial( + def _mongo_db_database_redistribute_throughput_initial( self, resource_group_name: str, account_name: str, database_name: str, - collection_name: str, - redistribute_throughput_parameters: "_models.RedistributeThroughputParameters", + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], **kwargs: Any - ) -> Optional["_models.PhysicalPartitionThroughputInfoResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionThroughputInfoResult"]] + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(redistribute_throughput_parameters, 'RedistributeThroughputParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] - request = build_mongo_db_container_redistribute_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(redistribute_throughput_parameters, (IO, bytes)): + _content = redistribute_throughput_parameters + else: + _json = self._serialize.body(redistribute_throughput_parameters, "RedistributeThroughputParameters") + + request = build_mongo_db_database_redistribute_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._mongo_db_container_redistribute_throughput_initial.metadata['url'], + content=_content, + template_url=self._mongo_db_database_redistribute_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2208,40 +2557,42 @@ def _mongo_db_container_redistribute_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _mongo_db_container_redistribute_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput"} # type: ignore + _mongo_db_database_redistribute_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/redistributeThroughput"} # type: ignore - - @distributed_trace - def begin_mongo_db_container_redistribute_throughput( + @overload + def begin_mongo_db_database_redistribute_throughput( self, resource_group_name: str, account_name: str, database_name: str, - collection_name: str, - redistribute_throughput_parameters: "_models.RedistributeThroughputParameters", + redistribute_throughput_parameters: _models.RedistributeThroughputParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller["_models.PhysicalPartitionThroughputInfoResult"]: - """Redistribute throughput for an Azure Cosmos DB MongoDB container. + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB MongoDB database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. - :type collection_name: str :param redistribute_throughput_parameters: The parameters to provide for redistributing - throughput for the current MongoDB container. + throughput for the current MongoDB database. Required. :type redistribute_throughput_parameters: ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -2254,108 +2605,696 @@ def begin_mongo_db_container_redistribute_throughput( the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionThroughputInfoResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._mongo_db_container_redistribute_throughput_initial( + + @overload + def begin_mongo_db_database_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + redistribute_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB MongoDB database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current MongoDB database. Required. + :type redistribute_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_mongo_db_database_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB MongoDB database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current MongoDB database. Is either a model type or a IO type. Required. + :type redistribute_throughput_parameters: + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._mongo_db_database_redistribute_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - collection_name=collection_name, redistribute_throughput_parameters=redistribute_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_mongo_db_database_redistribute_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/redistributeThroughput"} # type: ignore + + def _mongo_db_container_retrieve_throughput_distribution_initial( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], + **kwargs: Any + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(retrieve_throughput_parameters, (IO, bytes)): + _content = retrieve_throughput_parameters + else: + _json = self._serialize.body(retrieve_throughput_parameters, "RetrieveThroughputParameters") + + request = build_mongo_db_container_retrieve_throughput_distribution_request( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._mongo_db_container_retrieve_throughput_distribution_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _mongo_db_container_retrieve_throughput_distribution_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + + @overload + def begin_mongo_db_container_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + retrieve_throughput_parameters: _models.RetrieveThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB MongoDB container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current MongoDB container. Required. + :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_mongo_db_container_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + retrieve_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB MongoDB container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current MongoDB container. Required. + :type retrieve_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_mongo_db_container_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB MongoDB container. - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current MongoDB container. Is either a model type or a IO type. Required. + :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._mongo_db_container_retrieve_throughput_distribution_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + retrieve_throughput_parameters=retrieve_throughput_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_mongo_db_container_redistribute_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput"} # type: ignore + begin_mongo_db_container_retrieve_throughput_distribution.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + + def _mongo_db_container_redistribute_throughput_initial( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], + **kwargs: Any + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(redistribute_throughput_parameters, (IO, bytes)): + _content = redistribute_throughput_parameters + else: + _json = self._serialize.body(redistribute_throughput_parameters, "RedistributeThroughputParameters") + + request = build_mongo_db_container_redistribute_throughput_request( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._mongo_db_container_redistribute_throughput_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _mongo_db_container_redistribute_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput"} # type: ignore + + @overload + def begin_mongo_db_container_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + redistribute_throughput_parameters: _models.RedistributeThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB MongoDB container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current MongoDB container. Required. + :type redistribute_throughput_parameters: + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_mongo_db_container_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + redistribute_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB MongoDB container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current MongoDB container. Required. + :type redistribute_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def list_mongo_db_collections( + def begin_mongo_db_container_redistribute_throughput( self, resource_group_name: str, account_name: str, database_name: str, + collection_name: str, + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], **kwargs: Any - ) -> Iterable["_models.MongoDBCollectionListResult"]: + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB MongoDB container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current MongoDB container. Is either a model type or a IO type. Required. + :type redistribute_throughput_parameters: + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._mongo_db_container_redistribute_throughput_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + redistribute_throughput_parameters=redistribute_throughput_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_mongo_db_container_redistribute_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput"} # type: ignore + + @distributed_trace + def list_mongo_db_collections( + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Iterable["_models.MongoDBCollectionGetResults"]: """Lists the MongoDB collection under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MongoDBCollectionListResult or the result of + :return: An iterator like instance of either MongoDBCollectionGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MongoDBCollectionListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoDBCollectionListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoDBCollectionListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_mongo_db_collections_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_mongo_db_collections.metadata['url'], + template_url=self.list_mongo_db_collections.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_mongo_db_collections_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -2369,10 +3308,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2382,77 +3319,76 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_mongo_db_collections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections"} # type: ignore + list_mongo_db_collections.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections"} # type: ignore @distributed_trace def get_mongo_db_collection( - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any - ) -> "_models.MongoDBCollectionGetResults": + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any + ) -> _models.MongoDBCollectionGetResults: """Gets the MongoDB collection under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: MongoDBCollectionGetResults, or the result of cls(response) + :return: MongoDBCollectionGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoDBCollectionGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoDBCollectionGetResults] - request = build_get_mongo_db_collection_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_mongo_db_collection.metadata['url'], + template_url=self.get_mongo_db_collection.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('MongoDBCollectionGetResults', pipeline_response) + deserialized = self._deserialize("MongoDBCollectionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_mongo_db_collection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore - + get_mongo_db_collection.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore def _create_update_mongo_db_collection_initial( self, @@ -2460,39 +3396,55 @@ def _create_update_mongo_db_collection_initial( account_name: str, database_name: str, collection_name: str, - create_update_mongo_db_collection_parameters: "_models.MongoDBCollectionCreateUpdateParameters", + create_update_mongo_db_collection_parameters: Union[_models.MongoDBCollectionCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.MongoDBCollectionGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MongoDBCollectionGetResults"]] + ) -> Optional[_models.MongoDBCollectionGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_mongo_db_collection_parameters, 'MongoDBCollectionCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.MongoDBCollectionGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_mongo_db_collection_parameters, (IO, bytes)): + _content = create_update_mongo_db_collection_parameters + else: + _json = self._serialize.body( + create_update_mongo_db_collection_parameters, "MongoDBCollectionCreateUpdateParameters" + ) - request = build_create_update_mongo_db_collection_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_mongo_db_collection_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_mongo_db_collection_initial.metadata['url'], + content=_content, + template_url=self._create_update_mongo_db_collection_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2501,15 +3453,101 @@ def _create_update_mongo_db_collection_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MongoDBCollectionGetResults', pipeline_response) + deserialized = self._deserialize("MongoDBCollectionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_mongo_db_collection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore + _create_update_mongo_db_collection_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore + + @overload + def begin_create_update_mongo_db_collection( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + create_update_mongo_db_collection_parameters: _models.MongoDBCollectionCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MongoDBCollectionGetResults]: + """Create or update an Azure Cosmos DB MongoDB Collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param create_update_mongo_db_collection_parameters: The parameters to provide for the current + MongoDB Collection. Required. + :type create_update_mongo_db_collection_parameters: + ~azure.mgmt.cosmosdb.models.MongoDBCollectionCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MongoDBCollectionGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_mongo_db_collection( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + create_update_mongo_db_collection_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MongoDBCollectionGetResults]: + """Create or update an Azure Cosmos DB MongoDB Collection. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param create_update_mongo_db_collection_parameters: The parameters to provide for the current + MongoDB Collection. Required. + :type create_update_mongo_db_collection_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MongoDBCollectionGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_mongo_db_collection( @@ -2518,23 +3556,27 @@ def begin_create_update_mongo_db_collection( account_name: str, database_name: str, collection_name: str, - create_update_mongo_db_collection_parameters: "_models.MongoDBCollectionCreateUpdateParameters", + create_update_mongo_db_collection_parameters: Union[_models.MongoDBCollectionCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.MongoDBCollectionGetResults"]: + ) -> LROPoller[_models.MongoDBCollectionGetResults]: """Create or update an Azure Cosmos DB MongoDB Collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :param create_update_mongo_db_collection_parameters: The parameters to provide for the current - MongoDB Collection. + MongoDB Collection. Is either a model type or a IO type. Required. :type create_update_mongo_db_collection_parameters: - ~azure.mgmt.cosmosdb.models.MongoDBCollectionCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.MongoDBCollectionCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -2546,19 +3588,19 @@ def begin_create_update_mongo_db_collection( :return: An instance of LROPoller that returns either MongoDBCollectionGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoDBCollectionGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoDBCollectionGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_mongo_db_collection_initial( + raw_result = self._create_update_mongo_db_collection_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -2566,67 +3608,71 @@ def begin_create_update_mongo_db_collection( create_update_mongo_db_collection_parameters=create_update_mongo_db_collection_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('MongoDBCollectionGetResults', pipeline_response) + deserialized = self._deserialize("MongoDBCollectionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_mongo_db_collection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore + begin_create_update_mongo_db_collection.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore def _delete_mongo_db_collection_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_mongo_db_collection_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_mongo_db_collection_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_mongo_db_collection_initial.metadata['url'], + template_url=self._delete_mongo_db_collection_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -2636,27 +3682,22 @@ def _delete_mongo_db_collection_initial( # pylint: disable=inconsistent-return- if cls: return cls(pipeline_response, None, {}) - _delete_mongo_db_collection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore - + _delete_mongo_db_collection_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore @distributed_trace - def begin_delete_mongo_db_collection( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any + def begin_delete_mongo_db_collection( + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB MongoDB Collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2668,46 +3709,50 @@ def begin_delete_mongo_db_collection( # pylint: disable=inconsistent-return-sta Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_mongo_db_collection_initial( + raw_result = self._delete_mongo_db_collection_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_mongo_db_collection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore + begin_delete_mongo_db_collection.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}"} # type: ignore def _list_mongo_db_collection_partition_merge_initial( self, @@ -2715,39 +3760,53 @@ def _list_mongo_db_collection_partition_merge_initial( account_name: str, database_name: str, collection_name: str, - merge_parameters: "_models.MergeParameters", + merge_parameters: Union[_models.MergeParameters, IO], **kwargs: Any - ) -> Optional["_models.PhysicalPartitionStorageInfoCollection"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionStorageInfoCollection"]] + ) -> Optional[_models.PhysicalPartitionStorageInfoCollection]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(merge_parameters, 'MergeParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionStorageInfoCollection]] - request = build_list_mongo_db_collection_partition_merge_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(merge_parameters, (IO, bytes)): + _content = merge_parameters + else: + _json = self._serialize.body(merge_parameters, "MergeParameters") + + request = build_list_mongo_db_collection_partition_merge_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._list_mongo_db_collection_partition_merge_initial.metadata['url'], + content=_content, + template_url=self._list_mongo_db_collection_partition_merge_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2756,15 +3815,100 @@ def _list_mongo_db_collection_partition_merge_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionStorageInfoCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _list_mongo_db_collection_partition_merge_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge"} # type: ignore + _list_mongo_db_collection_partition_merge_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge"} # type: ignore + + @overload + def begin_list_mongo_db_collection_partition_merge( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + merge_parameters: _models.MergeParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionStorageInfoCollection]: + """Merges the partitions of a MongoDB Collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param merge_parameters: The parameters for the merge operation. Required. + :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionStorageInfoCollection or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_list_mongo_db_collection_partition_merge( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + merge_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionStorageInfoCollection]: + """Merges the partitions of a MongoDB Collection. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param merge_parameters: The parameters for the merge operation. Required. + :type merge_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionStorageInfoCollection or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_list_mongo_db_collection_partition_merge( @@ -2773,21 +3917,26 @@ def begin_list_mongo_db_collection_partition_merge( account_name: str, database_name: str, collection_name: str, - merge_parameters: "_models.MergeParameters", + merge_parameters: Union[_models.MergeParameters, IO], **kwargs: Any - ) -> LROPoller["_models.PhysicalPartitionStorageInfoCollection"]: + ) -> LROPoller[_models.PhysicalPartitionStorageInfoCollection]: """Merges the partitions of a MongoDB Collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str - :param merge_parameters: The parameters for the merge operation. - :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters + :param merge_parameters: The parameters for the merge operation. Is either a model type or a IO + type. Required. + :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -2800,19 +3949,19 @@ def begin_list_mongo_db_collection_partition_merge( the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionStorageInfoCollection"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionStorageInfoCollection] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._list_mongo_db_collection_partition_merge_initial( + raw_result = self._list_mongo_db_collection_partition_merge_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -2820,99 +3969,105 @@ def begin_list_mongo_db_collection_partition_merge( merge_parameters=merge_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionStorageInfoCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_mongo_db_collection_partition_merge.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge"} # type: ignore + begin_list_mongo_db_collection_partition_merge.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge"} # type: ignore @distributed_trace def get_mongo_db_collection_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_mongo_db_collection_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_mongo_db_collection_throughput.metadata['url'], + template_url=self.get_mongo_db_collection_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_mongo_db_collection_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default"} # type: ignore - + get_mongo_db_collection_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default"} # type: ignore def _update_mongo_db_collection_throughput_initial( self, @@ -2920,39 +4075,53 @@ def _update_mongo_db_collection_throughput_initial( account_name: str, database_name: str, collection_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_mongo_db_collection_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_mongo_db_collection_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_mongo_db_collection_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_mongo_db_collection_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2961,15 +4130,101 @@ def _update_mongo_db_collection_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_mongo_db_collection_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default"} # type: ignore + _update_mongo_db_collection_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default"} # type: ignore + + @overload + def begin_update_mongo_db_collection_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update the RUs per second of an Azure Cosmos DB MongoDB collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current MongoDB collection. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_mongo_db_collection_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update the RUs per second of an Azure Cosmos DB MongoDB collection. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param update_throughput_parameters: The RUs per second of the parameters to provide for the + current MongoDB collection. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_update_mongo_db_collection_throughput( @@ -2978,23 +4233,27 @@ def begin_update_mongo_db_collection_throughput( account_name: str, database_name: str, collection_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Update the RUs per second of an Azure Cosmos DB MongoDB collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current MongoDB collection. + current MongoDB collection. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -3006,19 +4265,19 @@ def begin_update_mongo_db_collection_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._update_mongo_db_collection_throughput_initial( + raw_result = self._update_mongo_db_collection_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -3026,67 +4285,71 @@ def begin_update_mongo_db_collection_throughput( update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_mongo_db_collection_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default"} # type: ignore + begin_update_mongo_db_collection_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default"} # type: ignore def _migrate_mongo_db_collection_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_mongo_db_collection_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_mongo_db_collection_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_mongo_db_collection_to_autoscale_initial.metadata['url'], + template_url=self._migrate_mongo_db_collection_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3095,34 +4358,29 @@ def _migrate_mongo_db_collection_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_mongo_db_collection_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_mongo_db_collection_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace def begin_migrate_mongo_db_collection_to_autoscale( - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3135,84 +4393,88 @@ def begin_migrate_mongo_db_collection_to_autoscale( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_mongo_db_collection_to_autoscale_initial( + raw_result = self._migrate_mongo_db_collection_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_mongo_db_collection_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_mongo_db_collection_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToAutoscale"} # type: ignore def _migrate_mongo_db_collection_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_mongo_db_collection_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_mongo_db_collection_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_mongo_db_collection_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_mongo_db_collection_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3221,34 +4483,29 @@ def _migrate_mongo_db_collection_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_mongo_db_collection_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_mongo_db_collection_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def begin_migrate_mongo_db_collection_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - collection_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3261,150 +4518,171 @@ def begin_migrate_mongo_db_collection_to_manual_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_mongo_db_collection_to_manual_throughput_initial( + raw_result = self._migrate_mongo_db_collection_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_mongo_db_collection_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_mongo_db_collection_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def get_mongo_role_definition( - self, - mongo_role_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.MongoRoleDefinitionGetResults": + self, mongo_role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.MongoRoleDefinitionGetResults: """Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. - :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. + :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. Required. :type mongo_role_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: MongoRoleDefinitionGetResults, or the result of cls(response) + :return: MongoRoleDefinitionGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.MongoRoleDefinitionGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoRoleDefinitionGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoRoleDefinitionGetResults] - request = build_get_mongo_role_definition_request( mongo_role_definition_id=mongo_role_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_mongo_role_definition.metadata['url'], + template_url=self.get_mongo_role_definition.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('MongoRoleDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("MongoRoleDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_mongo_role_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore - + get_mongo_role_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore def _create_update_mongo_role_definition_initial( self, mongo_role_definition_id: str, resource_group_name: str, account_name: str, - create_update_mongo_role_definition_parameters: "_models.MongoRoleDefinitionCreateUpdateParameters", + create_update_mongo_role_definition_parameters: Union[_models.MongoRoleDefinitionCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.MongoRoleDefinitionGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MongoRoleDefinitionGetResults"]] + ) -> Optional[_models.MongoRoleDefinitionGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_mongo_role_definition_parameters, 'MongoRoleDefinitionCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.MongoRoleDefinitionGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_mongo_role_definition_parameters, (IO, bytes)): + _content = create_update_mongo_role_definition_parameters + else: + _json = self._serialize.body( + create_update_mongo_role_definition_parameters, "MongoRoleDefinitionCreateUpdateParameters" + ) - request = build_create_update_mongo_role_definition_request_initial( + request = build_create_update_mongo_role_definition_request( mongo_role_definition_id=mongo_role_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_mongo_role_definition_initial.metadata['url'], + content=_content, + template_url=self._create_update_mongo_role_definition_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3413,15 +4691,97 @@ def _create_update_mongo_role_definition_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MongoRoleDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("MongoRoleDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_mongo_role_definition_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore + _create_update_mongo_role_definition_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore + + @overload + def begin_create_update_mongo_role_definition( + self, + mongo_role_definition_id: str, + resource_group_name: str, + account_name: str, + create_update_mongo_role_definition_parameters: _models.MongoRoleDefinitionCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MongoRoleDefinitionGetResults]: + """Creates or updates an Azure Cosmos DB Mongo Role Definition. + + :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. Required. + :type mongo_role_definition_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_mongo_role_definition_parameters: The properties required to create or + update a Role Definition. Required. + :type create_update_mongo_role_definition_parameters: + ~azure.mgmt.cosmosdb.models.MongoRoleDefinitionCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MongoRoleDefinitionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.MongoRoleDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_mongo_role_definition( + self, + mongo_role_definition_id: str, + resource_group_name: str, + account_name: str, + create_update_mongo_role_definition_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MongoRoleDefinitionGetResults]: + """Creates or updates an Azure Cosmos DB Mongo Role Definition. + :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. Required. + :type mongo_role_definition_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_mongo_role_definition_parameters: The properties required to create or + update a Role Definition. Required. + :type create_update_mongo_role_definition_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MongoRoleDefinitionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.MongoRoleDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_mongo_role_definition( @@ -3429,21 +4789,25 @@ def begin_create_update_mongo_role_definition( mongo_role_definition_id: str, resource_group_name: str, account_name: str, - create_update_mongo_role_definition_parameters: "_models.MongoRoleDefinitionCreateUpdateParameters", + create_update_mongo_role_definition_parameters: Union[_models.MongoRoleDefinitionCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.MongoRoleDefinitionGetResults"]: + ) -> LROPoller[_models.MongoRoleDefinitionGetResults]: """Creates or updates an Azure Cosmos DB Mongo Role Definition. - :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. + :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. Required. :type mongo_role_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param create_update_mongo_role_definition_parameters: The properties required to create or - update a Role Definition. + update a Role Definition. Is either a model type or a IO type. Required. :type create_update_mongo_role_definition_parameters: - ~azure.mgmt.cosmosdb.models.MongoRoleDefinitionCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.MongoRoleDefinitionCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -3456,84 +4820,89 @@ def begin_create_update_mongo_role_definition( result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.MongoRoleDefinitionGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoRoleDefinitionGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoRoleDefinitionGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_mongo_role_definition_initial( + raw_result = self._create_update_mongo_role_definition_initial( # type: ignore mongo_role_definition_id=mongo_role_definition_id, resource_group_name=resource_group_name, account_name=account_name, create_update_mongo_role_definition_parameters=create_update_mongo_role_definition_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('MongoRoleDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("MongoRoleDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_mongo_role_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore + begin_create_update_mongo_role_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore def _delete_mongo_role_definition_initial( # pylint: disable=inconsistent-return-statements - self, - mongo_role_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + self, mongo_role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_mongo_role_definition_request_initial( + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_mongo_role_definition_request( mongo_role_definition_id=mongo_role_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_mongo_role_definition_initial.metadata['url'], + template_url=self._delete_mongo_role_definition_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -3543,24 +4912,20 @@ def _delete_mongo_role_definition_initial( # pylint: disable=inconsistent-retur if cls: return cls(pipeline_response, None, {}) - _delete_mongo_role_definition_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore - + _delete_mongo_role_definition_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore @distributed_trace - def begin_delete_mongo_role_definition( # pylint: disable=inconsistent-return-statements - self, - mongo_role_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + def begin_delete_mongo_role_definition( + self, mongo_role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB Mongo Role Definition. - :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. + :param mongo_role_definition_id: The ID for the Role Definition {dbName.roleName}. Required. :type mongo_role_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3572,96 +4937,104 @@ def begin_delete_mongo_role_definition( # pylint: disable=inconsistent-return-s Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_mongo_role_definition_initial( + raw_result = self._delete_mongo_role_definition_initial( # type: ignore mongo_role_definition_id=mongo_role_definition_id, resource_group_name=resource_group_name, account_name=account_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_mongo_role_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore + begin_delete_mongo_role_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}"} # type: ignore @distributed_trace def list_mongo_role_definitions( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.MongoRoleDefinitionListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.MongoRoleDefinitionGetResults"]: """Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MongoRoleDefinitionListResult or the result of + :return: An iterator like instance of either MongoRoleDefinitionGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MongoRoleDefinitionListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MongoRoleDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoRoleDefinitionListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoRoleDefinitionListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_mongo_role_definitions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_mongo_role_definitions.metadata['url'], + template_url=self.list_mongo_role_definitions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_mongo_role_definitions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -3675,10 +5048,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -3688,112 +5059,128 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_mongo_role_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions"} # type: ignore + list_mongo_role_definitions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions"} # type: ignore @distributed_trace def get_mongo_user_definition( - self, - mongo_user_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.MongoUserDefinitionGetResults": + self, mongo_user_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.MongoUserDefinitionGetResults: """Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. - :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. + :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. Required. :type mongo_user_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: MongoUserDefinitionGetResults, or the result of cls(response) + :return: MongoUserDefinitionGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.MongoUserDefinitionGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoUserDefinitionGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoUserDefinitionGetResults] - request = build_get_mongo_user_definition_request( mongo_user_definition_id=mongo_user_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_mongo_user_definition.metadata['url'], + template_url=self.get_mongo_user_definition.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('MongoUserDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("MongoUserDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_mongo_user_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore - + get_mongo_user_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore def _create_update_mongo_user_definition_initial( self, mongo_user_definition_id: str, resource_group_name: str, account_name: str, - create_update_mongo_user_definition_parameters: "_models.MongoUserDefinitionCreateUpdateParameters", + create_update_mongo_user_definition_parameters: Union[_models.MongoUserDefinitionCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.MongoUserDefinitionGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MongoUserDefinitionGetResults"]] + ) -> Optional[_models.MongoUserDefinitionGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_mongo_user_definition_parameters, 'MongoUserDefinitionCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.MongoUserDefinitionGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_mongo_user_definition_parameters, (IO, bytes)): + _content = create_update_mongo_user_definition_parameters + else: + _json = self._serialize.body( + create_update_mongo_user_definition_parameters, "MongoUserDefinitionCreateUpdateParameters" + ) - request = build_create_update_mongo_user_definition_request_initial( + request = build_create_update_mongo_user_definition_request( mongo_user_definition_id=mongo_user_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_mongo_user_definition_initial.metadata['url'], + content=_content, + template_url=self._create_update_mongo_user_definition_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3802,15 +5189,97 @@ def _create_update_mongo_user_definition_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MongoUserDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("MongoUserDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_mongo_user_definition_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore + _create_update_mongo_user_definition_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore + + @overload + def begin_create_update_mongo_user_definition( + self, + mongo_user_definition_id: str, + resource_group_name: str, + account_name: str, + create_update_mongo_user_definition_parameters: _models.MongoUserDefinitionCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MongoUserDefinitionGetResults]: + """Creates or updates an Azure Cosmos DB Mongo User Definition. + + :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. Required. + :type mongo_user_definition_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_mongo_user_definition_parameters: The properties required to create or + update a User Definition. Required. + :type create_update_mongo_user_definition_parameters: + ~azure.mgmt.cosmosdb.models.MongoUserDefinitionCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MongoUserDefinitionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.MongoUserDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_mongo_user_definition( + self, + mongo_user_definition_id: str, + resource_group_name: str, + account_name: str, + create_update_mongo_user_definition_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MongoUserDefinitionGetResults]: + """Creates or updates an Azure Cosmos DB Mongo User Definition. + :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. Required. + :type mongo_user_definition_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_mongo_user_definition_parameters: The properties required to create or + update a User Definition. Required. + :type create_update_mongo_user_definition_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MongoUserDefinitionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.MongoUserDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_mongo_user_definition( @@ -3818,21 +5287,25 @@ def begin_create_update_mongo_user_definition( mongo_user_definition_id: str, resource_group_name: str, account_name: str, - create_update_mongo_user_definition_parameters: "_models.MongoUserDefinitionCreateUpdateParameters", + create_update_mongo_user_definition_parameters: Union[_models.MongoUserDefinitionCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.MongoUserDefinitionGetResults"]: + ) -> LROPoller[_models.MongoUserDefinitionGetResults]: """Creates or updates an Azure Cosmos DB Mongo User Definition. - :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. + :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. Required. :type mongo_user_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param create_update_mongo_user_definition_parameters: The properties required to create or - update a User Definition. + update a User Definition. Is either a model type or a IO type. Required. :type create_update_mongo_user_definition_parameters: - ~azure.mgmt.cosmosdb.models.MongoUserDefinitionCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.MongoUserDefinitionCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -3845,84 +5318,89 @@ def begin_create_update_mongo_user_definition( result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.MongoUserDefinitionGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoUserDefinitionGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoUserDefinitionGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_mongo_user_definition_initial( + raw_result = self._create_update_mongo_user_definition_initial( # type: ignore mongo_user_definition_id=mongo_user_definition_id, resource_group_name=resource_group_name, account_name=account_name, create_update_mongo_user_definition_parameters=create_update_mongo_user_definition_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('MongoUserDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("MongoUserDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_mongo_user_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore + begin_create_update_mongo_user_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore def _delete_mongo_user_definition_initial( # pylint: disable=inconsistent-return-statements - self, - mongo_user_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + self, mongo_user_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_mongo_user_definition_request_initial( + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_mongo_user_definition_request( mongo_user_definition_id=mongo_user_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_mongo_user_definition_initial.metadata['url'], + template_url=self._delete_mongo_user_definition_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -3932,24 +5410,20 @@ def _delete_mongo_user_definition_initial( # pylint: disable=inconsistent-retur if cls: return cls(pipeline_response, None, {}) - _delete_mongo_user_definition_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore - + _delete_mongo_user_definition_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore @distributed_trace - def begin_delete_mongo_user_definition( # pylint: disable=inconsistent-return-statements - self, - mongo_user_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + def begin_delete_mongo_user_definition( + self, mongo_user_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB Mongo User Definition. - :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. + :param mongo_user_definition_id: The ID for the User Definition {dbName.userName}. Required. :type mongo_user_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3961,96 +5435,104 @@ def begin_delete_mongo_user_definition( # pylint: disable=inconsistent-return-s Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_mongo_user_definition_initial( + raw_result = self._delete_mongo_user_definition_initial( # type: ignore mongo_user_definition_id=mongo_user_definition_id, resource_group_name=resource_group_name, account_name=account_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_mongo_user_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore + begin_delete_mongo_user_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}"} # type: ignore @distributed_trace def list_mongo_user_definitions( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.MongoUserDefinitionListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.MongoUserDefinitionGetResults"]: """Retrieves the list of all Azure Cosmos DB Mongo User Definition. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either MongoUserDefinitionListResult or the result of + :return: An iterator like instance of either MongoUserDefinitionGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MongoUserDefinitionListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.MongoUserDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.MongoUserDefinitionListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.MongoUserDefinitionListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_mongo_user_definitions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_mongo_user_definitions.metadata['url'], + template_url=self.list_mongo_user_definitions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_mongo_user_definitions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -4064,10 +5546,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4077,11 +5557,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_mongo_user_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions"} # type: ignore + list_mongo_user_definitions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions"} # type: ignore def _retrieve_continuous_backup_information_initial( self, @@ -4089,39 +5567,53 @@ def _retrieve_continuous_backup_information_initial( account_name: str, database_name: str, collection_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> Optional["_models.BackupInformation"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupInformation"]] + ) -> Optional[_models.BackupInformation]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(location, 'ContinuousBackupRestoreLocation') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.BackupInformation]] - request = build_retrieve_continuous_backup_information_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(location, (IO, bytes)): + _content = location + else: + _json = self._serialize.body(location, "ContinuousBackupRestoreLocation") + + request = build_retrieve_continuous_backup_information_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, collection_name=collection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._retrieve_continuous_backup_information_initial.metadata['url'], + content=_content, + template_url=self._retrieve_continuous_backup_information_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4130,15 +5622,98 @@ def _retrieve_continuous_backup_information_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _retrieve_continuous_backup_information_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation"} # type: ignore + _retrieve_continuous_backup_information_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation"} # type: ignore + + @overload + def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + location: _models.ContinuousBackupRestoreLocation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a Mongodb collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + location: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a Mongodb collection. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param collection_name: Cosmos DB collection name. Required. + :type collection_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_retrieve_continuous_backup_information( @@ -4147,21 +5722,26 @@ def begin_retrieve_continuous_backup_information( account_name: str, database_name: str, collection_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> LROPoller["_models.BackupInformation"]: + ) -> LROPoller[_models.BackupInformation]: """Retrieves continuous backup information for a Mongodb collection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param collection_name: Cosmos DB collection name. + :param collection_name: Cosmos DB collection name. Required. :type collection_name: str - :param location: The name of the continuous backup restore location. - :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :param location: The name of the continuous backup restore location. Is either a model type or + a IO type. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -4173,19 +5753,19 @@ def begin_retrieve_continuous_backup_information( :return: An instance of LROPoller that returns either BackupInformation or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupInformation] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._retrieve_continuous_backup_information_initial( + raw_result = self._retrieve_continuous_backup_information_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -4193,29 +5773,34 @@ def begin_retrieve_continuous_backup_information( location=location, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_retrieve_continuous_backup_information.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation"} # type: ignore + begin_retrieve_continuous_backup_information.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_notebook_workspaces_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_notebook_workspaces_operations.py index a4e7d76789a..c86c348e189 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_notebook_workspaces_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_notebook_workspaces_operations.py @@ -6,372 +6,388 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_by_database_account_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_request( - subscription_id: str, resource_group_name: str, account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "notebookWorkspaceName": _SERIALIZER.url("notebook_workspace_name", notebook_workspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "notebookWorkspaceName": _SERIALIZER.url("notebook_workspace_name", notebook_workspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_or_update_request_initial( - subscription_id: str, +def build_create_or_update_request( resource_group_name: str, account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "notebookWorkspaceName": _SERIALIZER.url("notebook_workspace_name", notebook_workspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "notebookWorkspaceName": _SERIALIZER.url("notebook_workspace_name", notebook_workspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_request_initial( - subscription_id: str, +def build_delete_request( resource_group_name: str, account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "notebookWorkspaceName": _SERIALIZER.url("notebook_workspace_name", notebook_workspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "notebookWorkspaceName": _SERIALIZER.url("notebook_workspace_name", notebook_workspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) def build_list_connection_info_request( - subscription_id: str, resource_group_name: str, account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/listConnectionInfo") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/listConnectionInfo", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "notebookWorkspaceName": _SERIALIZER.url("notebook_workspace_name", notebook_workspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "notebookWorkspaceName": _SERIALIZER.url("notebook_workspace_name", notebook_workspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_regenerate_auth_token_request_initial( - subscription_id: str, +def build_regenerate_auth_token_request( resource_group_name: str, account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "notebookWorkspaceName": _SERIALIZER.url("notebook_workspace_name", notebook_workspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "notebookWorkspaceName": _SERIALIZER.url("notebook_workspace_name", notebook_workspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_start_request_initial( - subscription_id: str, +def build_start_request( resource_group_name: str, account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "notebookWorkspaceName": _SERIALIZER.url("notebook_workspace_name", notebook_workspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "notebookWorkspaceName": _SERIALIZER.url("notebook_workspace_name", notebook_workspace_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class NotebookWorkspacesOperations(object): - """NotebookWorkspacesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class NotebookWorkspacesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`notebook_workspaces` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_database_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.NotebookWorkspaceListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.NotebookWorkspace"]: """Gets the notebook workspace resources of an existing Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NotebookWorkspaceListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.NotebookWorkspaceListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either NotebookWorkspace or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.NotebookWorkspace] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.NotebookWorkspaceListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookWorkspaceListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_database_account.metadata['url'], + template_url=self.list_by_database_account.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -385,10 +401,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -399,11 +413,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_database_account.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces"} # type: ignore + list_by_database_account.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces"} # type: ignore @distributed_trace def get( @@ -412,45 +424,53 @@ def get( account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any - ) -> "_models.NotebookWorkspace": + ) -> _models.NotebookWorkspace: """Gets the notebook workspace for a Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param notebook_workspace_name: The name of the notebook workspace resource. + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName :keyword callable cls: A custom type or function that will be passed the direct response - :return: NotebookWorkspace, or the result of cls(response) + :return: NotebookWorkspace or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.NotebookWorkspace - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookWorkspace"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.NotebookWorkspace] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: @@ -458,68 +478,164 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('NotebookWorkspace', pipeline_response) + deserialized = self._deserialize("NotebookWorkspace", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore def _create_or_update_initial( self, resource_group_name: str, account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], - notebook_create_update_parameters: "_models.NotebookWorkspaceCreateUpdateParameters", + notebook_create_update_parameters: Union[_models.NotebookWorkspaceCreateUpdateParameters, IO], **kwargs: Any - ) -> "_models.NotebookWorkspace": - cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookWorkspace"] + ) -> _models.NotebookWorkspace: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(notebook_create_update_parameters, 'NotebookWorkspaceCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.NotebookWorkspace] - request = build_create_or_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(notebook_create_update_parameters, (IO, bytes)): + _content = notebook_create_update_parameters + else: + _json = self._serialize.body(notebook_create_update_parameters, "NotebookWorkspaceCreateUpdateParameters") + + request = build_create_or_update_request( resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_or_update_initial.metadata['url'], + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('NotebookWorkspace', pipeline_response) + deserialized = self._deserialize("NotebookWorkspace", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore + @overload + def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], + notebook_create_update_parameters: _models.NotebookWorkspaceCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NotebookWorkspace]: + """Creates the notebook workspace for a Cosmos DB account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. + :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName + :param notebook_create_update_parameters: The notebook workspace to create for the current + database account. Required. + :type notebook_create_update_parameters: + ~azure.mgmt.cosmosdb.models.NotebookWorkspaceCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either NotebookWorkspace or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.NotebookWorkspace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], + notebook_create_update_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NotebookWorkspace]: + """Creates the notebook workspace for a Cosmos DB account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. + :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName + :param notebook_create_update_parameters: The notebook workspace to create for the current + database account. Required. + :type notebook_create_update_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either NotebookWorkspace or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.NotebookWorkspace] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_or_update( @@ -527,21 +643,26 @@ def begin_create_or_update( resource_group_name: str, account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], - notebook_create_update_parameters: "_models.NotebookWorkspaceCreateUpdateParameters", + notebook_create_update_parameters: Union[_models.NotebookWorkspaceCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.NotebookWorkspace"]: + ) -> LROPoller[_models.NotebookWorkspace]: """Creates the notebook workspace for a Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param notebook_workspace_name: The name of the notebook workspace resource. + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName :param notebook_create_update_parameters: The notebook workspace to create for the current - database account. + database account. Is either a model type or a IO type. Required. :type notebook_create_update_parameters: - ~azure.mgmt.cosmosdb.models.NotebookWorkspaceCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.NotebookWorkspaceCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -553,51 +674,54 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either NotebookWorkspace or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.NotebookWorkspace] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookWorkspace"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.NotebookWorkspace] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._create_or_update_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, notebook_create_update_parameters=notebook_create_update_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('NotebookWorkspace', pipeline_response) + deserialized = self._deserialize("NotebookWorkspace", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore def _delete_initial( # pylint: disable=inconsistent-return-statements self, @@ -606,45 +730,51 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_request( resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements + def begin_delete( self, resource_group_name: str, account_name: str, @@ -654,10 +784,12 @@ def begin_delete( # pylint: disable=inconsistent-return-statements """Deletes the notebook workspace for a Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param notebook_workspace_name: The name of the notebook workspace resource. + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -669,45 +801,49 @@ def begin_delete( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}"} # type: ignore @distributed_trace def list_connection_info( @@ -716,45 +852,53 @@ def list_connection_info( account_name: str, notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any - ) -> "_models.NotebookWorkspaceConnectionInfoResult": + ) -> _models.NotebookWorkspaceConnectionInfoResult: """Retrieves the connection info for the notebook workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param notebook_workspace_name: The name of the notebook workspace resource. + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName :keyword callable cls: A custom type or function that will be passed the direct response - :return: NotebookWorkspaceConnectionInfoResult, or the result of cls(response) + :return: NotebookWorkspaceConnectionInfoResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.NotebookWorkspaceConnectionInfoResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookWorkspaceConnectionInfoResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.NotebookWorkspaceConnectionInfoResult] - request = build_list_connection_info_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_connection_info.metadata['url'], + template_url=self.list_connection_info.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: @@ -762,15 +906,14 @@ def list_connection_info( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('NotebookWorkspaceConnectionInfoResult', pipeline_response) + deserialized = self._deserialize("NotebookWorkspaceConnectionInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_connection_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/listConnectionInfo"} # type: ignore - + list_connection_info.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/listConnectionInfo"} # type: ignore def _regenerate_auth_token_initial( # pylint: disable=inconsistent-return-statements self, @@ -779,45 +922,51 @@ def _regenerate_auth_token_initial( # pylint: disable=inconsistent-return-state notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_regenerate_auth_token_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_regenerate_auth_token_request( resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._regenerate_auth_token_initial.metadata['url'], + template_url=self._regenerate_auth_token_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _regenerate_auth_token_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken"} # type: ignore - + _regenerate_auth_token_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken"} # type: ignore @distributed_trace - def begin_regenerate_auth_token( # pylint: disable=inconsistent-return-statements + def begin_regenerate_auth_token( self, resource_group_name: str, account_name: str, @@ -827,10 +976,12 @@ def begin_regenerate_auth_token( # pylint: disable=inconsistent-return-statemen """Regenerates the auth token for the notebook workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param notebook_workspace_name: The name of the notebook workspace resource. + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -842,45 +993,49 @@ def begin_regenerate_auth_token( # pylint: disable=inconsistent-return-statemen Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._regenerate_auth_token_initial( + raw_result = self._regenerate_auth_token_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_regenerate_auth_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken"} # type: ignore + begin_regenerate_auth_token.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken"} # type: ignore def _start_initial( # pylint: disable=inconsistent-return-statements self, @@ -889,45 +1044,51 @@ def _start_initial( # pylint: disable=inconsistent-return-statements notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_start_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_start_request( resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._start_initial.metadata['url'], + template_url=self._start_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _start_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start"} # type: ignore - + _start_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start"} # type: ignore @distributed_trace - def begin_start( # pylint: disable=inconsistent-return-statements + def begin_start( self, resource_group_name: str, account_name: str, @@ -937,10 +1098,12 @@ def begin_start( # pylint: disable=inconsistent-return-statements """Starts the notebook workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param notebook_workspace_name: The name of the notebook workspace resource. + :param notebook_workspace_name: The name of the notebook workspace resource. "default" + Required. :type notebook_workspace_name: str or ~azure.mgmt.cosmosdb.models.NotebookWorkspaceName :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -952,42 +1115,46 @@ def begin_start( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._start_initial( + raw_result = self._start_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, notebook_workspace_name=notebook_workspace_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start"} # type: ignore + begin_start.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_operations.py index ff8038534f1..4bec30f6d60 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_operations.py @@ -7,109 +7,116 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request( - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - accept = "application/json" +def build_list_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL _url = kwargs.pop("template_url", "/providers/Microsoft.DocumentDB/operations") # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class Operations(object): - """Operations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`operations` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list( - self, - **kwargs: Any - ) -> Iterable["_models.OperationListResult"]: + def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: """Lists all of the available Cosmos DB Resource Provider operations. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.OperationListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either Operation or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.OperationListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -123,10 +130,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -136,8 +141,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/providers/Microsoft.DocumentDB/operations"} # type: ignore + list.metadata = {"url": "/providers/Microsoft.DocumentDB/operations"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_partition_key_range_id_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_partition_key_range_id_operations.py index a7ae86697b3..ddbdac183b8 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_partition_key_range_id_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_partition_key_range_id_operations.py @@ -7,90 +7,100 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_metrics_request( - subscription_id: str, resource_group_name: str, account_name: str, database_rid: str, collection_rid: str, partition_key_range_id: str, + subscription_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseRid": _SERIALIZER.url("database_rid", database_rid, 'str'), - "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, 'str'), - "partitionKeyRangeId": _SERIALIZER.url("partition_key_range_id", partition_key_range_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseRid": _SERIALIZER.url("database_rid", database_rid, "str"), + "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, "str"), + "partitionKeyRangeId": _SERIALIZER.url("partition_key_range_id", partition_key_range_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class PartitionKeyRangeIdOperations(object): - """PartitionKeyRangeIdOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class PartitionKeyRangeIdOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`partition_key_range_id` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -102,68 +112,70 @@ def list_metrics( partition_key_range_id: str, filter: str, **kwargs: Any - ) -> Iterable["_models.PartitionMetricListResult"]: + ) -> Iterable["_models.PartitionMetric"]: """Retrieves the metrics determined by the given filter for the given partition key range id. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str - :param partition_key_range_id: Partition Key Range Id for which to get data. + :param partition_key_range_id: Partition Key Range Id for which to get data. Required. :type partition_key_range_id: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartitionMetricListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PartitionMetric or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PartitionMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_rid=database_rid, collection_rid=collection_rid, partition_key_range_id=partition_key_range_id, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, - partition_key_range_id=partition_key_range_id, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -177,10 +189,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -190,8 +200,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_partition_key_range_id_region_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_partition_key_range_id_region_operations.py index 25808d9c5b0..406cbbabf4d 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_partition_key_range_id_region_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_partition_key_range_id_region_operations.py @@ -7,92 +7,102 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_metrics_request( - subscription_id: str, resource_group_name: str, account_name: str, region: str, database_rid: str, collection_rid: str, partition_key_range_id: str, + subscription_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "region": _SERIALIZER.url("region", region, 'str'), - "databaseRid": _SERIALIZER.url("database_rid", database_rid, 'str'), - "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, 'str'), - "partitionKeyRangeId": _SERIALIZER.url("partition_key_range_id", partition_key_range_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "region": _SERIALIZER.url("region", region, "str"), + "databaseRid": _SERIALIZER.url("database_rid", database_rid, "str"), + "collectionRid": _SERIALIZER.url("collection_rid", collection_rid, "str"), + "partitionKeyRangeId": _SERIALIZER.url("partition_key_range_id", partition_key_range_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class PartitionKeyRangeIdRegionOperations(object): - """PartitionKeyRangeIdRegionOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class PartitionKeyRangeIdRegionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`partition_key_range_id_region` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -105,73 +115,74 @@ def list_metrics( partition_key_range_id: str, filter: str, **kwargs: Any - ) -> Iterable["_models.PartitionMetricListResult"]: + ) -> Iterable["_models.PartitionMetric"]: """Retrieves the metrics determined by the given filter for the given partition key range id and region. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param region: Cosmos DB region, with spaces between words and each word capitalized. + :param region: Cosmos DB region, with spaces between words and each word capitalized. Required. :type region: str - :param database_rid: Cosmos DB database rid. + :param database_rid: Cosmos DB database rid. Required. :type database_rid: str - :param collection_rid: Cosmos DB collection rid. + :param collection_rid: Cosmos DB collection rid. Required. :type collection_rid: str - :param partition_key_range_id: Partition Key Range Id for which to get data. + :param partition_key_range_id: Partition Key Range Id for which to get data. Required. :type partition_key_range_id: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartitionMetricListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PartitionMetric or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PartitionMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PartitionMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, region=region, database_rid=database_rid, collection_rid=collection_rid, partition_key_range_id=partition_key_range_id, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - region=region, - database_rid=database_rid, - collection_rid=collection_rid, - partition_key_range_id=partition_key_range_id, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -185,10 +196,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -198,8 +207,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_patch.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_patch.py new file mode 100644 index 00000000000..f7dd3251033 --- /dev/null +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_operations.py index c4909dac882..3d1d1b2a8ea 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_operations.py @@ -7,143 +7,149 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_metrics_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - filter: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class PercentileOperations(object): - """PercentileOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class PercentileOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`percentile` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( - self, - resource_group_name: str, - account_name: str, - filter: str, - **kwargs: Any - ) -> Iterable["_models.PercentileMetricListResult"]: + self, resource_group_name: str, account_name: str, filter: str, **kwargs: Any + ) -> Iterable["_models.PercentileMetric"]: """Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PercentileMetricListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PercentileMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PercentileMetric or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PercentileMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PercentileMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PercentileMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -157,10 +163,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -170,8 +174,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_source_target_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_source_target_operations.py index e37f1a7c5b5..9d02dced09c 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_source_target_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_source_target_operations.py @@ -7,88 +7,98 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_metrics_request( - subscription_id: str, resource_group_name: str, account_name: str, source_region: str, target_region: str, + subscription_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "sourceRegion": _SERIALIZER.url("source_region", source_region, 'str'), - "targetRegion": _SERIALIZER.url("target_region", target_region, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "sourceRegion": _SERIALIZER.url("source_region", source_region, "str"), + "targetRegion": _SERIALIZER.url("target_region", target_region, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class PercentileSourceTargetOperations(object): - """PercentileSourceTargetOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class PercentileSourceTargetOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`percentile_source_target` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( @@ -99,67 +109,70 @@ def list_metrics( target_region: str, filter: str, **kwargs: Any - ) -> Iterable["_models.PercentileMetricListResult"]: + ) -> Iterable["_models.PercentileMetric"]: """Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param source_region: Source region from which data is written. Cosmos DB region, with spaces - between words and each word capitalized. + between words and each word capitalized. Required. :type source_region: str :param target_region: Target region to which data is written. Cosmos DB region, with spaces - between words and each word capitalized. + between words and each word capitalized. Required. :type target_region: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PercentileMetricListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PercentileMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PercentileMetric or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PercentileMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PercentileMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PercentileMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, source_region=source_region, target_region=target_region, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - source_region=source_region, - target_region=target_region, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -173,10 +186,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -186,8 +197,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_target_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_target_operations.py index d23d3ff6cee..3e953891aa9 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_target_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_target_operations.py @@ -7,151 +7,154 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_metrics_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - target_region: str, - *, - filter: str, - **kwargs: Any + resource_group_name: str, account_name: str, target_region: str, subscription_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "targetRegion": _SERIALIZER.url("target_region", target_region, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "targetRegion": _SERIALIZER.url("target_region", target_region, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class PercentileTargetOperations(object): - """PercentileTargetOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class PercentileTargetOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`percentile_target` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_metrics( - self, - resource_group_name: str, - account_name: str, - target_region: str, - filter: str, - **kwargs: Any - ) -> Iterable["_models.PercentileMetricListResult"]: + self, resource_group_name: str, account_name: str, target_region: str, filter: str, **kwargs: Any + ) -> Iterable["_models.PercentileMetric"]: """Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param target_region: Target region to which data is written. Cosmos DB region, with spaces - between words and each word capitalized. + between words and each word capitalized. Required. :type target_region: str :param filter: An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple - names), startTime, endTime, and timeGrain. The supported operator is eq. + names), startTime, endTime, and timeGrain. The supported operator is eq. Required. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PercentileMetricListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PercentileMetricListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PercentileMetric or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PercentileMetric] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PercentileMetricListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PercentileMetricListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_metrics_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, target_region=target_region, - api_version=api_version, + subscription_id=self._config.subscription_id, filter=filter, - template_url=self.list_metrics.metadata['url'], + api_version=api_version, + template_url=self.list_metrics.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_metrics_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - target_region=target_region, - api_version=api_version, - filter=filter, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -165,10 +168,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -178,8 +179,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics"} # type: ignore + list_metrics.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_private_endpoint_connections_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_private_endpoint_connections_operations.py index f34d74af772..bcb27156c85 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_private_endpoint_connections_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_private_endpoint_connections_operations.py @@ -6,259 +6,275 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_by_database_account_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_request( - subscription_id: str, resource_group_name: str, account_name: str, private_endpoint_connection_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_or_update_request_initial( - subscription_id: str, +def build_create_or_update_request( resource_group_name: str, account_name: str, private_endpoint_connection_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_request_initial( - subscription_id: str, +def build_delete_request( resource_group_name: str, account_name: str, private_endpoint_connection_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`private_endpoint_connections` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_database_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.PrivateEndpointConnectionListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.PrivateEndpointConnection"]: """List all private endpoint connections on a Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result - of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PrivateEndpointConnectionListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PrivateEndpointConnection or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PrivateEndpointConnectionListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_database_account.metadata['url'], + template_url=self.list_by_database_account.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -272,10 +288,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -285,128 +299,220 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_database_account.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections"} # type: ignore + list_by_database_account.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections"} # type: ignore @distributed_trace def get( - self, - resource_group_name: str, - account_name: str, - private_endpoint_connection_name: str, - **kwargs: Any - ) -> "_models.PrivateEndpointConnection": + self, resource_group_name: str, account_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: """Gets a private endpoint connection. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PrivateEndpointConnection, or the result of cls(response) + :return: PrivateEndpointConnection or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.PrivateEndpointConnection - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PrivateEndpointConnection] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _create_or_update_initial( self, resource_group_name: str, account_name: str, private_endpoint_connection_name: str, - parameters: "_models.PrivateEndpointConnection", + parameters: Union[_models.PrivateEndpointConnection, IO], **kwargs: Any - ) -> Optional["_models.PrivateEndpointConnection"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] + ) -> Optional[_models.PrivateEndpointConnection]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(parameters, 'PrivateEndpointConnection') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PrivateEndpointConnection]] - request = build_create_or_update_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "PrivateEndpointConnection") + + request = build_create_or_update_request( resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_or_update_initial.metadata['url'], + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + @overload + def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + private_endpoint_connection_name: str, + parameters: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: Required. + :type parameters: ~azure.mgmt.cosmosdb.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + private_endpoint_connection_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_or_update( @@ -414,19 +520,23 @@ def begin_create_or_update( resource_group_name: str, account_name: str, private_endpoint_connection_name: str, - parameters: "_models.PrivateEndpointConnection", + parameters: Union[_models.PrivateEndpointConnection, IO], **kwargs: Any - ) -> LROPoller["_models.PrivateEndpointConnection"]: + ) -> LROPoller[_models.PrivateEndpointConnection]: """Approve or reject a private endpoint connection with a given name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: - :type parameters: ~azure.mgmt.cosmosdb.models.PrivateEndpointConnection + :param parameters: Is either a model type or a IO type. Required. + :type parameters: ~azure.mgmt.cosmosdb.models.PrivateEndpointConnection or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -438,111 +548,113 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PrivateEndpointConnection] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._create_or_update_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, parameters=parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - private_endpoint_connection_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_request( resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - private_endpoint_connection_name: str, - **kwargs: Any + def begin_delete( + self, resource_group_name: str, account_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes a private endpoint connection with a given name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -554,42 +666,46 @@ def begin_delete( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_private_link_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_private_link_resources_operations.py index 2b9a71f3442..b642a17acb8 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_private_link_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_private_link_resources_operations.py @@ -7,170 +7,178 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_by_database_account_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - group_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources/{groupName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources/{groupName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "groupName": _SERIALIZER.url("group_name", group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "groupName": _SERIALIZER.url("group_name", group_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class PrivateLinkResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`private_link_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_database_account( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.PrivateLinkResourceListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.PrivateLinkResource"]: """Gets the private link resources that need to be created for a Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PrivateLinkResourceListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PrivateLinkResourceListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either PrivateLinkResource or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.PrivateLinkResource] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PrivateLinkResourceListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_database_account.metadata['url'], + template_url=self.list_by_database_account.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_database_account_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -184,10 +192,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -197,70 +203,70 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_database_account.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources"} # type: ignore + list_by_database_account.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources"} # type: ignore @distributed_trace def get( - self, - resource_group_name: str, - account_name: str, - group_name: str, - **kwargs: Any - ) -> "_models.PrivateLinkResource": + self, resource_group_name: str, account_name: str, group_name: str, **kwargs: Any + ) -> _models.PrivateLinkResource: """Gets the private link resources that need to be created for a Cosmos DB account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param group_name: The name of the private link resource. + :param group_name: The name of the private link resource. Required. :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PrivateLinkResource, or the result of cls(response) + :return: PrivateLinkResource or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.PrivateLinkResource - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PrivateLinkResource] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, group_name=group_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + deserialized = self._deserialize("PrivateLinkResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources/{groupName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources/{groupName}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_database_accounts_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_database_accounts_operations.py index 063c6dcb961..f3d4df56dcb 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_database_accounts_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_database_accounts_operations.py @@ -7,196 +7,189 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_by_location_request( - subscription_id: str, - location: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - accept = "application/json" +def build_list_by_location_request(location: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_list_request( - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str +def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts" + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_by_location_request( - subscription_id: str, - location: str, - instance_id: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - - accept = "application/json" + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_by_location_request(location: str, instance_id: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), - "instanceId": _SERIALIZER.url("instance_id", instance_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), + "instanceId": _SERIALIZER.url("instance_id", instance_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class RestorableDatabaseAccountsOperations(object): - """RestorableDatabaseAccountsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class RestorableDatabaseAccountsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`restorable_database_accounts` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list_by_location( - self, - location: str, - **kwargs: Any - ) -> Iterable["_models.RestorableDatabaseAccountsListResult"]: + def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.RestorableDatabaseAccountGetResult"]: """Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableDatabaseAccountsListResult or the result + :return: An iterator like instance of either RestorableDatabaseAccountGetResult or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableDatabaseAccountsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableDatabaseAccountsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_location_request( - subscription_id=self._config.subscription_id, location=location, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_location.metadata['url'], + template_url=self.list_by_location.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_by_location_request( - subscription_id=self._config.subscription_id, - location=location, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -210,10 +203,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -223,54 +214,57 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts"} # type: ignore + list_by_location.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts"} # type: ignore @distributed_trace - def list( - self, - **kwargs: Any - ) -> Iterable["_models.RestorableDatabaseAccountsListResult"]: + def list(self, **kwargs: Any) -> Iterable["_models.RestorableDatabaseAccountGetResult"]: """Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableDatabaseAccountsListResult or the result + :return: An iterator like instance of either RestorableDatabaseAccountGetResult or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableDatabaseAccountsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableDatabaseAccountsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -284,10 +278,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -297,67 +289,68 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts"} # type: ignore @distributed_trace def get_by_location( - self, - location: str, - instance_id: str, - **kwargs: Any - ) -> "_models.RestorableDatabaseAccountGetResult": + self, location: str, instance_id: str, **kwargs: Any + ) -> _models.RestorableDatabaseAccountGetResult: """Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RestorableDatabaseAccountGetResult, or the result of cls(response) + :return: RestorableDatabaseAccountGetResult or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountGetResult - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableDatabaseAccountGetResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableDatabaseAccountGetResult] - request = build_get_by_location_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_by_location.metadata['url'], + template_url=self.get_by_location.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RestorableDatabaseAccountGetResult', pipeline_response) + deserialized = self._deserialize("RestorableDatabaseAccountGetResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}"} # type: ignore - + get_by_location.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_gremlin_databases_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_gremlin_databases_operations.py index 99bf283f3ba..98e95c97cb7 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_gremlin_databases_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_gremlin_databases_operations.py @@ -7,136 +7,141 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request( - subscription_id: str, - location: str, - instance_id: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - accept = "application/json" +def build_list_request(location: str, instance_id: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinDatabases") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinDatabases", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), - "instanceId": _SERIALIZER.url("instance_id", instance_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), + "instanceId": _SERIALIZER.url("instance_id", instance_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class RestorableGremlinDatabasesOperations(object): - """RestorableGremlinDatabasesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class RestorableGremlinDatabasesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`restorable_gremlin_databases` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( - self, - location: str, - instance_id: str, - **kwargs: Any - ) -> Iterable["_models.RestorableGremlinDatabasesListResult"]: + self, location: str, instance_id: str, **kwargs: Any + ) -> Iterable["_models.RestorableGremlinDatabaseGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableGremlinDatabasesListResult or the result + :return: An iterator like instance of either RestorableGremlinDatabaseGetResult or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableGremlinDatabasesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableGremlinDatabaseGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableGremlinDatabasesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableGremlinDatabasesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -150,10 +155,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -163,8 +166,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinDatabases"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinDatabases"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_gremlin_graphs_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_gremlin_graphs_operations.py index 1165f5fa277..80e6df036e1 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_gremlin_graphs_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_gremlin_graphs_operations.py @@ -7,91 +7,99 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_request( - subscription_id: str, location: str, instance_id: str, + subscription_id: str, *, restorable_gremlin_database_rid: Optional[str] = None, start_time: Optional[str] = None, end_time: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGraphs") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGraphs", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), - "instanceId": _SERIALIZER.url("instance_id", instance_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), + "instanceId": _SERIALIZER.url("instance_id", instance_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if restorable_gremlin_database_rid is not None: - _query_parameters['restorableGremlinDatabaseRid'] = _SERIALIZER.query("restorable_gremlin_database_rid", restorable_gremlin_database_rid, 'str') + _params["restorableGremlinDatabaseRid"] = _SERIALIZER.query( + "restorable_gremlin_database_rid", restorable_gremlin_database_rid, "str" + ) if start_time is not None: - _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'str') + _params["startTime"] = _SERIALIZER.query("start_time", start_time, "str") if end_time is not None: - _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'str') + _params["endTime"] = _SERIALIZER.query("end_time", end_time, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class RestorableGremlinGraphsOperations(object): - """RestorableGremlinGraphsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class RestorableGremlinGraphsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`restorable_gremlin_graphs` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -102,14 +110,15 @@ def list( start_time: Optional[str] = None, end_time: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.RestorableGremlinGraphsListResult"]: + ) -> Iterable["_models.RestorableGremlinGraphGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restorable_gremlin_database_rid: The resource ID of the Gremlin database. Default value is None. @@ -119,49 +128,52 @@ def list( :param end_time: Restorable Gremlin graphs event feed end time. Default value is None. :type end_time: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableGremlinGraphsListResult or the result of + :return: An iterator like instance of either RestorableGremlinGraphGetResult or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableGremlinGraphsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableGremlinGraphGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableGremlinGraphsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableGremlinGraphsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restorable_gremlin_database_rid=restorable_gremlin_database_rid, start_time=start_time, end_time=end_time, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restorable_gremlin_database_rid=restorable_gremlin_database_rid, - start_time=start_time, - end_time=end_time, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -175,10 +187,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -188,8 +198,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGraphs"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGraphs"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_gremlin_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_gremlin_resources_operations.py index 1dbd4b44520..22bec7d931f 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_gremlin_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_gremlin_resources_operations.py @@ -7,88 +7,96 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_request( - subscription_id: str, location: str, instance_id: str, + subscription_id: str, *, restore_location: Optional[str] = None, restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), - "instanceId": _SERIALIZER.url("instance_id", instance_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), + "instanceId": _SERIALIZER.url("instance_id", instance_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if restore_location is not None: - _query_parameters['restoreLocation'] = _SERIALIZER.query("restore_location", restore_location, 'str') + _params["restoreLocation"] = _SERIALIZER.query("restore_location", restore_location, "str") if restore_timestamp_in_utc is not None: - _query_parameters['restoreTimestampInUtc'] = _SERIALIZER.query("restore_timestamp_in_utc", restore_timestamp_in_utc, 'str') + _params["restoreTimestampInUtc"] = _SERIALIZER.query( + "restore_timestamp_in_utc", restore_timestamp_in_utc, "str" + ) # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class RestorableGremlinResourcesOperations(object): - """RestorableGremlinResourcesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class RestorableGremlinResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`restorable_gremlin_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -98,15 +106,16 @@ def list( restore_location: Optional[str] = None, restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.RestorableGremlinResourcesListResult"]: + ) -> Iterable["_models.RestorableGremlinResourcesGetResult"]: """Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restore_location: The location where the restorable resources are located. Default value is None. @@ -115,47 +124,51 @@ def list( value is None. :type restore_timestamp_in_utc: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableGremlinResourcesListResult or the result + :return: An iterator like instance of either RestorableGremlinResourcesGetResult or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableGremlinResourcesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableGremlinResourcesGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableGremlinResourcesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableGremlinResourcesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restore_location=restore_location, restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restore_location=restore_location, - restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -169,10 +182,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -182,8 +193,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_mongodb_collections_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_mongodb_collections_operations.py index 7c065de5db3..001dd09f270 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_mongodb_collections_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_mongodb_collections_operations.py @@ -7,91 +7,99 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_request( - subscription_id: str, location: str, instance_id: str, + subscription_id: str, *, restorable_mongodb_database_rid: Optional[str] = None, start_time: Optional[str] = None, end_time: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), - "instanceId": _SERIALIZER.url("instance_id", instance_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), + "instanceId": _SERIALIZER.url("instance_id", instance_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if restorable_mongodb_database_rid is not None: - _query_parameters['restorableMongodbDatabaseRid'] = _SERIALIZER.query("restorable_mongodb_database_rid", restorable_mongodb_database_rid, 'str') + _params["restorableMongodbDatabaseRid"] = _SERIALIZER.query( + "restorable_mongodb_database_rid", restorable_mongodb_database_rid, "str" + ) if start_time is not None: - _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'str') + _params["startTime"] = _SERIALIZER.query("start_time", start_time, "str") if end_time is not None: - _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'str') + _params["endTime"] = _SERIALIZER.query("end_time", end_time, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class RestorableMongodbCollectionsOperations(object): - """RestorableMongodbCollectionsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class RestorableMongodbCollectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`restorable_mongodb_collections` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -102,14 +110,15 @@ def list( start_time: Optional[str] = None, end_time: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.RestorableMongodbCollectionsListResult"]: + ) -> Iterable["_models.RestorableMongodbCollectionGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restorable_mongodb_database_rid: The resource ID of the MongoDB database. Default value is None. @@ -119,49 +128,52 @@ def list( :param end_time: Restorable MongoDB collections event feed end time. Default value is None. :type end_time: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableMongodbCollectionsListResult or the - result of cls(response) + :return: An iterator like instance of either RestorableMongodbCollectionGetResult or the result + of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbCollectionsListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbCollectionGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableMongodbCollectionsListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableMongodbCollectionsListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restorable_mongodb_database_rid=restorable_mongodb_database_rid, start_time=start_time, end_time=end_time, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restorable_mongodb_database_rid=restorable_mongodb_database_rid, - start_time=start_time, - end_time=end_time, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -175,10 +187,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -188,8 +198,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_mongodb_databases_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_mongodb_databases_operations.py index 6862f5b0c85..415e2af2c3a 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_mongodb_databases_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_mongodb_databases_operations.py @@ -7,136 +7,141 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request( - subscription_id: str, - location: str, - instance_id: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - accept = "application/json" +def build_list_request(location: str, instance_id: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), - "instanceId": _SERIALIZER.url("instance_id", instance_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), + "instanceId": _SERIALIZER.url("instance_id", instance_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class RestorableMongodbDatabasesOperations(object): - """RestorableMongodbDatabasesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class RestorableMongodbDatabasesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`restorable_mongodb_databases` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( - self, - location: str, - instance_id: str, - **kwargs: Any - ) -> Iterable["_models.RestorableMongodbDatabasesListResult"]: + self, location: str, instance_id: str, **kwargs: Any + ) -> Iterable["_models.RestorableMongodbDatabaseGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableMongodbDatabasesListResult or the result + :return: An iterator like instance of either RestorableMongodbDatabaseGetResult or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbDatabasesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbDatabaseGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableMongodbDatabasesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableMongodbDatabasesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -150,10 +155,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -163,8 +166,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_mongodb_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_mongodb_resources_operations.py index 82e6b16d497..4b40ed54029 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_mongodb_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_mongodb_resources_operations.py @@ -7,88 +7,96 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_request( - subscription_id: str, location: str, instance_id: str, + subscription_id: str, *, restore_location: Optional[str] = None, restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), - "instanceId": _SERIALIZER.url("instance_id", instance_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), + "instanceId": _SERIALIZER.url("instance_id", instance_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if restore_location is not None: - _query_parameters['restoreLocation'] = _SERIALIZER.query("restore_location", restore_location, 'str') + _params["restoreLocation"] = _SERIALIZER.query("restore_location", restore_location, "str") if restore_timestamp_in_utc is not None: - _query_parameters['restoreTimestampInUtc'] = _SERIALIZER.query("restore_timestamp_in_utc", restore_timestamp_in_utc, 'str') + _params["restoreTimestampInUtc"] = _SERIALIZER.query( + "restore_timestamp_in_utc", restore_timestamp_in_utc, "str" + ) # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class RestorableMongodbResourcesOperations(object): - """RestorableMongodbResourcesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class RestorableMongodbResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`restorable_mongodb_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -98,15 +106,16 @@ def list( restore_location: Optional[str] = None, restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.RestorableMongodbResourcesListResult"]: + ) -> Iterable["_models.RestorableMongodbResourcesGetResult"]: """Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restore_location: The location where the restorable resources are located. Default value is None. @@ -115,47 +124,51 @@ def list( value is None. :type restore_timestamp_in_utc: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableMongodbResourcesListResult or the result + :return: An iterator like instance of either RestorableMongodbResourcesGetResult or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbResourcesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbResourcesGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableMongodbResourcesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableMongodbResourcesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restore_location=restore_location, restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restore_location=restore_location, - restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -169,10 +182,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -182,8 +193,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_sql_containers_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_sql_containers_operations.py index f6ca9d5fe27..482d8df0c2f 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_sql_containers_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_sql_containers_operations.py @@ -7,91 +7,99 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_request( - subscription_id: str, location: str, instance_id: str, + subscription_id: str, *, restorable_sql_database_rid: Optional[str] = None, start_time: Optional[str] = None, end_time: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), - "instanceId": _SERIALIZER.url("instance_id", instance_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), + "instanceId": _SERIALIZER.url("instance_id", instance_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if restorable_sql_database_rid is not None: - _query_parameters['restorableSqlDatabaseRid'] = _SERIALIZER.query("restorable_sql_database_rid", restorable_sql_database_rid, 'str') + _params["restorableSqlDatabaseRid"] = _SERIALIZER.query( + "restorable_sql_database_rid", restorable_sql_database_rid, "str" + ) if start_time is not None: - _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'str') + _params["startTime"] = _SERIALIZER.query("start_time", start_time, "str") if end_time is not None: - _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'str') + _params["endTime"] = _SERIALIZER.query("end_time", end_time, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class RestorableSqlContainersOperations(object): - """RestorableSqlContainersOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class RestorableSqlContainersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`restorable_sql_containers` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -102,14 +110,15 @@ def list( start_time: Optional[str] = None, end_time: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.RestorableSqlContainersListResult"]: + ) -> Iterable["_models.RestorableSqlContainerGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restorable_sql_database_rid: The resource ID of the SQL database. Default value is None. :type restorable_sql_database_rid: str @@ -118,49 +127,52 @@ def list( :param end_time: Restorable Sql containers event feed end time. Default value is None. :type end_time: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableSqlContainersListResult or the result of + :return: An iterator like instance of either RestorableSqlContainerGetResult or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableSqlContainersListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableSqlContainerGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableSqlContainersListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableSqlContainersListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restorable_sql_database_rid=restorable_sql_database_rid, start_time=start_time, end_time=end_time, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restorable_sql_database_rid=restorable_sql_database_rid, - start_time=start_time, - end_time=end_time, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -174,10 +186,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -187,8 +197,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_sql_databases_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_sql_databases_operations.py index 3a4a151a162..e34dbc95095 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_sql_databases_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_sql_databases_operations.py @@ -7,136 +7,141 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request( - subscription_id: str, - location: str, - instance_id: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - accept = "application/json" +def build_list_request(location: str, instance_id: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), - "instanceId": _SERIALIZER.url("instance_id", instance_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), + "instanceId": _SERIALIZER.url("instance_id", instance_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class RestorableSqlDatabasesOperations(object): - """RestorableSqlDatabasesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class RestorableSqlDatabasesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`restorable_sql_databases` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( - self, - location: str, - instance_id: str, - **kwargs: Any - ) -> Iterable["_models.RestorableSqlDatabasesListResult"]: + self, location: str, instance_id: str, **kwargs: Any + ) -> Iterable["_models.RestorableSqlDatabaseGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableSqlDatabasesListResult or the result of + :return: An iterator like instance of either RestorableSqlDatabaseGetResult or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableSqlDatabasesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableSqlDatabaseGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableSqlDatabasesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableSqlDatabasesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -150,10 +155,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -163,8 +166,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_sql_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_sql_resources_operations.py index 1e53612eb02..a8318378a70 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_sql_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_sql_resources_operations.py @@ -7,88 +7,96 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_request( - subscription_id: str, location: str, instance_id: str, + subscription_id: str, *, restore_location: Optional[str] = None, restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), - "instanceId": _SERIALIZER.url("instance_id", instance_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), + "instanceId": _SERIALIZER.url("instance_id", instance_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if restore_location is not None: - _query_parameters['restoreLocation'] = _SERIALIZER.query("restore_location", restore_location, 'str') + _params["restoreLocation"] = _SERIALIZER.query("restore_location", restore_location, "str") if restore_timestamp_in_utc is not None: - _query_parameters['restoreTimestampInUtc'] = _SERIALIZER.query("restore_timestamp_in_utc", restore_timestamp_in_utc, 'str') + _params["restoreTimestampInUtc"] = _SERIALIZER.query( + "restore_timestamp_in_utc", restore_timestamp_in_utc, "str" + ) # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class RestorableSqlResourcesOperations(object): - """RestorableSqlResourcesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class RestorableSqlResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`restorable_sql_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -98,15 +106,16 @@ def list( restore_location: Optional[str] = None, restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.RestorableSqlResourcesListResult"]: + ) -> Iterable["_models.RestorableSqlResourcesGetResult"]: """Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restore_location: The location where the restorable resources are located. Default value is None. @@ -115,47 +124,51 @@ def list( value is None. :type restore_timestamp_in_utc: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableSqlResourcesListResult or the result of + :return: An iterator like instance of either RestorableSqlResourcesGetResult or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableSqlResourcesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableSqlResourcesGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableSqlResourcesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableSqlResourcesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restore_location=restore_location, restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restore_location=restore_location, - restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -169,10 +182,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -182,8 +193,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_table_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_table_resources_operations.py index 28cf9464d15..6d5a523c53f 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_table_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_table_resources_operations.py @@ -7,88 +7,96 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_request( - subscription_id: str, location: str, instance_id: str, + subscription_id: str, *, restore_location: Optional[str] = None, restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTableResources") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTableResources", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), - "instanceId": _SERIALIZER.url("instance_id", instance_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), + "instanceId": _SERIALIZER.url("instance_id", instance_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if restore_location is not None: - _query_parameters['restoreLocation'] = _SERIALIZER.query("restore_location", restore_location, 'str') + _params["restoreLocation"] = _SERIALIZER.query("restore_location", restore_location, "str") if restore_timestamp_in_utc is not None: - _query_parameters['restoreTimestampInUtc'] = _SERIALIZER.query("restore_timestamp_in_utc", restore_timestamp_in_utc, 'str') + _params["restoreTimestampInUtc"] = _SERIALIZER.query( + "restore_timestamp_in_utc", restore_timestamp_in_utc, "str" + ) # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class RestorableTableResourcesOperations(object): - """RestorableTableResourcesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class RestorableTableResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`restorable_table_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -98,14 +106,15 @@ def list( restore_location: Optional[str] = None, restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.RestorableTableResourcesListResult"]: + ) -> Iterable["_models.RestorableTableResourcesGetResult"]: """Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param restore_location: The location where the restorable resources are located. Default value is None. @@ -114,47 +123,51 @@ def list( value is None. :type restore_timestamp_in_utc: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableTableResourcesListResult or the result - of cls(response) + :return: An iterator like instance of either RestorableTableResourcesGetResult or the result of + cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableTableResourcesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableTableResourcesGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableTableResourcesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableTableResourcesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, restore_location=restore_location, restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - restore_location=restore_location, - restore_timestamp_in_utc=restore_timestamp_in_utc, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -168,10 +181,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -181,8 +192,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTableResources"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTableResources"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_tables_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_tables_operations.py index 20a3aace114..a3117ff669e 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_tables_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_restorable_tables_operations.py @@ -7,88 +7,94 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_request( - subscription_id: str, location: str, instance_id: str, + subscription_id: str, *, start_time: Optional[str] = None, end_time: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTables") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTables", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "location": _SERIALIZER.url("location", location, 'str'), - "instanceId": _SERIALIZER.url("instance_id", instance_id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "location": _SERIALIZER.url("location", location, "str"), + "instanceId": _SERIALIZER.url("instance_id", instance_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if start_time is not None: - _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'str') + _params["startTime"] = _SERIALIZER.query("start_time", start_time, "str") if end_time is not None: - _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'str') + _params["endTime"] = _SERIALIZER.query("end_time", end_time, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class RestorableTablesOperations(object): - """RestorableTablesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class RestorableTablesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`restorable_tables` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -98,60 +104,65 @@ def list( start_time: Optional[str] = None, end_time: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.RestorableTablesListResult"]: + ) -> Iterable["_models.RestorableTableGetResult"]: """Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. :param location: Cosmos DB region, with spaces between words and each word capitalized. + Required. :type location: str - :param instance_id: The instanceId GUID of a restorable database account. + :param instance_id: The instanceId GUID of a restorable database account. Required. :type instance_id: str :param start_time: Restorable Tables event feed start time. Default value is None. :type start_time: str :param end_time: Restorable Tables event feed end time. Default value is None. :type end_time: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RestorableTablesListResult or the result of + :return: An iterator like instance of either RestorableTableGetResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableTablesListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.RestorableTableGetResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.RestorableTablesListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestorableTablesListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, location=location, instance_id=instance_id, - api_version=api_version, + subscription_id=self._config.subscription_id, start_time=start_time, end_time=end_time, - template_url=self.list.metadata['url'], + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - location=location, - instance_id=instance_id, - api_version=api_version, - start_time=start_time, - end_time=end_time, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -165,10 +176,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -178,8 +187,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTables"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTables"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_service_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_service_operations.py index c447884dbbc..ce38a5289fc 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_service_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_service_operations.py @@ -6,258 +6,252 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - accept = "application/json" +def build_list_request(resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - service_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_request( + resource_group_name: str, account_name: str, service_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "serviceName": _SERIALIZER.url("service_name", service_name, 'str', max_length=50, min_length=3), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "serviceName": _SERIALIZER.url("service_name", service_name, "str", max_length=50, min_length=3), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) def build_get_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - service_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, service_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "serviceName": _SERIALIZER.url("service_name", service_name, 'str', max_length=50, min_length=3), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "serviceName": _SERIALIZER.url("service_name", service_name, "str", max_length=50, min_length=3), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - service_name: str, - **kwargs: Any + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, account_name: str, service_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "serviceName": _SERIALIZER.url("service_name", service_name, 'str', max_length=50, min_length=3), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "serviceName": _SERIALIZER.url("service_name", service_name, "str", max_length=50, min_length=3), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class ServiceOperations(object): - """ServiceOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class ServiceOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`service` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.ServiceResourceListResult"]: + def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> Iterable["_models.ServiceResource"]: """Gets the status of service. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ServiceResourceListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.ServiceResourceListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either ServiceResource or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.ServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ServiceResourceListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResourceListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -271,10 +265,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -284,49 +276,61 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services"} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services"} # type: ignore def _create_initial( self, resource_group_name: str, account_name: str, service_name: str, - create_update_parameters: "_models.ServiceResourceCreateUpdateParameters", + create_update_parameters: Union[_models.ServiceResourceCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ServiceResource"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServiceResource"]] + ) -> Optional[_models.ServiceResource]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_parameters, 'ServiceResourceCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ServiceResource]] - request = build_create_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_parameters, (IO, bytes)): + _content = create_update_parameters + else: + _json = self._serialize.body(create_update_parameters, "ServiceResourceCreateUpdateParameters") + + request = build_create_request( resource_group_name=resource_group_name, account_name=account_name, service_name=service_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_initial.metadata['url'], + content=_content, + template_url=self._create_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -335,15 +339,93 @@ def _create_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ServiceResource', pipeline_response) + deserialized = self._deserialize("ServiceResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore + _create_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore + @overload + def begin_create( + self, + resource_group_name: str, + account_name: str, + service_name: str, + create_update_parameters: _models.ServiceResourceCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ServiceResource]: + """Creates a service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param service_name: Cosmos DB service name. Required. + :type service_name: str + :param create_update_parameters: The Service resource parameters. Required. + :type create_update_parameters: + ~azure.mgmt.cosmosdb.models.ServiceResourceCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ServiceResource or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + account_name: str, + service_name: str, + create_update_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ServiceResource]: + """Creates a service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param service_name: Cosmos DB service name. Required. + :type service_name: str + :param create_update_parameters: The Service resource parameters. Required. + :type create_update_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ServiceResource or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create( @@ -351,20 +433,25 @@ def begin_create( resource_group_name: str, account_name: str, service_name: str, - create_update_parameters: "_models.ServiceResourceCreateUpdateParameters", + create_update_parameters: Union[_models.ServiceResourceCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.ServiceResource"]: + ) -> LROPoller[_models.ServiceResource]: """Creates a service. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param service_name: Cosmos DB service name. + :param service_name: Cosmos DB service name. Required. :type service_name: str - :param create_update_parameters: The Service resource parameters. + :param create_update_parameters: The Service resource parameters. Is either a model type or a + IO type. Required. :type create_update_parameters: - ~azure.mgmt.cosmosdb.models.ServiceResourceCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.ServiceResourceCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -376,146 +463,153 @@ def begin_create( :return: An instance of LROPoller that returns either ServiceResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ServiceResource] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ServiceResource] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_initial( + raw_result = self._create_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, service_name=service_name, create_update_parameters=create_update_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ServiceResource', pipeline_response) + deserialized = self._deserialize("ServiceResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore + begin_create.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore @distributed_trace def get( - self, - resource_group_name: str, - account_name: str, - service_name: str, - **kwargs: Any - ) -> "_models.ServiceResource": + self, resource_group_name: str, account_name: str, service_name: str, **kwargs: Any + ) -> _models.ServiceResource: """Gets the status of service. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param service_name: Cosmos DB service name. + :param service_name: Cosmos DB service name. Required. :type service_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceResource, or the result of cls(response) + :return: ServiceResource or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ServiceResource - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ServiceResource] - request = build_get_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, service_name=service_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ServiceResource', pipeline_response) + deserialized = self._deserialize("ServiceResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - service_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, service_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_request( resource_group_name=resource_group_name, account_name=account_name, service_name=service_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -525,24 +619,20 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - service_name: str, - **kwargs: Any + def begin_delete( + self, resource_group_name: str, account_name: str, service_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes service with the given serviceName. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param service_name: Cosmos DB service name. + :param service_name: Cosmos DB service name. Required. :type service_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -554,42 +644,46 @@ def begin_delete( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, service_name=service_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_sql_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_sql_resources_operations.py index e8d05b76a58..01b467034c0 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_sql_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_sql_resources_operations.py @@ -6,1878 +6,1914 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_sql_databases_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_sql_database_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_sql_database_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_create_update_sql_database_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_sql_database_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any +def build_delete_sql_database_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_get_sql_database_throughput_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_sql_database_throughput_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_update_sql_database_throughput_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_sql_database_to_autoscale_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any +def build_migrate_sql_database_to_autoscale_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_sql_database_to_manual_throughput_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any +def build_migrate_sql_database_to_manual_throughput_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_list_client_encryption_keys_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_client_encryption_key_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, client_encryption_key_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "clientEncryptionKeyName": _SERIALIZER.url("client_encryption_key_name", client_encryption_key_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "clientEncryptionKeyName": _SERIALIZER.url("client_encryption_key_name", client_encryption_key_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_client_encryption_key_request_initial( - subscription_id: str, +def build_create_update_client_encryption_key_request( resource_group_name: str, account_name: str, database_name: str, client_encryption_key_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "clientEncryptionKeyName": _SERIALIZER.url("client_encryption_key_name", client_encryption_key_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "clientEncryptionKeyName": _SERIALIZER.url("client_encryption_key_name", client_encryption_key_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) def build_list_sql_containers_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_sql_container_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, container_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_sql_container_request_initial( - subscription_id: str, +def build_create_update_sql_container_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_sql_container_request_initial( - subscription_id: str, +def build_delete_sql_container_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_list_sql_container_partition_merge_request_initial( - subscription_id: str, +def build_list_sql_container_partition_merge_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_get_sql_container_throughput_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, container_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_sql_container_throughput_request_initial( - subscription_id: str, +def build_update_sql_container_throughput_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_sql_container_to_autoscale_request_initial( - subscription_id: str, +def build_migrate_sql_container_to_autoscale_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToAutoscale") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToAutoscale", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_migrate_sql_container_to_manual_throughput_request_initial( - subscription_id: str, +def build_migrate_sql_container_to_manual_throughput_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToManualThroughput") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToManualThroughput", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_sql_container_retrieve_throughput_distribution_request_initial( - subscription_id: str, +def build_sql_database_retrieve_throughput_distribution_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sql_database_redistribute_throughput_request( + resource_group_name: str, account_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/redistributeThroughput", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sql_container_retrieve_throughput_distribution_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_sql_container_redistribute_throughput_request_initial( - subscription_id: str, +def build_sql_container_redistribute_throughput_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_list_sql_stored_procedures_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, container_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_sql_stored_procedure_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, container_name: str, stored_procedure_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), - "storedProcedureName": _SERIALIZER.url("stored_procedure_name", stored_procedure_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "storedProcedureName": _SERIALIZER.url("stored_procedure_name", stored_procedure_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_sql_stored_procedure_request_initial( - subscription_id: str, +def build_create_update_sql_stored_procedure_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, stored_procedure_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), - "storedProcedureName": _SERIALIZER.url("stored_procedure_name", stored_procedure_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "storedProcedureName": _SERIALIZER.url("stored_procedure_name", stored_procedure_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_sql_stored_procedure_request_initial( - subscription_id: str, +def build_delete_sql_stored_procedure_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, stored_procedure_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), - "storedProcedureName": _SERIALIZER.url("stored_procedure_name", stored_procedure_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "storedProcedureName": _SERIALIZER.url("stored_procedure_name", stored_procedure_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_list_sql_user_defined_functions_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, container_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_sql_user_defined_function_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, container_name: str, user_defined_function_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), - "userDefinedFunctionName": _SERIALIZER.url("user_defined_function_name", user_defined_function_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "userDefinedFunctionName": _SERIALIZER.url("user_defined_function_name", user_defined_function_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_sql_user_defined_function_request_initial( - subscription_id: str, +def build_create_update_sql_user_defined_function_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, user_defined_function_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), - "userDefinedFunctionName": _SERIALIZER.url("user_defined_function_name", user_defined_function_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "userDefinedFunctionName": _SERIALIZER.url("user_defined_function_name", user_defined_function_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_sql_user_defined_function_request_initial( - subscription_id: str, +def build_delete_sql_user_defined_function_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, user_defined_function_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), - "userDefinedFunctionName": _SERIALIZER.url("user_defined_function_name", user_defined_function_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "userDefinedFunctionName": _SERIALIZER.url("user_defined_function_name", user_defined_function_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_list_sql_triggers_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, container_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_sql_trigger_request( - subscription_id: str, resource_group_name: str, account_name: str, database_name: str, container_name: str, trigger_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_sql_trigger_request_initial( - subscription_id: str, +def build_create_update_sql_trigger_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, trigger_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_sql_trigger_request_initial( - subscription_id: str, +def build_delete_sql_trigger_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, trigger_name: str, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), - "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_get_sql_role_definition_request( - role_definition_id: str, - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + role_definition_id: str, resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "roleDefinitionId": _SERIALIZER.url("role_definition_id", role_definition_id, 'str'), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "roleDefinitionId": _SERIALIZER.url("role_definition_id", role_definition_id, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_sql_role_definition_request_initial( - role_definition_id: str, - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_create_update_sql_role_definition_request( + role_definition_id: str, resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "roleDefinitionId": _SERIALIZER.url("role_definition_id", role_definition_id, 'str'), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "roleDefinitionId": _SERIALIZER.url("role_definition_id", role_definition_id, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_sql_role_definition_request_initial( - role_definition_id: str, - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_sql_role_definition_request( + role_definition_id: str, resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "roleDefinitionId": _SERIALIZER.url("role_definition_id", role_definition_id, 'str'), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "roleDefinitionId": _SERIALIZER.url("role_definition_id", role_definition_id, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) def build_list_sql_role_definitions_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_sql_role_assignment_request( - role_assignment_id: str, - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + role_assignment_id: str, resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "roleAssignmentId": _SERIALIZER.url("role_assignment_id", role_assignment_id, 'str'), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "roleAssignmentId": _SERIALIZER.url("role_assignment_id", role_assignment_id, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_update_sql_role_assignment_request_initial( - role_assignment_id: str, - subscription_id: str, - resource_group_name: str, - account_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any +def build_create_update_sql_role_assignment_request( + role_assignment_id: str, resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "roleAssignmentId": _SERIALIZER.url("role_assignment_id", role_assignment_id, 'str'), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "roleAssignmentId": _SERIALIZER.url("role_assignment_id", role_assignment_id, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_sql_role_assignment_request_initial( - role_assignment_id: str, - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_sql_role_assignment_request( + role_assignment_id: str, resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}", + ) # pylint: disable=line-too-long path_format_arguments = { - "roleAssignmentId": _SERIALIZER.url("role_assignment_id", role_assignment_id, 'str'), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "roleAssignmentId": _SERIALIZER.url("role_assignment_id", role_assignment_id, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) def build_list_sql_role_assignments_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_retrieve_continuous_backup_information_request_initial( - subscription_id: str, +def build_retrieve_continuous_backup_information_request( resource_group_name: str, account_name: str, database_name: str, container_name: str, - *, - json: JSONType = None, - content: Any = None, + subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/retrieveContinuousBackupInformation") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/retrieveContinuousBackupInformation", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), - "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - -class SqlResourcesOperations(object): # pylint: disable=too-many-public-methods - """SqlResourcesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class SqlResourcesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`sql_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_sql_databases( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.SqlDatabaseListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.SqlDatabaseGetResults"]: """Lists the SQL databases under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlDatabaseListResult or the result of + :return: An iterator like instance of either SqlDatabaseGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlDatabaseListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlDatabaseListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlDatabaseListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_databases_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_databases.metadata['url'], + template_url=self.list_sql_databases.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_databases_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -1891,10 +1927,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1904,112 +1938,126 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_sql_databases.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases"} # type: ignore + list_sql_databases.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases"} # type: ignore @distributed_trace def get_sql_database( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> "_models.SqlDatabaseGetResults": + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> _models.SqlDatabaseGetResults: """Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlDatabaseGetResults, or the result of cls(response) + :return: SqlDatabaseGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlDatabaseGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlDatabaseGetResults] - request = build_get_sql_database_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_database.metadata['url'], + template_url=self.get_sql_database.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("SqlDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore - + get_sql_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore def _create_update_sql_database_initial( self, resource_group_name: str, account_name: str, database_name: str, - create_update_sql_database_parameters: "_models.SqlDatabaseCreateUpdateParameters", + create_update_sql_database_parameters: Union[_models.SqlDatabaseCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.SqlDatabaseGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlDatabaseGetResults"]] + ) -> Optional[_models.SqlDatabaseGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_sql_database_parameters, 'SqlDatabaseCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlDatabaseGetResults]] - request = build_create_update_sql_database_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_database_parameters, (IO, bytes)): + _content = create_update_sql_database_parameters + else: + _json = self._serialize.body(create_update_sql_database_parameters, "SqlDatabaseCreateUpdateParameters") + + request = build_create_update_sql_database_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_database_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_database_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2018,37 +2066,42 @@ def _create_update_sql_database_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("SqlDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_database_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore - + _create_update_sql_database_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore - @distributed_trace + @overload def begin_create_update_sql_database( self, resource_group_name: str, account_name: str, database_name: str, - create_update_sql_database_parameters: "_models.SqlDatabaseCreateUpdateParameters", + create_update_sql_database_parameters: _models.SqlDatabaseCreateUpdateParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller["_models.SqlDatabaseGetResults"]: + ) -> LROPoller[_models.SqlDatabaseGetResults]: """Create or update an Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :param create_update_sql_database_parameters: The parameters to provide for the current SQL - database. + database. Required. :type create_update_sql_database_parameters: ~azure.mgmt.cosmosdb.models.SqlDatabaseCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -2060,84 +2113,168 @@ def begin_create_update_sql_database( :return: An instance of LROPoller that returns either SqlDatabaseGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlDatabaseGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_update_sql_database_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - create_update_sql_database_parameters=create_update_sql_database_parameters, - api_version=api_version, + + @overload + def begin_create_update_sql_database( + self, + resource_group_name: str, + account_name: str, + database_name: str, + create_update_sql_database_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlDatabaseGetResults]: + """Create or update an Azure Cosmos DB SQL database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param create_update_sql_database_parameters: The parameters to provide for the current SQL + database. Required. + :type create_update_sql_database_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlDatabaseGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_update_sql_database( + self, + resource_group_name: str, + account_name: str, + database_name: str, + create_update_sql_database_parameters: Union[_models.SqlDatabaseCreateUpdateParameters, IO], + **kwargs: Any + ) -> LROPoller[_models.SqlDatabaseGetResults]: + """Create or update an Azure Cosmos DB SQL database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param create_update_sql_database_parameters: The parameters to provide for the current SQL + database. Is either a model type or a IO type. Required. + :type create_update_sql_database_parameters: + ~azure.mgmt.cosmosdb.models.SqlDatabaseCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlDatabaseGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlDatabaseGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_update_sql_database_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + create_update_sql_database_parameters=create_update_sql_database_parameters, + api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlDatabaseGetResults', pipeline_response) + deserialized = self._deserialize("SqlDatabaseGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore + begin_create_update_sql_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore def _delete_sql_database_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_database_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_database_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_database_initial.metadata['url'], + template_url=self._delete_sql_database_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -2147,24 +2284,20 @@ def _delete_sql_database_initial( # pylint: disable=inconsistent-return-stateme if cls: return cls(pipeline_response, None, {}) - _delete_sql_database_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore - + _delete_sql_database_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore @distributed_trace - def begin_delete_sql_database( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any + def begin_delete_sql_database( + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2176,146 +2309,166 @@ def begin_delete_sql_database( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_sql_database_initial( + raw_result = self._delete_sql_database_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_database.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore + begin_delete_sql_database.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}"} # type: ignore @distributed_trace def get_sql_database_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_sql_database_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_database_throughput.metadata['url'], + template_url=self.get_sql_database_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_database_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default"} # type: ignore - + get_sql_database_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default"} # type: ignore def _update_sql_database_throughput_initial( self, resource_group_name: str, account_name: str, database_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_sql_database_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_sql_database_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_sql_database_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_sql_database_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2324,15 +2477,95 @@ def _update_sql_database_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_sql_database_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default"} # type: ignore + _update_sql_database_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default"} # type: ignore + + @overload + def begin_update_sql_database_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB SQL database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param update_throughput_parameters: The parameters to provide for the RUs per second of the + current SQL database. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_sql_database_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB SQL database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param update_throughput_parameters: The parameters to provide for the RUs per second of the + current SQL database. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_update_sql_database_throughput( @@ -2340,21 +2573,25 @@ def begin_update_sql_database_throughput( resource_group_name: str, account_name: str, database_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :param update_throughput_parameters: The parameters to provide for the RUs per second of the - current SQL database. + current SQL database. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -2366,84 +2603,89 @@ def begin_update_sql_database_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._update_sql_database_throughput_initial( + raw_result = self._update_sql_database_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_sql_database_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default"} # type: ignore + begin_update_sql_database_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default"} # type: ignore def _migrate_sql_database_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_sql_database_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_sql_database_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_sql_database_to_autoscale_initial.metadata['url'], + template_url=self._migrate_sql_database_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2452,31 +2694,27 @@ def _migrate_sql_database_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_sql_database_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_sql_database_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace def begin_migrate_sql_database_to_autoscale( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2489,81 +2727,86 @@ def begin_migrate_sql_database_to_autoscale( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_sql_database_to_autoscale_initial( + raw_result = self._migrate_sql_database_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_sql_database_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_sql_database_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale"} # type: ignore def _migrate_sql_database_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_sql_database_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_sql_database_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_sql_database_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_sql_database_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2572,31 +2815,27 @@ def _migrate_sql_database_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_sql_database_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_sql_database_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def begin_migrate_sql_database_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2609,105 +2848,109 @@ def begin_migrate_sql_database_to_manual_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_sql_database_to_manual_throughput_initial( + raw_result = self._migrate_sql_database_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_sql_database_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_sql_database_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def list_client_encryption_keys( - self, - resource_group_name: str, - account_name: str, - database_name: str, - **kwargs: Any - ) -> Iterable["_models.ClientEncryptionKeysListResult"]: + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Iterable["_models.ClientEncryptionKeyGetResults"]: """Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ClientEncryptionKeysListResult or the result of + :return: An iterator like instance of either ClientEncryptionKeyGetResults or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.ClientEncryptionKeysListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClientEncryptionKeysListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClientEncryptionKeysListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_client_encryption_keys_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_client_encryption_keys.metadata['url'], + template_url=self.list_client_encryption_keys.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_client_encryption_keys_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -2721,10 +2964,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2734,11 +2975,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_client_encryption_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys"} # type: ignore + list_client_encryption_keys.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys"} # type: ignore @distributed_trace def get_client_encryption_key( @@ -2748,63 +2987,69 @@ def get_client_encryption_key( database_name: str, client_encryption_key_name: str, **kwargs: Any - ) -> "_models.ClientEncryptionKeyGetResults": + ) -> _models.ClientEncryptionKeyGetResults: """Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param client_encryption_key_name: Cosmos DB ClientEncryptionKey name. + :param client_encryption_key_name: Cosmos DB ClientEncryptionKey name. Required. :type client_encryption_key_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClientEncryptionKeyGetResults, or the result of cls(response) + :return: ClientEncryptionKeyGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClientEncryptionKeyGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClientEncryptionKeyGetResults] - request = build_get_client_encryption_key_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, client_encryption_key_name=client_encryption_key_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_client_encryption_key.metadata['url'], + template_url=self.get_client_encryption_key.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ClientEncryptionKeyGetResults', pipeline_response) + deserialized = self._deserialize("ClientEncryptionKeyGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_client_encryption_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}"} # type: ignore - + get_client_encryption_key.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}"} # type: ignore def _create_update_client_encryption_key_initial( self, @@ -2812,39 +3057,55 @@ def _create_update_client_encryption_key_initial( account_name: str, database_name: str, client_encryption_key_name: str, - create_update_client_encryption_key_parameters: "_models.ClientEncryptionKeyCreateUpdateParameters", + create_update_client_encryption_key_parameters: Union[_models.ClientEncryptionKeyCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ClientEncryptionKeyGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ClientEncryptionKeyGetResults"]] + ) -> Optional[_models.ClientEncryptionKeyGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_client_encryption_key_parameters, 'ClientEncryptionKeyCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ClientEncryptionKeyGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_client_encryption_key_parameters, (IO, bytes)): + _content = create_update_client_encryption_key_parameters + else: + _json = self._serialize.body( + create_update_client_encryption_key_parameters, "ClientEncryptionKeyCreateUpdateParameters" + ) - request = build_create_update_client_encryption_key_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_client_encryption_key_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, client_encryption_key_name=client_encryption_key_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_client_encryption_key_initial.metadata['url'], + content=_content, + template_url=self._create_update_client_encryption_key_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2853,41 +3114,46 @@ def _create_update_client_encryption_key_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClientEncryptionKeyGetResults', pipeline_response) + deserialized = self._deserialize("ClientEncryptionKeyGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_client_encryption_key_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}"} # type: ignore + _create_update_client_encryption_key_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}"} # type: ignore - - @distributed_trace + @overload def begin_create_update_client_encryption_key( self, resource_group_name: str, account_name: str, database_name: str, client_encryption_key_name: str, - create_update_client_encryption_key_parameters: "_models.ClientEncryptionKeyCreateUpdateParameters", + create_update_client_encryption_key_parameters: _models.ClientEncryptionKeyCreateUpdateParameters, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller["_models.ClientEncryptionKeyGetResults"]: + ) -> LROPoller[_models.ClientEncryptionKeyGetResults]: """Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param client_encryption_key_name: Cosmos DB ClientEncryptionKey name. + :param client_encryption_key_name: Cosmos DB ClientEncryptionKey name. Required. :type client_encryption_key_name: str :param create_update_client_encryption_key_parameters: The parameters to provide for the client - encryption key. + encryption key. Required. :type create_update_client_encryption_key_parameters: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -2900,108 +3166,202 @@ def begin_create_update_client_encryption_key( result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClientEncryptionKeyGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_update_client_encryption_key_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - client_encryption_key_name=client_encryption_key_name, - create_update_client_encryption_key_parameters=create_update_client_encryption_key_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ClientEncryptionKeyGetResults', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_client_encryption_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}"} # type: ignore - - @distributed_trace - def list_sql_containers( + @overload + def begin_create_update_client_encryption_key( self, resource_group_name: str, account_name: str, database_name: str, + client_encryption_key_name: str, + create_update_client_encryption_key_parameters: IO, + *, + content_type: str = "application/json", **kwargs: Any - ) -> Iterable["_models.SqlContainerListResult"]: - """Lists the SQL container under an existing Azure Cosmos DB database account. + ) -> LROPoller[_models.ClientEncryptionKeyGetResults]: + """Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the + Azure Powershell (instead of directly). :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str + :param client_encryption_key_name: Cosmos DB ClientEncryptionKey name. Required. + :type client_encryption_key_name: str + :param create_update_client_encryption_key_parameters: The parameters to provide for the client + encryption key. Required. + :type create_update_client_encryption_key_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlContainerListResult or the result of + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ClientEncryptionKeyGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_update_client_encryption_key( + self, + resource_group_name: str, + account_name: str, + database_name: str, + client_encryption_key_name: str, + create_update_client_encryption_key_parameters: Union[_models.ClientEncryptionKeyCreateUpdateParameters, IO], + **kwargs: Any + ) -> LROPoller[_models.ClientEncryptionKeyGetResults]: + """Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the + Azure Powershell (instead of directly). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param client_encryption_key_name: Cosmos DB ClientEncryptionKey name. Required. + :type client_encryption_key_name: str + :param create_update_client_encryption_key_parameters: The parameters to provide for the client + encryption key. Is either a model type or a IO type. Required. + :type create_update_client_encryption_key_parameters: + ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ClientEncryptionKeyGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ClientEncryptionKeyGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_update_client_encryption_key_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + client_encryption_key_name=client_encryption_key_name, + create_update_client_encryption_key_parameters=create_update_client_encryption_key_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ClientEncryptionKeyGetResults", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_update_client_encryption_key.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}"} # type: ignore + + @distributed_trace + def list_sql_containers( + self, resource_group_name: str, account_name: str, database_name: str, **kwargs: Any + ) -> Iterable["_models.SqlContainerGetResults"]: + """Lists the SQL container under an existing Azure Cosmos DB database account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SqlContainerGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlContainerListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlContainerGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlContainerListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlContainerListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_containers_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_containers.metadata['url'], + template_url=self.list_sql_containers.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_containers_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -3015,10 +3375,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -3028,77 +3386,76 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_sql_containers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers"} # type: ignore + list_sql_containers.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers"} # type: ignore @distributed_trace def get_sql_container( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> "_models.SqlContainerGetResults": + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> _models.SqlContainerGetResults: """Gets the SQL container under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlContainerGetResults, or the result of cls(response) + :return: SqlContainerGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlContainerGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlContainerGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlContainerGetResults] - request = build_get_sql_container_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_container.metadata['url'], + template_url=self.get_sql_container.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlContainerGetResults', pipeline_response) + deserialized = self._deserialize("SqlContainerGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_container.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore - + get_sql_container.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore def _create_update_sql_container_initial( self, @@ -3106,39 +3463,53 @@ def _create_update_sql_container_initial( account_name: str, database_name: str, container_name: str, - create_update_sql_container_parameters: "_models.SqlContainerCreateUpdateParameters", + create_update_sql_container_parameters: Union[_models.SqlContainerCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.SqlContainerGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlContainerGetResults"]] + ) -> Optional[_models.SqlContainerGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_sql_container_parameters, 'SqlContainerCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlContainerGetResults]] - request = build_create_update_sql_container_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_container_parameters, (IO, bytes)): + _content = create_update_sql_container_parameters + else: + _json = self._serialize.body(create_update_sql_container_parameters, "SqlContainerCreateUpdateParameters") + + request = build_create_update_sql_container_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_container_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_container_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3147,15 +3518,101 @@ def _create_update_sql_container_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlContainerGetResults', pipeline_response) + deserialized = self._deserialize("SqlContainerGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_container_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore + _create_update_sql_container_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore + + @overload + def begin_create_update_sql_container( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + create_update_sql_container_parameters: _models.SqlContainerCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlContainerGetResults]: + """Create or update an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param create_update_sql_container_parameters: The parameters to provide for the current SQL + container. Required. + :type create_update_sql_container_parameters: + ~azure.mgmt.cosmosdb.models.SqlContainerCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlContainerGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlContainerGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_sql_container( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + create_update_sql_container_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlContainerGetResults]: + """Create or update an Azure Cosmos DB SQL container. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param create_update_sql_container_parameters: The parameters to provide for the current SQL + container. Required. + :type create_update_sql_container_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlContainerGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlContainerGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_sql_container( @@ -3164,23 +3621,27 @@ def begin_create_update_sql_container( account_name: str, database_name: str, container_name: str, - create_update_sql_container_parameters: "_models.SqlContainerCreateUpdateParameters", + create_update_sql_container_parameters: Union[_models.SqlContainerCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.SqlContainerGetResults"]: + ) -> LROPoller[_models.SqlContainerGetResults]: """Create or update an Azure Cosmos DB SQL container. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :param create_update_sql_container_parameters: The parameters to provide for the current SQL - container. + container. Is either a model type or a IO type. Required. :type create_update_sql_container_parameters: - ~azure.mgmt.cosmosdb.models.SqlContainerCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlContainerCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -3192,19 +3653,19 @@ def begin_create_update_sql_container( :return: An instance of LROPoller that returns either SqlContainerGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlContainerGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlContainerGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlContainerGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_sql_container_initial( + raw_result = self._create_update_sql_container_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -3212,67 +3673,71 @@ def begin_create_update_sql_container( create_update_sql_container_parameters=create_update_sql_container_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlContainerGetResults', pipeline_response) + deserialized = self._deserialize("SqlContainerGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_container.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore + begin_create_update_sql_container.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore def _delete_sql_container_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_container_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_container_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_container_initial.metadata['url'], + template_url=self._delete_sql_container_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -3282,27 +3747,22 @@ def _delete_sql_container_initial( # pylint: disable=inconsistent-return-statem if cls: return cls(pipeline_response, None, {}) - _delete_sql_container_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore - + _delete_sql_container_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore @distributed_trace - def begin_delete_sql_container( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any + def begin_delete_sql_container( + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB SQL container. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3314,46 +3774,50 @@ def begin_delete_sql_container( # pylint: disable=inconsistent-return-statement Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_sql_container_initial( + raw_result = self._delete_sql_container_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_container.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore + begin_delete_sql_container.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}"} # type: ignore def _list_sql_container_partition_merge_initial( self, @@ -3361,39 +3825,53 @@ def _list_sql_container_partition_merge_initial( account_name: str, database_name: str, container_name: str, - merge_parameters: "_models.MergeParameters", + merge_parameters: Union[_models.MergeParameters, IO], **kwargs: Any - ) -> Optional["_models.PhysicalPartitionStorageInfoCollection"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionStorageInfoCollection"]] + ) -> Optional[_models.PhysicalPartitionStorageInfoCollection]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(merge_parameters, 'MergeParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionStorageInfoCollection]] - request = build_list_sql_container_partition_merge_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(merge_parameters, (IO, bytes)): + _content = merge_parameters + else: + _json = self._serialize.body(merge_parameters, "MergeParameters") + + request = build_list_sql_container_partition_merge_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._list_sql_container_partition_merge_initial.metadata['url'], + content=_content, + template_url=self._list_sql_container_partition_merge_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3402,15 +3880,100 @@ def _list_sql_container_partition_merge_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionStorageInfoCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _list_sql_container_partition_merge_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge"} # type: ignore + _list_sql_container_partition_merge_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge"} # type: ignore + @overload + def begin_list_sql_container_partition_merge( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + merge_parameters: _models.MergeParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionStorageInfoCollection]: + """Merges the partitions of a SQL Container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param merge_parameters: The parameters for the merge operation. Required. + :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionStorageInfoCollection or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_list_sql_container_partition_merge( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + merge_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionStorageInfoCollection]: + """Merges the partitions of a SQL Container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param merge_parameters: The parameters for the merge operation. Required. + :type merge_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionStorageInfoCollection or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_list_sql_container_partition_merge( @@ -3419,21 +3982,26 @@ def begin_list_sql_container_partition_merge( account_name: str, database_name: str, container_name: str, - merge_parameters: "_models.MergeParameters", + merge_parameters: Union[_models.MergeParameters, IO], **kwargs: Any - ) -> LROPoller["_models.PhysicalPartitionStorageInfoCollection"]: + ) -> LROPoller[_models.PhysicalPartitionStorageInfoCollection]: """Merges the partitions of a SQL Container. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param merge_parameters: The parameters for the merge operation. - :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters + :param merge_parameters: The parameters for the merge operation. Is either a model type or a IO + type. Required. + :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -3446,19 +4014,19 @@ def begin_list_sql_container_partition_merge( the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionStorageInfoCollection"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionStorageInfoCollection] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._list_sql_container_partition_merge_initial( + raw_result = self._list_sql_container_partition_merge_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -3466,99 +4034,105 @@ def begin_list_sql_container_partition_merge( merge_parameters=merge_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionStorageInfoCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_sql_container_partition_merge.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge"} # type: ignore + begin_list_sql_container_partition_merge.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge"} # type: ignore @distributed_trace def get_sql_container_throughput( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_sql_container_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_container_throughput.metadata['url'], + template_url=self.get_sql_container_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_container_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default"} # type: ignore - + get_sql_container_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default"} # type: ignore def _update_sql_container_throughput_initial( self, @@ -3566,39 +4140,53 @@ def _update_sql_container_throughput_initial( account_name: str, database_name: str, container_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_sql_container_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_sql_container_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_sql_container_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_sql_container_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3607,15 +4195,101 @@ def _update_sql_container_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_sql_container_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default"} # type: ignore + _update_sql_container_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default"} # type: ignore + @overload + def begin_update_sql_container_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param update_throughput_parameters: The parameters to provide for the RUs per second of the + current SQL container. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_sql_container_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param update_throughput_parameters: The parameters to provide for the RUs per second of the + current SQL container. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_update_sql_container_throughput( @@ -3624,23 +4298,27 @@ def begin_update_sql_container_throughput( account_name: str, database_name: str, container_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB SQL container. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :param update_throughput_parameters: The parameters to provide for the RUs per second of the - current SQL container. + current SQL container. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -3652,19 +4330,19 @@ def begin_update_sql_container_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._update_sql_container_throughput_initial( + raw_result = self._update_sql_container_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -3672,67 +4350,337 @@ def begin_update_sql_container_throughput( update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_sql_container_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default"} # type: ignore + begin_update_sql_container_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default"} # type: ignore def _migrate_sql_container_to_autoscale_initial( + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_sql_container_to_autoscale_request( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._migrate_sql_container_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _migrate_sql_container_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + + @distributed_trace + def begin_migrate_sql_container_to_autoscale( + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._migrate_sql_container_to_autoscale_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_migrate_sql_container_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + + def _migrate_sql_container_to_manual_throughput_initial( + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_sql_container_to_manual_throughput_request( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._migrate_sql_container_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _migrate_sql_container_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + + @distributed_trace + def begin_migrate_sql_container_to_manual_throughput( + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._migrate_sql_container_to_manual_throughput_initial( # type: ignore + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_migrate_sql_container_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + + def _sql_database_retrieve_throughput_distribution_initial( self, resource_group_name: str, account_name: str, database_name: str, - container_name: str, + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_sql_container_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(retrieve_throughput_parameters, (IO, bytes)): + _content = retrieve_throughput_parameters + else: + _json = self._serialize.body(retrieve_throughput_parameters, "RetrieveThroughputParameters") + + request = build_sql_database_retrieve_throughput_distribution_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_sql_container_to_autoscale_initial.metadata['url'], + content_type=content_type, + json=_json, + content=_content, + template_url=self._sql_database_retrieve_throughput_distribution_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3741,35 +4689,122 @@ def _migrate_sql_container_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_sql_container_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + _sql_database_retrieve_throughput_distribution_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + + @overload + def begin_sql_database_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + retrieve_throughput_parameters: _models.RetrieveThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB SQL database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current SQL database. Required. + :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_sql_database_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + retrieve_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB SQL database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current SQL database. Required. + :type retrieve_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def begin_migrate_sql_container_to_autoscale( + def begin_sql_database_retrieve_throughput_distribution( self, resource_group_name: str, account_name: str, database_name: str, - container_name: str, + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: - """Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale. + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. - :type container_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current SQL database. Is either a model type or a IO type. Required. + :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -3778,87 +4813,112 @@ def begin_migrate_sql_container_to_autoscale( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the - result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_sql_container_to_autoscale_initial( + raw_result = self._sql_database_retrieve_throughput_distribution_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - container_name=container_name, + retrieve_throughput_parameters=retrieve_throughput_parameters, api_version=api_version, - cls=lambda x,y,z: x, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_sql_container_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_sql_database_retrieve_throughput_distribution.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore - def _migrate_sql_container_to_manual_throughput_initial( + def _sql_database_redistribute_throughput_initial( self, resource_group_name: str, account_name: str, database_name: str, - container_name: str, + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_sql_container_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(redistribute_throughput_parameters, (IO, bytes)): + _content = redistribute_throughput_parameters + else: + _json = self._serialize.body(redistribute_throughput_parameters, "RedistributeThroughputParameters") + + request = build_sql_database_redistribute_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_sql_container_to_manual_throughput_initial.metadata['url'], + content_type=content_type, + json=_json, + content=_content, + template_url=self._sql_database_redistribute_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3867,35 +4927,123 @@ def _migrate_sql_container_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_sql_container_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + _sql_database_redistribute_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/redistributeThroughput"} # type: ignore + + @overload + def begin_sql_database_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + redistribute_throughput_parameters: _models.RedistributeThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB SQL database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current SQL database. Required. + :type redistribute_throughput_parameters: + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_sql_database_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + redistribute_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB SQL database. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current SQL database. Required. + :type redistribute_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def begin_migrate_sql_container_to_manual_throughput( + def begin_sql_database_redistribute_throughput( self, resource_group_name: str, account_name: str, database_name: str, - container_name: str, + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: - """Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput. + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB SQL database. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. - :type container_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current SQL database. Is either a model type or a IO type. Required. + :type redistribute_throughput_parameters: + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -3904,52 +5052,60 @@ def begin_migrate_sql_container_to_manual_throughput( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the - result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_sql_container_to_manual_throughput_initial( + raw_result = self._sql_database_redistribute_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, - container_name=container_name, + redistribute_throughput_parameters=redistribute_throughput_parameters, api_version=api_version, - cls=lambda x,y,z: x, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_sql_container_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_sql_database_redistribute_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/redistributeThroughput"} # type: ignore def _sql_container_retrieve_throughput_distribution_initial( self, @@ -3957,39 +5113,53 @@ def _sql_container_retrieve_throughput_distribution_initial( account_name: str, database_name: str, container_name: str, - retrieve_throughput_parameters: "_models.RetrieveThroughputParameters", + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], **kwargs: Any - ) -> Optional["_models.PhysicalPartitionThroughputInfoResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionThroughputInfoResult"]] + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(retrieve_throughput_parameters, 'RetrieveThroughputParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] - request = build_sql_container_retrieve_throughput_distribution_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(retrieve_throughput_parameters, (IO, bytes)): + _content = retrieve_throughput_parameters + else: + _json = self._serialize.body(retrieve_throughput_parameters, "RetrieveThroughputParameters") + + request = build_sql_container_retrieve_throughput_distribution_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._sql_container_retrieve_throughput_distribution_initial.metadata['url'], + content=_content, + template_url=self._sql_container_retrieve_throughput_distribution_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3998,15 +5168,102 @@ def _sql_container_retrieve_throughput_distribution_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _sql_container_retrieve_throughput_distribution_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + _sql_container_retrieve_throughput_distribution_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + + @overload + def begin_sql_container_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + retrieve_throughput_parameters: _models.RetrieveThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current SQL container. Required. + :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_sql_container_retrieve_throughput_distribution( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + retrieve_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Retrieve throughput distribution for an Azure Cosmos DB SQL container. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput + distribution for the current SQL container. Required. + :type retrieve_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_sql_container_retrieve_throughput_distribution( @@ -4015,22 +5272,27 @@ def begin_sql_container_retrieve_throughput_distribution( account_name: str, database_name: str, container_name: str, - retrieve_throughput_parameters: "_models.RetrieveThroughputParameters", + retrieve_throughput_parameters: Union[_models.RetrieveThroughputParameters, IO], **kwargs: Any - ) -> LROPoller["_models.PhysicalPartitionThroughputInfoResult"]: + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: """Retrieve throughput distribution for an Azure Cosmos DB SQL container. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :param retrieve_throughput_parameters: The parameters to provide for retrieving throughput - distribution for the current SQL container. + distribution for the current SQL container. Is either a model type or a IO type. Required. :type retrieve_throughput_parameters: ~azure.mgmt.cosmosdb.models.RetrieveThroughputParameters + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -4043,19 +5305,19 @@ def begin_sql_container_retrieve_throughput_distribution( the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionThroughputInfoResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._sql_container_retrieve_throughput_distribution_initial( + raw_result = self._sql_container_retrieve_throughput_distribution_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -4063,32 +5325,37 @@ def begin_sql_container_retrieve_throughput_distribution( retrieve_throughput_parameters=retrieve_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_sql_container_retrieve_throughput_distribution.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore + begin_sql_container_retrieve_throughput_distribution.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution"} # type: ignore def _sql_container_redistribute_throughput_initial( self, @@ -4096,39 +5363,53 @@ def _sql_container_redistribute_throughput_initial( account_name: str, database_name: str, container_name: str, - redistribute_throughput_parameters: "_models.RedistributeThroughputParameters", + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], **kwargs: Any - ) -> Optional["_models.PhysicalPartitionThroughputInfoResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionThroughputInfoResult"]] + ) -> Optional[_models.PhysicalPartitionThroughputInfoResult]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(redistribute_throughput_parameters, 'RedistributeThroughputParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.PhysicalPartitionThroughputInfoResult]] - request = build_sql_container_redistribute_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(redistribute_throughput_parameters, (IO, bytes)): + _content = redistribute_throughput_parameters + else: + _json = self._serialize.body(redistribute_throughput_parameters, "RedistributeThroughputParameters") + + request = build_sql_container_redistribute_throughput_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._sql_container_redistribute_throughput_initial.metadata['url'], + content=_content, + template_url=self._sql_container_redistribute_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4137,15 +5418,103 @@ def _sql_container_redistribute_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _sql_container_redistribute_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput"} # type: ignore + _sql_container_redistribute_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput"} # type: ignore + + @overload + def begin_sql_container_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + redistribute_throughput_parameters: _models.RedistributeThroughputParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB SQL container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current SQL container. Required. + :type redistribute_throughput_parameters: + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_sql_container_redistribute_throughput( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + redistribute_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: + """Redistribute throughput for an Azure Cosmos DB SQL container. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param redistribute_throughput_parameters: The parameters to provide for redistributing + throughput for the current SQL container. Required. + :type redistribute_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionThroughputInfoResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_sql_container_redistribute_throughput( @@ -4154,23 +5523,27 @@ def begin_sql_container_redistribute_throughput( account_name: str, database_name: str, container_name: str, - redistribute_throughput_parameters: "_models.RedistributeThroughputParameters", + redistribute_throughput_parameters: Union[_models.RedistributeThroughputParameters, IO], **kwargs: Any - ) -> LROPoller["_models.PhysicalPartitionThroughputInfoResult"]: + ) -> LROPoller[_models.PhysicalPartitionThroughputInfoResult]: """Redistribute throughput for an Azure Cosmos DB SQL container. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :param redistribute_throughput_parameters: The parameters to provide for redistributing - throughput for the current SQL container. + throughput for the current SQL container. Is either a model type or a IO type. Required. :type redistribute_throughput_parameters: - ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters + ~azure.mgmt.cosmosdb.models.RedistributeThroughputParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -4183,19 +5556,19 @@ def begin_sql_container_redistribute_throughput( the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionThroughputInfoResult] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionThroughputInfoResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.PhysicalPartitionThroughputInfoResult] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._sql_container_redistribute_throughput_initial( + raw_result = self._sql_container_redistribute_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -4203,93 +5576,98 @@ def begin_sql_container_redistribute_throughput( redistribute_throughput_parameters=redistribute_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('PhysicalPartitionThroughputInfoResult', pipeline_response) + deserialized = self._deserialize("PhysicalPartitionThroughputInfoResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_sql_container_redistribute_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput"} # type: ignore + begin_sql_container_redistribute_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput"} # type: ignore @distributed_trace def list_sql_stored_procedures( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> Iterable["_models.SqlStoredProcedureListResult"]: + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> Iterable["_models.SqlStoredProcedureGetResults"]: """Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlStoredProcedureListResult or the result of + :return: An iterator like instance of either SqlStoredProcedureGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlStoredProcedureListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlStoredProcedureListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlStoredProcedureListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_stored_procedures_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_stored_procedures.metadata['url'], + template_url=self.list_sql_stored_procedures.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_stored_procedures_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - container_name=container_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -4303,10 +5681,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4316,11 +5692,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_sql_stored_procedures.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures"} # type: ignore + list_sql_stored_procedures.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures"} # type: ignore @distributed_trace def get_sql_stored_procedure( @@ -4331,66 +5705,72 @@ def get_sql_stored_procedure( container_name: str, stored_procedure_name: str, **kwargs: Any - ) -> "_models.SqlStoredProcedureGetResults": + ) -> _models.SqlStoredProcedureGetResults: """Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param stored_procedure_name: Cosmos DB storedProcedure name. + :param stored_procedure_name: Cosmos DB storedProcedure name. Required. :type stored_procedure_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlStoredProcedureGetResults, or the result of cls(response) + :return: SqlStoredProcedureGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlStoredProcedureGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlStoredProcedureGetResults] - request = build_get_sql_stored_procedure_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, stored_procedure_name=stored_procedure_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_stored_procedure.metadata['url'], + template_url=self.get_sql_stored_procedure.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlStoredProcedureGetResults', pipeline_response) + deserialized = self._deserialize("SqlStoredProcedureGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_stored_procedure.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore - + get_sql_stored_procedure.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore def _create_update_sql_stored_procedure_initial( self, @@ -4399,40 +5779,56 @@ def _create_update_sql_stored_procedure_initial( database_name: str, container_name: str, stored_procedure_name: str, - create_update_sql_stored_procedure_parameters: "_models.SqlStoredProcedureCreateUpdateParameters", + create_update_sql_stored_procedure_parameters: Union[_models.SqlStoredProcedureCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.SqlStoredProcedureGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlStoredProcedureGetResults"]] + ) -> Optional[_models.SqlStoredProcedureGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_sql_stored_procedure_parameters, 'SqlStoredProcedureCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlStoredProcedureGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_stored_procedure_parameters, (IO, bytes)): + _content = create_update_sql_stored_procedure_parameters + else: + _json = self._serialize.body( + create_update_sql_stored_procedure_parameters, "SqlStoredProcedureCreateUpdateParameters" + ) - request = build_create_update_sql_stored_procedure_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_sql_stored_procedure_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, stored_procedure_name=stored_procedure_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_stored_procedure_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_stored_procedure_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4441,15 +5837,107 @@ def _create_update_sql_stored_procedure_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlStoredProcedureGetResults', pipeline_response) + deserialized = self._deserialize("SqlStoredProcedureGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_stored_procedure_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore + _create_update_sql_stored_procedure_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore + + @overload + def begin_create_update_sql_stored_procedure( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + stored_procedure_name: str, + create_update_sql_stored_procedure_parameters: _models.SqlStoredProcedureCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlStoredProcedureGetResults]: + """Create or update an Azure Cosmos DB SQL storedProcedure. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param stored_procedure_name: Cosmos DB storedProcedure name. Required. + :type stored_procedure_name: str + :param create_update_sql_stored_procedure_parameters: The parameters to provide for the current + SQL storedProcedure. Required. + :type create_update_sql_stored_procedure_parameters: + ~azure.mgmt.cosmosdb.models.SqlStoredProcedureCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlStoredProcedureGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_sql_stored_procedure( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + stored_procedure_name: str, + create_update_sql_stored_procedure_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlStoredProcedureGetResults]: + """Create or update an Azure Cosmos DB SQL storedProcedure. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param stored_procedure_name: Cosmos DB storedProcedure name. Required. + :type stored_procedure_name: str + :param create_update_sql_stored_procedure_parameters: The parameters to provide for the current + SQL storedProcedure. Required. + :type create_update_sql_stored_procedure_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlStoredProcedureGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_sql_stored_procedure( @@ -4459,25 +5947,29 @@ def begin_create_update_sql_stored_procedure( database_name: str, container_name: str, stored_procedure_name: str, - create_update_sql_stored_procedure_parameters: "_models.SqlStoredProcedureCreateUpdateParameters", + create_update_sql_stored_procedure_parameters: Union[_models.SqlStoredProcedureCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.SqlStoredProcedureGetResults"]: + ) -> LROPoller[_models.SqlStoredProcedureGetResults]: """Create or update an Azure Cosmos DB SQL storedProcedure. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param stored_procedure_name: Cosmos DB storedProcedure name. + :param stored_procedure_name: Cosmos DB storedProcedure name. Required. :type stored_procedure_name: str :param create_update_sql_stored_procedure_parameters: The parameters to provide for the current - SQL storedProcedure. + SQL storedProcedure. Is either a model type or a IO type. Required. :type create_update_sql_stored_procedure_parameters: - ~azure.mgmt.cosmosdb.models.SqlStoredProcedureCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlStoredProcedureCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -4489,19 +5981,19 @@ def begin_create_update_sql_stored_procedure( :return: An instance of LROPoller that returns either SqlStoredProcedureGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlStoredProcedureGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlStoredProcedureGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_sql_stored_procedure_initial( + raw_result = self._create_update_sql_stored_procedure_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -4510,32 +6002,35 @@ def begin_create_update_sql_stored_procedure( create_update_sql_stored_procedure_parameters=create_update_sql_stored_procedure_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlStoredProcedureGetResults', pipeline_response) + deserialized = self._deserialize("SqlStoredProcedureGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_stored_procedure.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore + begin_create_update_sql_stored_procedure.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore def _delete_sql_stored_procedure_initial( # pylint: disable=inconsistent-return-statements self, @@ -4546,33 +6041,39 @@ def _delete_sql_stored_procedure_initial( # pylint: disable=inconsistent-return stored_procedure_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_stored_procedure_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_stored_procedure_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, stored_procedure_name=stored_procedure_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_stored_procedure_initial.metadata['url'], + template_url=self._delete_sql_stored_procedure_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -4582,11 +6083,10 @@ def _delete_sql_stored_procedure_initial( # pylint: disable=inconsistent-return if cls: return cls(pipeline_response, None, {}) - _delete_sql_stored_procedure_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore - + _delete_sql_stored_procedure_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore @distributed_trace - def begin_delete_sql_stored_procedure( # pylint: disable=inconsistent-return-statements + def begin_delete_sql_stored_procedure( self, resource_group_name: str, account_name: str, @@ -4598,14 +6098,15 @@ def begin_delete_sql_stored_procedure( # pylint: disable=inconsistent-return-st """Deletes an existing Azure Cosmos DB SQL storedProcedure. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param stored_procedure_name: Cosmos DB storedProcedure name. + :param stored_procedure_name: Cosmos DB storedProcedure name. Required. :type stored_procedure_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -4617,109 +6118,113 @@ def begin_delete_sql_stored_procedure( # pylint: disable=inconsistent-return-st Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_sql_stored_procedure_initial( + raw_result = self._delete_sql_stored_procedure_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, stored_procedure_name=stored_procedure_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_stored_procedure.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore + begin_delete_sql_stored_procedure.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}"} # type: ignore @distributed_trace def list_sql_user_defined_functions( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> Iterable["_models.SqlUserDefinedFunctionListResult"]: + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> Iterable["_models.SqlUserDefinedFunctionGetResults"]: """Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlUserDefinedFunctionListResult or the result of + :return: An iterator like instance of either SqlUserDefinedFunctionGetResults or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionListResult] - :raises: ~azure.core.exceptions.HttpResponseError + ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlUserDefinedFunctionListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlUserDefinedFunctionListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_user_defined_functions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_user_defined_functions.metadata['url'], + template_url=self.list_sql_user_defined_functions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_user_defined_functions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - container_name=container_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -4733,10 +6238,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4746,11 +6249,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_sql_user_defined_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions"} # type: ignore + list_sql_user_defined_functions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions"} # type: ignore @distributed_trace def get_sql_user_defined_function( @@ -4761,66 +6262,72 @@ def get_sql_user_defined_function( container_name: str, user_defined_function_name: str, **kwargs: Any - ) -> "_models.SqlUserDefinedFunctionGetResults": + ) -> _models.SqlUserDefinedFunctionGetResults: """Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param user_defined_function_name: Cosmos DB userDefinedFunction name. + :param user_defined_function_name: Cosmos DB userDefinedFunction name. Required. :type user_defined_function_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlUserDefinedFunctionGetResults, or the result of cls(response) + :return: SqlUserDefinedFunctionGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlUserDefinedFunctionGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlUserDefinedFunctionGetResults] - request = build_get_sql_user_defined_function_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, user_defined_function_name=user_defined_function_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_user_defined_function.metadata['url'], + template_url=self.get_sql_user_defined_function.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlUserDefinedFunctionGetResults', pipeline_response) + deserialized = self._deserialize("SqlUserDefinedFunctionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_user_defined_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore - + get_sql_user_defined_function.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore def _create_update_sql_user_defined_function_initial( self, @@ -4829,40 +6336,58 @@ def _create_update_sql_user_defined_function_initial( database_name: str, container_name: str, user_defined_function_name: str, - create_update_sql_user_defined_function_parameters: "_models.SqlUserDefinedFunctionCreateUpdateParameters", + create_update_sql_user_defined_function_parameters: Union[ + _models.SqlUserDefinedFunctionCreateUpdateParameters, IO + ], **kwargs: Any - ) -> Optional["_models.SqlUserDefinedFunctionGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlUserDefinedFunctionGetResults"]] + ) -> Optional[_models.SqlUserDefinedFunctionGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_sql_user_defined_function_parameters, 'SqlUserDefinedFunctionCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlUserDefinedFunctionGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_user_defined_function_parameters, (IO, bytes)): + _content = create_update_sql_user_defined_function_parameters + else: + _json = self._serialize.body( + create_update_sql_user_defined_function_parameters, "SqlUserDefinedFunctionCreateUpdateParameters" + ) - request = build_create_update_sql_user_defined_function_request_initial( - subscription_id=self._config.subscription_id, + request = build_create_update_sql_user_defined_function_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, user_defined_function_name=user_defined_function_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_user_defined_function_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_user_defined_function_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4871,15 +6396,109 @@ def _create_update_sql_user_defined_function_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlUserDefinedFunctionGetResults', pipeline_response) + deserialized = self._deserialize("SqlUserDefinedFunctionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_user_defined_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore + _create_update_sql_user_defined_function_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore + + @overload + def begin_create_update_sql_user_defined_function( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + user_defined_function_name: str, + create_update_sql_user_defined_function_parameters: _models.SqlUserDefinedFunctionCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlUserDefinedFunctionGetResults]: + """Create or update an Azure Cosmos DB SQL userDefinedFunction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param user_defined_function_name: Cosmos DB userDefinedFunction name. Required. + :type user_defined_function_name: str + :param create_update_sql_user_defined_function_parameters: The parameters to provide for the + current SQL userDefinedFunction. Required. + :type create_update_sql_user_defined_function_parameters: + ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlUserDefinedFunctionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_sql_user_defined_function( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + user_defined_function_name: str, + create_update_sql_user_defined_function_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlUserDefinedFunctionGetResults]: + """Create or update an Azure Cosmos DB SQL userDefinedFunction. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param user_defined_function_name: Cosmos DB userDefinedFunction name. Required. + :type user_defined_function_name: str + :param create_update_sql_user_defined_function_parameters: The parameters to provide for the + current SQL userDefinedFunction. Required. + :type create_update_sql_user_defined_function_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlUserDefinedFunctionGetResults or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_sql_user_defined_function( @@ -4889,25 +6508,31 @@ def begin_create_update_sql_user_defined_function( database_name: str, container_name: str, user_defined_function_name: str, - create_update_sql_user_defined_function_parameters: "_models.SqlUserDefinedFunctionCreateUpdateParameters", + create_update_sql_user_defined_function_parameters: Union[ + _models.SqlUserDefinedFunctionCreateUpdateParameters, IO + ], **kwargs: Any - ) -> LROPoller["_models.SqlUserDefinedFunctionGetResults"]: + ) -> LROPoller[_models.SqlUserDefinedFunctionGetResults]: """Create or update an Azure Cosmos DB SQL userDefinedFunction. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param user_defined_function_name: Cosmos DB userDefinedFunction name. + :param user_defined_function_name: Cosmos DB userDefinedFunction name. Required. :type user_defined_function_name: str :param create_update_sql_user_defined_function_parameters: The parameters to provide for the - current SQL userDefinedFunction. + current SQL userDefinedFunction. Is either a model type or a IO type. Required. :type create_update_sql_user_defined_function_parameters: - ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -4920,19 +6545,19 @@ def begin_create_update_sql_user_defined_function( result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlUserDefinedFunctionGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlUserDefinedFunctionGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_sql_user_defined_function_initial( + raw_result = self._create_update_sql_user_defined_function_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -4941,32 +6566,35 @@ def begin_create_update_sql_user_defined_function( create_update_sql_user_defined_function_parameters=create_update_sql_user_defined_function_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlUserDefinedFunctionGetResults', pipeline_response) + deserialized = self._deserialize("SqlUserDefinedFunctionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_user_defined_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore + begin_create_update_sql_user_defined_function.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore def _delete_sql_user_defined_function_initial( # pylint: disable=inconsistent-return-statements self, @@ -4977,33 +6605,39 @@ def _delete_sql_user_defined_function_initial( # pylint: disable=inconsistent-r user_defined_function_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_user_defined_function_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_user_defined_function_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, user_defined_function_name=user_defined_function_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_user_defined_function_initial.metadata['url'], + template_url=self._delete_sql_user_defined_function_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -5013,11 +6647,10 @@ def _delete_sql_user_defined_function_initial( # pylint: disable=inconsistent-r if cls: return cls(pipeline_response, None, {}) - _delete_sql_user_defined_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore - + _delete_sql_user_defined_function_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore @distributed_trace - def begin_delete_sql_user_defined_function( # pylint: disable=inconsistent-return-statements + def begin_delete_sql_user_defined_function( self, resource_group_name: str, account_name: str, @@ -5029,14 +6662,15 @@ def begin_delete_sql_user_defined_function( # pylint: disable=inconsistent-retu """Deletes an existing Azure Cosmos DB SQL userDefinedFunction. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param user_defined_function_name: Cosmos DB userDefinedFunction name. + :param user_defined_function_name: Cosmos DB userDefinedFunction name. Required. :type user_defined_function_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -5048,108 +6682,112 @@ def begin_delete_sql_user_defined_function( # pylint: disable=inconsistent-retu Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_sql_user_defined_function_initial( + raw_result = self._delete_sql_user_defined_function_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, user_defined_function_name=user_defined_function_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_user_defined_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore + begin_delete_sql_user_defined_function.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}"} # type: ignore @distributed_trace def list_sql_triggers( - self, - resource_group_name: str, - account_name: str, - database_name: str, - container_name: str, - **kwargs: Any - ) -> Iterable["_models.SqlTriggerListResult"]: + self, resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any + ) -> Iterable["_models.SqlTriggerGetResults"]: """Lists the SQL trigger under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlTriggerListResult or the result of + :return: An iterator like instance of either SqlTriggerGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlTriggerListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlTriggerGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlTriggerListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlTriggerListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_triggers_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_triggers.metadata['url'], + template_url=self.list_sql_triggers.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_triggers_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - container_name=container_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -5163,10 +6801,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5176,11 +6812,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_sql_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers"} # type: ignore + list_sql_triggers.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers"} # type: ignore @distributed_trace def get_sql_trigger( @@ -5191,66 +6825,72 @@ def get_sql_trigger( container_name: str, trigger_name: str, **kwargs: Any - ) -> "_models.SqlTriggerGetResults": + ) -> _models.SqlTriggerGetResults: """Gets the SQL trigger under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param trigger_name: Cosmos DB trigger name. + :param trigger_name: Cosmos DB trigger name. Required. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlTriggerGetResults, or the result of cls(response) + :return: SqlTriggerGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlTriggerGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlTriggerGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlTriggerGetResults] - request = build_get_sql_trigger_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, trigger_name=trigger_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_trigger.metadata['url'], + template_url=self.get_sql_trigger.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlTriggerGetResults', pipeline_response) + deserialized = self._deserialize("SqlTriggerGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_trigger.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore - + get_sql_trigger.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore def _create_update_sql_trigger_initial( self, @@ -5259,40 +6899,54 @@ def _create_update_sql_trigger_initial( database_name: str, container_name: str, trigger_name: str, - create_update_sql_trigger_parameters: "_models.SqlTriggerCreateUpdateParameters", + create_update_sql_trigger_parameters: Union[_models.SqlTriggerCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.SqlTriggerGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlTriggerGetResults"]] + ) -> Optional[_models.SqlTriggerGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_sql_trigger_parameters, 'SqlTriggerCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlTriggerGetResults]] - request = build_create_update_sql_trigger_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_trigger_parameters, (IO, bytes)): + _content = create_update_sql_trigger_parameters + else: + _json = self._serialize.body(create_update_sql_trigger_parameters, "SqlTriggerCreateUpdateParameters") + + request = build_create_update_sql_trigger_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, trigger_name=trigger_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_trigger_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_trigger_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -5301,15 +6955,107 @@ def _create_update_sql_trigger_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlTriggerGetResults', pipeline_response) + deserialized = self._deserialize("SqlTriggerGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_trigger_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore + _create_update_sql_trigger_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore + + @overload + def begin_create_update_sql_trigger( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + trigger_name: str, + create_update_sql_trigger_parameters: _models.SqlTriggerCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlTriggerGetResults]: + """Create or update an Azure Cosmos DB SQL trigger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param trigger_name: Cosmos DB trigger name. Required. + :type trigger_name: str + :param create_update_sql_trigger_parameters: The parameters to provide for the current SQL + trigger. Required. + :type create_update_sql_trigger_parameters: + ~azure.mgmt.cosmosdb.models.SqlTriggerCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlTriggerGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlTriggerGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_sql_trigger( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + trigger_name: str, + create_update_sql_trigger_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlTriggerGetResults]: + """Create or update an Azure Cosmos DB SQL trigger. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param trigger_name: Cosmos DB trigger name. Required. + :type trigger_name: str + :param create_update_sql_trigger_parameters: The parameters to provide for the current SQL + trigger. Required. + :type create_update_sql_trigger_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlTriggerGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlTriggerGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_sql_trigger( @@ -5319,25 +7065,29 @@ def begin_create_update_sql_trigger( database_name: str, container_name: str, trigger_name: str, - create_update_sql_trigger_parameters: "_models.SqlTriggerCreateUpdateParameters", + create_update_sql_trigger_parameters: Union[_models.SqlTriggerCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.SqlTriggerGetResults"]: + ) -> LROPoller[_models.SqlTriggerGetResults]: """Create or update an Azure Cosmos DB SQL trigger. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param trigger_name: Cosmos DB trigger name. + :param trigger_name: Cosmos DB trigger name. Required. :type trigger_name: str :param create_update_sql_trigger_parameters: The parameters to provide for the current SQL - trigger. + trigger. Is either a model type or a IO type. Required. :type create_update_sql_trigger_parameters: - ~azure.mgmt.cosmosdb.models.SqlTriggerCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlTriggerCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -5349,19 +7099,19 @@ def begin_create_update_sql_trigger( :return: An instance of LROPoller that returns either SqlTriggerGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlTriggerGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlTriggerGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlTriggerGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_sql_trigger_initial( + raw_result = self._create_update_sql_trigger_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -5370,32 +7120,35 @@ def begin_create_update_sql_trigger( create_update_sql_trigger_parameters=create_update_sql_trigger_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlTriggerGetResults', pipeline_response) + deserialized = self._deserialize("SqlTriggerGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_trigger.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore + begin_create_update_sql_trigger.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore def _delete_sql_trigger_initial( # pylint: disable=inconsistent-return-statements self, @@ -5406,33 +7159,39 @@ def _delete_sql_trigger_initial( # pylint: disable=inconsistent-return-statemen trigger_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_trigger_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_trigger_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, trigger_name=trigger_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_trigger_initial.metadata['url'], + template_url=self._delete_sql_trigger_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -5442,11 +7201,10 @@ def _delete_sql_trigger_initial( # pylint: disable=inconsistent-return-statemen if cls: return cls(pipeline_response, None, {}) - _delete_sql_trigger_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore - + _delete_sql_trigger_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore @distributed_trace - def begin_delete_sql_trigger( # pylint: disable=inconsistent-return-statements + def begin_delete_sql_trigger( self, resource_group_name: str, account_name: str, @@ -5458,14 +7216,15 @@ def begin_delete_sql_trigger( # pylint: disable=inconsistent-return-statements """Deletes an existing Azure Cosmos DB SQL trigger. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param trigger_name: Cosmos DB trigger name. + :param trigger_name: Cosmos DB trigger name. Required. :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -5477,147 +7236,169 @@ def begin_delete_sql_trigger( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_sql_trigger_initial( + raw_result = self._delete_sql_trigger_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, trigger_name=trigger_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_trigger.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore + begin_delete_sql_trigger.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}"} # type: ignore @distributed_trace def get_sql_role_definition( - self, - role_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.SqlRoleDefinitionGetResults": + self, role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.SqlRoleDefinitionGetResults: """Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. - :param role_definition_id: The GUID for the Role Definition. + :param role_definition_id: The GUID for the Role Definition. Required. :type role_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlRoleDefinitionGetResults, or the result of cls(response) + :return: SqlRoleDefinitionGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlRoleDefinitionGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlRoleDefinitionGetResults] - request = build_get_sql_role_definition_request( role_definition_id=role_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_role_definition.metadata['url'], + template_url=self.get_sql_role_definition.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlRoleDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("SqlRoleDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_role_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore - + get_sql_role_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore def _create_update_sql_role_definition_initial( self, role_definition_id: str, resource_group_name: str, account_name: str, - create_update_sql_role_definition_parameters: "_models.SqlRoleDefinitionCreateUpdateParameters", + create_update_sql_role_definition_parameters: Union[_models.SqlRoleDefinitionCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.SqlRoleDefinitionGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlRoleDefinitionGetResults"]] + ) -> Optional[_models.SqlRoleDefinitionGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_sql_role_definition_parameters, 'SqlRoleDefinitionCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlRoleDefinitionGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_role_definition_parameters, (IO, bytes)): + _content = create_update_sql_role_definition_parameters + else: + _json = self._serialize.body( + create_update_sql_role_definition_parameters, "SqlRoleDefinitionCreateUpdateParameters" + ) - request = build_create_update_sql_role_definition_request_initial( + request = build_create_update_sql_role_definition_request( role_definition_id=role_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_role_definition_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_role_definition_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -5626,15 +7407,95 @@ def _create_update_sql_role_definition_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlRoleDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("SqlRoleDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) - return deserialized + return deserialized + + _create_update_sql_role_definition_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore + + @overload + def begin_create_update_sql_role_definition( + self, + role_definition_id: str, + resource_group_name: str, + account_name: str, + create_update_sql_role_definition_parameters: _models.SqlRoleDefinitionCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlRoleDefinitionGetResults]: + """Creates or updates an Azure Cosmos DB SQL Role Definition. + + :param role_definition_id: The GUID for the Role Definition. Required. + :type role_definition_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_sql_role_definition_parameters: The properties required to create or + update a Role Definition. Required. + :type create_update_sql_role_definition_parameters: + ~azure.mgmt.cosmosdb.models.SqlRoleDefinitionCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlRoleDefinitionGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ - _create_update_sql_role_definition_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore + @overload + def begin_create_update_sql_role_definition( + self, + role_definition_id: str, + resource_group_name: str, + account_name: str, + create_update_sql_role_definition_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlRoleDefinitionGetResults]: + """Creates or updates an Azure Cosmos DB SQL Role Definition. + :param role_definition_id: The GUID for the Role Definition. Required. + :type role_definition_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_sql_role_definition_parameters: The properties required to create or + update a Role Definition. Required. + :type create_update_sql_role_definition_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlRoleDefinitionGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_sql_role_definition( @@ -5642,21 +7503,25 @@ def begin_create_update_sql_role_definition( role_definition_id: str, resource_group_name: str, account_name: str, - create_update_sql_role_definition_parameters: "_models.SqlRoleDefinitionCreateUpdateParameters", + create_update_sql_role_definition_parameters: Union[_models.SqlRoleDefinitionCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.SqlRoleDefinitionGetResults"]: + ) -> LROPoller[_models.SqlRoleDefinitionGetResults]: """Creates or updates an Azure Cosmos DB SQL Role Definition. - :param role_definition_id: The GUID for the Role Definition. + :param role_definition_id: The GUID for the Role Definition. Required. :type role_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param create_update_sql_role_definition_parameters: The properties required to create or - update a Role Definition. + update a Role Definition. Is either a model type or a IO type. Required. :type create_update_sql_role_definition_parameters: - ~azure.mgmt.cosmosdb.models.SqlRoleDefinitionCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlRoleDefinitionCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -5668,84 +7533,89 @@ def begin_create_update_sql_role_definition( :return: An instance of LROPoller that returns either SqlRoleDefinitionGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlRoleDefinitionGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlRoleDefinitionGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_sql_role_definition_initial( + raw_result = self._create_update_sql_role_definition_initial( # type: ignore role_definition_id=role_definition_id, resource_group_name=resource_group_name, account_name=account_name, create_update_sql_role_definition_parameters=create_update_sql_role_definition_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlRoleDefinitionGetResults', pipeline_response) + deserialized = self._deserialize("SqlRoleDefinitionGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_role_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore + begin_create_update_sql_role_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore def _delete_sql_role_definition_initial( # pylint: disable=inconsistent-return-statements - self, - role_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + self, role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_role_definition_request_initial( + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_role_definition_request( role_definition_id=role_definition_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_role_definition_initial.metadata['url'], + template_url=self._delete_sql_role_definition_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -5755,24 +7625,20 @@ def _delete_sql_role_definition_initial( # pylint: disable=inconsistent-return- if cls: return cls(pipeline_response, None, {}) - _delete_sql_role_definition_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore - + _delete_sql_role_definition_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore @distributed_trace - def begin_delete_sql_role_definition( # pylint: disable=inconsistent-return-statements - self, - role_definition_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + def begin_delete_sql_role_definition( + self, role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB SQL Role Definition. - :param role_definition_id: The GUID for the Role Definition. + :param role_definition_id: The GUID for the Role Definition. Required. :type role_definition_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -5784,96 +7650,104 @@ def begin_delete_sql_role_definition( # pylint: disable=inconsistent-return-sta Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_sql_role_definition_initial( + raw_result = self._delete_sql_role_definition_initial( # type: ignore role_definition_id=role_definition_id, resource_group_name=resource_group_name, account_name=account_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_role_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore + begin_delete_sql_role_definition.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}"} # type: ignore @distributed_trace def list_sql_role_definitions( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.SqlRoleDefinitionListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.SqlRoleDefinitionGetResults"]: """Retrieves the list of all Azure Cosmos DB SQL Role Definitions. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlRoleDefinitionListResult or the result of + :return: An iterator like instance of either SqlRoleDefinitionGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlRoleDefinitionListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlRoleDefinitionListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_role_definitions_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_role_definitions.metadata['url'], + template_url=self.list_sql_role_definitions.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_role_definitions_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -5887,10 +7761,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5900,111 +7772,127 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_sql_role_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions"} # type: ignore + list_sql_role_definitions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions"} # type: ignore @distributed_trace def get_sql_role_assignment( - self, - role_assignment_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.SqlRoleAssignmentGetResults": + self, role_assignment_id: str, resource_group_name: str, account_name: str, **kwargs: Any + ) -> _models.SqlRoleAssignmentGetResults: """Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. - :param role_assignment_id: The GUID for the Role Assignment. + :param role_assignment_id: The GUID for the Role Assignment. Required. :type role_assignment_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SqlRoleAssignmentGetResults, or the result of cls(response) + :return: SqlRoleAssignmentGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlRoleAssignmentGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlRoleAssignmentGetResults] - request = build_get_sql_role_assignment_request( role_assignment_id=role_assignment_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_sql_role_assignment.metadata['url'], + template_url=self.get_sql_role_assignment.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SqlRoleAssignmentGetResults', pipeline_response) + deserialized = self._deserialize("SqlRoleAssignmentGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_role_assignment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore - + get_sql_role_assignment.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore def _create_update_sql_role_assignment_initial( self, role_assignment_id: str, resource_group_name: str, account_name: str, - create_update_sql_role_assignment_parameters: "_models.SqlRoleAssignmentCreateUpdateParameters", + create_update_sql_role_assignment_parameters: Union[_models.SqlRoleAssignmentCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.SqlRoleAssignmentGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlRoleAssignmentGetResults"]] + ) -> Optional[_models.SqlRoleAssignmentGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_update_sql_role_assignment_parameters, 'SqlRoleAssignmentCreateUpdateParameters') + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.SqlRoleAssignmentGetResults]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_sql_role_assignment_parameters, (IO, bytes)): + _content = create_update_sql_role_assignment_parameters + else: + _json = self._serialize.body( + create_update_sql_role_assignment_parameters, "SqlRoleAssignmentCreateUpdateParameters" + ) - request = build_create_update_sql_role_assignment_request_initial( + request = build_create_update_sql_role_assignment_request( role_assignment_id=role_assignment_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_sql_role_assignment_initial.metadata['url'], + content=_content, + template_url=self._create_update_sql_role_assignment_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -6013,15 +7901,95 @@ def _create_update_sql_role_assignment_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SqlRoleAssignmentGetResults', pipeline_response) + deserialized = self._deserialize("SqlRoleAssignmentGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_sql_role_assignment_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore + _create_update_sql_role_assignment_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore + + @overload + def begin_create_update_sql_role_assignment( + self, + role_assignment_id: str, + resource_group_name: str, + account_name: str, + create_update_sql_role_assignment_parameters: _models.SqlRoleAssignmentCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlRoleAssignmentGetResults]: + """Creates or updates an Azure Cosmos DB SQL Role Assignment. + + :param role_assignment_id: The GUID for the Role Assignment. Required. + :type role_assignment_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_sql_role_assignment_parameters: The properties required to create or + update a Role Assignment. Required. + :type create_update_sql_role_assignment_parameters: + ~azure.mgmt.cosmosdb.models.SqlRoleAssignmentCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlRoleAssignmentGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_update_sql_role_assignment( + self, + role_assignment_id: str, + resource_group_name: str, + account_name: str, + create_update_sql_role_assignment_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SqlRoleAssignmentGetResults]: + """Creates or updates an Azure Cosmos DB SQL Role Assignment. + :param role_assignment_id: The GUID for the Role Assignment. Required. + :type role_assignment_id: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param create_update_sql_role_assignment_parameters: The properties required to create or + update a Role Assignment. Required. + :type create_update_sql_role_assignment_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SqlRoleAssignmentGetResults or the result + of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_create_update_sql_role_assignment( @@ -6029,21 +7997,25 @@ def begin_create_update_sql_role_assignment( role_assignment_id: str, resource_group_name: str, account_name: str, - create_update_sql_role_assignment_parameters: "_models.SqlRoleAssignmentCreateUpdateParameters", + create_update_sql_role_assignment_parameters: Union[_models.SqlRoleAssignmentCreateUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.SqlRoleAssignmentGetResults"]: + ) -> LROPoller[_models.SqlRoleAssignmentGetResults]: """Creates or updates an Azure Cosmos DB SQL Role Assignment. - :param role_assignment_id: The GUID for the Role Assignment. + :param role_assignment_id: The GUID for the Role Assignment. Required. :type role_assignment_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :param create_update_sql_role_assignment_parameters: The properties required to create or - update a Role Assignment. + update a Role Assignment. Is either a model type or a IO type. Required. :type create_update_sql_role_assignment_parameters: - ~azure.mgmt.cosmosdb.models.SqlRoleAssignmentCreateUpdateParameters + ~azure.mgmt.cosmosdb.models.SqlRoleAssignmentCreateUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -6055,84 +8027,89 @@ def begin_create_update_sql_role_assignment( :return: An instance of LROPoller that returns either SqlRoleAssignmentGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlRoleAssignmentGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlRoleAssignmentGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_sql_role_assignment_initial( + raw_result = self._create_update_sql_role_assignment_initial( # type: ignore role_assignment_id=role_assignment_id, resource_group_name=resource_group_name, account_name=account_name, create_update_sql_role_assignment_parameters=create_update_sql_role_assignment_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('SqlRoleAssignmentGetResults', pipeline_response) + deserialized = self._deserialize("SqlRoleAssignmentGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_sql_role_assignment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore + begin_create_update_sql_role_assignment.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore def _delete_sql_role_assignment_initial( # pylint: disable=inconsistent-return-statements - self, - role_assignment_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + self, role_assignment_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_sql_role_assignment_request_initial( + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_sql_role_assignment_request( role_assignment_id=role_assignment_id, - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_sql_role_assignment_initial.metadata['url'], + template_url=self._delete_sql_role_assignment_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -6142,24 +8119,20 @@ def _delete_sql_role_assignment_initial( # pylint: disable=inconsistent-return- if cls: return cls(pipeline_response, None, {}) - _delete_sql_role_assignment_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore - + _delete_sql_role_assignment_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore @distributed_trace - def begin_delete_sql_role_assignment( # pylint: disable=inconsistent-return-statements - self, - role_assignment_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + def begin_delete_sql_role_assignment( + self, role_assignment_id: str, resource_group_name: str, account_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB SQL Role Assignment. - :param role_assignment_id: The GUID for the Role Assignment. + :param role_assignment_id: The GUID for the Role Assignment. Required. :type role_assignment_id: str :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -6171,96 +8144,104 @@ def begin_delete_sql_role_assignment( # pylint: disable=inconsistent-return-sta Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_sql_role_assignment_initial( + raw_result = self._delete_sql_role_assignment_initial( # type: ignore role_assignment_id=role_assignment_id, resource_group_name=resource_group_name, account_name=account_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_sql_role_assignment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore + begin_delete_sql_role_assignment.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}"} # type: ignore @distributed_trace def list_sql_role_assignments( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.SqlRoleAssignmentListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.SqlRoleAssignmentGetResults"]: """Retrieves the list of all Azure Cosmos DB SQL Role Assignments. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SqlRoleAssignmentListResult or the result of + :return: An iterator like instance of either SqlRoleAssignmentGetResults or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SqlRoleAssignmentListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlRoleAssignmentListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_sql_role_assignments_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_sql_role_assignments.metadata['url'], + template_url=self.list_sql_role_assignments.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_sql_role_assignments_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -6274,10 +8255,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -6287,11 +8266,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_sql_role_assignments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments"} # type: ignore + list_sql_role_assignments.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments"} # type: ignore def _retrieve_continuous_backup_information_initial( self, @@ -6299,39 +8276,53 @@ def _retrieve_continuous_backup_information_initial( account_name: str, database_name: str, container_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> Optional["_models.BackupInformation"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupInformation"]] + ) -> Optional[_models.BackupInformation]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(location, 'ContinuousBackupRestoreLocation') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.BackupInformation]] - request = build_retrieve_continuous_backup_information_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(location, (IO, bytes)): + _content = location + else: + _json = self._serialize.body(location, "ContinuousBackupRestoreLocation") + + request = build_retrieve_continuous_backup_information_request( resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, container_name=container_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._retrieve_continuous_backup_information_initial.metadata['url'], + content=_content, + template_url=self._retrieve_continuous_backup_information_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -6340,15 +8331,98 @@ def _retrieve_continuous_backup_information_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _retrieve_continuous_backup_information_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/retrieveContinuousBackupInformation"} # type: ignore + _retrieve_continuous_backup_information_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/retrieveContinuousBackupInformation"} # type: ignore + + @overload + def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + location: _models.ContinuousBackupRestoreLocation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a container resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + location: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a container resource. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param database_name: Cosmos DB database name. Required. + :type database_name: str + :param container_name: Cosmos DB container name. Required. + :type container_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_retrieve_continuous_backup_information( @@ -6357,21 +8431,26 @@ def begin_retrieve_continuous_backup_information( account_name: str, database_name: str, container_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> LROPoller["_models.BackupInformation"]: + ) -> LROPoller[_models.BackupInformation]: """Retrieves continuous backup information for a container resource. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param database_name: Cosmos DB database name. + :param database_name: Cosmos DB database name. Required. :type database_name: str - :param container_name: Cosmos DB container name. + :param container_name: Cosmos DB container name. Required. :type container_name: str - :param location: The name of the continuous backup restore location. - :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :param location: The name of the continuous backup restore location. Is either a model type or + a IO type. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -6383,19 +8462,19 @@ def begin_retrieve_continuous_backup_information( :return: An instance of LROPoller that returns either BackupInformation or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupInformation] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._retrieve_continuous_backup_information_initial( + raw_result = self._retrieve_continuous_backup_information_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, database_name=database_name, @@ -6403,29 +8482,34 @@ def begin_retrieve_continuous_backup_information( location=location, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_retrieve_continuous_backup_information.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/retrieveContinuousBackupInformation"} # type: ignore + begin_retrieve_continuous_backup_information.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/retrieveContinuousBackupInformation"} # type: ignore diff --git a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_table_resources_operations.py b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_table_resources_operations.py index 03bece7f109..c414f014e07 100644 --- a/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_table_resources_operations.py +++ b/src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_table_resources_operations.py @@ -6,457 +6,436 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models +from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_tables_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_get_table_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, table_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_update_table_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - table_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_update_table_request( + resource_group_name: str, account_name: str, table_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_table_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_table_request( + resource_group_name: str, account_name: str, table_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_get_table_throughput_request( - subscription_id: str, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any + resource_group_name: str, account_name: str, table_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_update_table_throughput_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - table_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_update_table_throughput_request( + resource_group_name: str, account_name: str, table_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_migrate_table_to_autoscale_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_migrate_table_to_autoscale_request( + resource_group_name: str, account_name: str, table_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_migrate_table_to_manual_throughput_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_migrate_table_to_manual_throughput_request( + resource_group_name: str, account_name: str, table_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_retrieve_continuous_backup_information_request_initial( - subscription_id: str, - resource_group_name: str, - account_name: str, - table_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_retrieve_continuous_backup_information_request( + resource_group_name: str, account_name: str, table_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-15-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") - accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/retrieveContinuousBackupInformation") # pylint: disable=line-too-long + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/retrieveContinuousBackupInformation", + ) # pylint: disable=line-too-long path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - "tableName": _SERIALIZER.url("table_name", table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", max_length=50, min_length=3, pattern=r"^[a-z0-9]+(-[a-z0-9]+)*" + ), + "tableName": _SERIALIZER.url("table_name", table_name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - -class TableResourcesOperations(object): - """TableResourcesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.cosmosdb.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class TableResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cosmosdb.CosmosDBManagementClient`'s + :attr:`table_resources` attribute. """ models = _models - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_tables( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> Iterable["_models.TableListResult"]: + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterable["_models.TableGetResults"]: """Lists the Tables under an existing Azure Cosmos DB database account. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either TableListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.TableListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :return: An iterator like instance of either TableGetResults or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.TableGetResults] + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.TableListResult] - cls = kwargs.pop('cls', None) # type: ClsType["_models.TableListResult"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + def prepare_request(next_link=None): if not next_link: - + request = build_list_tables_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_tables.metadata['url'], + template_url=self.list_tables.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore else: - - request = build_list_tables_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - account_name=account_name, - api_version=api_version, - template_url=next_link, - ) + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" return request @@ -470,10 +449,8 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -483,111 +460,125 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_tables.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables"} # type: ignore + list_tables.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables"} # type: ignore @distributed_trace def get_table( - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any - ) -> "_models.TableGetResults": + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any + ) -> _models.TableGetResults: """Gets the Tables under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: TableGetResults, or the result of cls(response) + :return: TableGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.TableGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.TableGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.TableGetResults] - request = build_get_table_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_table.metadata['url'], + template_url=self.get_table.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('TableGetResults', pipeline_response) + deserialized = self._deserialize("TableGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore - + get_table.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore def _create_update_table_initial( self, resource_group_name: str, account_name: str, table_name: str, - create_update_table_parameters: "_models.TableCreateUpdateParameters", + create_update_table_parameters: Union[_models.TableCreateUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.TableGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TableGetResults"]] + ) -> Optional[_models.TableGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(create_update_table_parameters, 'TableCreateUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.TableGetResults]] - request = build_create_update_table_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_update_table_parameters, (IO, bytes)): + _content = create_update_table_parameters + else: + _json = self._serialize.body(create_update_table_parameters, "TableCreateUpdateParameters") + + request = build_create_update_table_request( resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_update_table_initial.metadata['url'], + content=_content, + template_url=self._create_update_table_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -596,35 +587,120 @@ def _create_update_table_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('TableGetResults', pipeline_response) + deserialized = self._deserialize("TableGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_update_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore + _create_update_table_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore + @overload + def begin_create_update_table( + self, + resource_group_name: str, + account_name: str, + table_name: str, + create_update_table_parameters: _models.TableCreateUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.TableGetResults]: + """Create or update an Azure Cosmos DB Table. - @distributed_trace + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param create_update_table_parameters: The parameters to provide for the current Table. + Required. + :type create_update_table_parameters: ~azure.mgmt.cosmosdb.models.TableCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either TableGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.TableGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload def begin_create_update_table( self, resource_group_name: str, account_name: str, table_name: str, - create_update_table_parameters: "_models.TableCreateUpdateParameters", + create_update_table_parameters: IO, + *, + content_type: str = "application/json", **kwargs: Any - ) -> LROPoller["_models.TableGetResults"]: + ) -> LROPoller[_models.TableGetResults]: """Create or update an Azure Cosmos DB Table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :param create_update_table_parameters: The parameters to provide for the current Table. + Required. + :type create_update_table_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either TableGetResults or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.TableGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_update_table( + self, + resource_group_name: str, + account_name: str, + table_name: str, + create_update_table_parameters: Union[_models.TableCreateUpdateParameters, IO], + **kwargs: Any + ) -> LROPoller[_models.TableGetResults]: + """Create or update an Azure Cosmos DB Table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param create_update_table_parameters: The parameters to provide for the current Table. Is + either a model type or a IO type. Required. :type create_update_table_parameters: ~azure.mgmt.cosmosdb.models.TableCreateUpdateParameters + or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -636,84 +712,89 @@ def begin_create_update_table( :return: An instance of LROPoller that returns either TableGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.TableGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.TableGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.TableGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._create_update_table_initial( + raw_result = self._create_update_table_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, create_update_table_parameters=create_update_table_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('TableGetResults', pipeline_response) + deserialized = self._deserialize("TableGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_update_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore + begin_create_update_table.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore def _delete_table_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_delete_table_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_table_request( resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_table_initial.metadata['url'], + template_url=self._delete_table_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -723,24 +804,20 @@ def _delete_table_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _delete_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore - + _delete_table_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore @distributed_trace - def begin_delete_table( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any + def begin_delete_table( + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any ) -> LROPoller[None]: """Deletes an existing Azure Cosmos DB Table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -752,146 +829,166 @@ def begin_delete_table( # pylint: disable=inconsistent-return-statements Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_table_initial( + raw_result = self._delete_table_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore + begin_delete_table.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}"} # type: ignore @distributed_trace def get_table_throughput( - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any + ) -> _models.ThroughputSettingsGetResults: """Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) + :return: ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] - request = build_get_table_throughput_request( - subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get_table_throughput.metadata['url'], + template_url=self.get_table_throughput.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_table_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default"} # type: ignore - + get_table_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default"} # type: ignore def _update_table_throughput_initial( self, resource_group_name: str, account_name: str, table_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] - request = build_update_table_throughput_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(update_throughput_parameters, (IO, bytes)): + _content = update_throughput_parameters + else: + _json = self._serialize.body(update_throughput_parameters, "ThroughputSettingsUpdateParameters") + + request = build_update_table_throughput_request( resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._update_table_throughput_initial.metadata['url'], + content=_content, + template_url=self._update_table_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -900,15 +997,95 @@ def _update_table_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_table_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default"} # type: ignore + _update_table_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default"} # type: ignore + + @overload + def begin_update_table_throughput( + self, + resource_group_name: str, + account_name: str, + table_name: str, + update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param update_throughput_parameters: The parameters to provide for the RUs per second of the + current Table. Required. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_table_throughput( + self, + resource_group_name: str, + account_name: str, + table_name: str, + update_throughput_parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: + """Update RUs per second of an Azure Cosmos DB Table. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param update_throughput_parameters: The parameters to provide for the RUs per second of the + current Table. Required. + :type update_throughput_parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_update_table_throughput( @@ -916,21 +1093,25 @@ def begin_update_table_throughput( resource_group_name: str, account_name: str, table_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", + update_throughput_parameters: Union[_models.ThroughputSettingsUpdateParameters, IO], **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Update RUs per second of an Azure Cosmos DB Table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :param update_throughput_parameters: The parameters to provide for the RUs per second of the - current Table. + current Table. Is either a model type or a IO type. Required. :type update_throughput_parameters: - ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -942,84 +1123,89 @@ def begin_update_table_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._update_table_throughput_initial( + raw_result = self._update_table_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, update_throughput_parameters=update_throughput_parameters, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_table_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default"} # type: ignore + begin_update_table_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default"} # type: ignore def _migrate_table_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_table_to_autoscale_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_table_to_autoscale_request( resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_table_to_autoscale_initial.metadata['url'], + template_url=self._migrate_table_to_autoscale_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1028,31 +1214,27 @@ def _migrate_table_to_autoscale_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_table_to_autoscale_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore - + _migrate_table_to_autoscale_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore @distributed_trace def begin_migrate_table_to_autoscale( - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Table from manual throughput to autoscale. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1065,81 +1247,86 @@ def begin_migrate_table_to_autoscale( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_table_to_autoscale_initial( + raw_result = self._migrate_table_to_autoscale_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_table_to_autoscale.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore + begin_migrate_table_to_autoscale.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale"} # type: ignore def _migrate_table_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any + ) -> Optional[_models.ThroughputSettingsGetResults]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - request = build_migrate_table_to_manual_throughput_request_initial( - subscription_id=self._config.subscription_id, + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ThroughputSettingsGetResults]] + + request = build_migrate_table_to_manual_throughput_request( resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._migrate_table_to_manual_throughput_initial.metadata['url'], + template_url=self._migrate_table_to_manual_throughput_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1148,31 +1335,27 @@ def _migrate_table_to_manual_throughput_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _migrate_table_to_manual_throughput_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore - + _migrate_table_to_manual_throughput_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore @distributed_trace def begin_migrate_table_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - table_name: str, - **kwargs: Any - ) -> LROPoller["_models.ThroughputSettingsGetResults"]: + self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any + ) -> LROPoller[_models.ThroughputSettingsGetResults]: """Migrate an Azure Cosmos DB Table from autoscale to manual throughput. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1185,86 +1368,103 @@ def begin_migrate_table_to_manual_throughput( :return: An instance of LROPoller that returns either ThroughputSettingsGetResults or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ThroughputSettingsGetResults] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._migrate_table_to_manual_throughput_initial( + raw_result = self._migrate_table_to_manual_throughput_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) + deserialized = self._deserialize("ThroughputSettingsGetResults", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_table_to_manual_throughput.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore + begin_migrate_table_to_manual_throughput.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput"} # type: ignore def _retrieve_continuous_backup_information_initial( self, resource_group_name: str, account_name: str, table_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> Optional["_models.BackupInformation"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupInformation"]] + ) -> Optional[_models.BackupInformation]: error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {}) or {}) - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - _json = self._serialize.body(location, 'ContinuousBackupRestoreLocation') + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.BackupInformation]] - request = build_retrieve_continuous_backup_information_request_initial( - subscription_id=self._config.subscription_id, + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(location, (IO, bytes)): + _content = location + else: + _json = self._serialize.body(location, "ContinuousBackupRestoreLocation") + + request = build_retrieve_continuous_backup_information_request( resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, + subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._retrieve_continuous_backup_information_initial.metadata['url'], + content=_content, + template_url=self._retrieve_continuous_backup_information_initial.metadata["url"], + headers=_headers, + params=_params, ) request = _convert_request(request) - request.url = self._client.format_url(request.url) + request.url = self._client.format_url(request.url) # type: ignore - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs ) + response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1273,15 +1473,92 @@ def _retrieve_continuous_backup_information_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _retrieve_continuous_backup_information_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/retrieveContinuousBackupInformation"} # type: ignore + _retrieve_continuous_backup_information_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/retrieveContinuousBackupInformation"} # type: ignore + + @overload + def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + table_name: str, + location: _models.ContinuousBackupRestoreLocation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a table. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + table_name: str, + location: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BackupInformation]: + """Retrieves continuous backup information for a table. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. Required. + :type account_name: str + :param table_name: Cosmos DB table name. Required. + :type table_name: str + :param location: The name of the continuous backup restore location. Required. + :type location: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BackupInformation or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def begin_retrieve_continuous_backup_information( @@ -1289,19 +1566,24 @@ def begin_retrieve_continuous_backup_information( resource_group_name: str, account_name: str, table_name: str, - location: "_models.ContinuousBackupRestoreLocation", + location: Union[_models.ContinuousBackupRestoreLocation, IO], **kwargs: Any - ) -> LROPoller["_models.BackupInformation"]: + ) -> LROPoller[_models.BackupInformation]: """Retrieves continuous backup information for a table. :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param account_name: Cosmos DB database account name. + :param account_name: Cosmos DB database account name. Required. :type account_name: str - :param table_name: Cosmos DB table name. + :param table_name: Cosmos DB table name. Required. :type table_name: str - :param location: The name of the continuous backup restore location. - :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :param location: The name of the continuous backup restore location. Is either a model type or + a IO type. Required. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1313,48 +1595,53 @@ def begin_retrieve_continuous_backup_information( :return: An instance of LROPoller that returns either BackupInformation or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] - :raises: ~azure.core.exceptions.HttpResponseError + :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupInformation] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: - raw_result = self._retrieve_continuous_backup_information_initial( + raw_result = self._retrieve_continuous_backup_information_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, table_name=table_name, location=location, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = self._deserialize('BackupInformation', pipeline_response) + deserialized = self._deserialize("BackupInformation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_retrieve_continuous_backup_information.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/retrieveContinuousBackupInformation"} # type: ignore + begin_retrieve_continuous_backup_information.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/retrieveContinuousBackupInformation"} # type: ignore diff --git a/src/cosmosdb-preview/setup.py b/src/cosmosdb-preview/setup.py index acd78be7c0d..9db2bafae60 100644 --- a/src/cosmosdb-preview/setup.py +++ b/src/cosmosdb-preview/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.18.1' +VERSION = '0.19.0' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/elastic-san/HISTORY.rst b/src/elastic-san/HISTORY.rst new file mode 100644 index 00000000000..8c34bccfff8 --- /dev/null +++ b/src/elastic-san/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +0.1.0 +++++++ +* Initial release. \ No newline at end of file diff --git a/src/elastic-san/README.md b/src/elastic-san/README.md new file mode 100644 index 00000000000..9a0d8910ed2 --- /dev/null +++ b/src/elastic-san/README.md @@ -0,0 +1,42 @@ +# Azure CLI ElasticSan Extension # +This is an extension to Azure CLI to manage ElasticSan resources. + +## How to use ## + +## Elastic San +### Create an Elastic SAN. +`az elastic-san create -n {san_name} -g {rg} --tags "{key1810:aaaa}" -l southcentralusstg --base-size-tib 23 --extended-capacity-size-tib 14 --sku "{name:Premium_LRS,tier:Premium}"` +### Delete an Elastic SAN. +`az elastic-san delete -g {rg} -n {san_name}` +### Get a list of Elastic SANs in a subscription. +`az elastic-san list -g {rg}` +### Get a list of Elastic SAN skus. +`az elastic-san list-sku` +### Get an Elastic SAN. +`az elastic-san show -g {rg} -n {san_name}` +### Update an Elastic SAN. +`az elastic-san update -n {san_name} -g {rg} --tags "{key1710:bbbb}" --base-size-tib 25 --extended-capacity-size-tib 15` + +## Volume Group +### Create a Volume Group. +`az elastic-san volume-group create -e {san_name} -n {vg_name} -g {rg} --tags "{key1910:bbbb}" --encryption EncryptionAtRestWithPlatformKey --protocol-type Iscsi --network-acls "{virtual-network-rules:["{id:{subnet_id},action:Allow}"]}"` +### Delete a Volume Group. +`az elastic-san volume-group delete -g {rg} -e {san_name} -n {vg_name}` +### List Volume Groups. +`az elastic-san volume-group list -g {rg} -e {san_name}` +### Get a Volume Group. +`az elastic-san volume-group show -g {rg} -e {san_name} -n {vg_name}` +### Update a Volume Group. +`elastic-san volume-group update -e {san_name} -n {vg_name} -g {rg} --tags "{key2011:cccc}" --protocol-type None --network-acls "{virtual-network-rules:["{id:{subnet_id_2},action:Allow}"]}"` + +## Volume +### Create a Volume. +`az elastic-san volume create -g {rg} -e {san_name} -v {vg_name} -n {volume_name} --size-gib 2` +### Delete a Volume. +`az elastic-san volume delete -g {rg} -e {san_name} -v {vg_name} -n {volume_name}` +### List Volumes in a Volume Group. +`az elastic-san volume list -g {rg} -e {san_name} -v {vg_name}` +### Get a Volume. +`az elastic-san volume show -g {rg} -e {san_name} -v {vg_name} -n {volume_name}` +### Update a Volume. +`az elastic-san volume update -g {rg} -e {san_name} -v {vg_name} -n {volume_name} --size-gib 3` diff --git a/src/elastic-san/azext_elastic_san/__init__.py b/src/elastic-san/azext_elastic_san/__init__.py new file mode 100644 index 00000000000..71d63e832f6 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/__init__.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader +from azext_elastic_san._help import helps # pylint: disable=unused-import + + +class ElasticSanCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + custom_command_type = CliCommandType( + operations_tmpl='azext_elastic_san.custom#{}') + super().__init__(cli_ctx=cli_ctx, + custom_command_type=custom_command_type) + + def load_command_table(self, args): + from azext_elastic_san.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_elastic_san._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = ElasticSanCommandsLoader diff --git a/src/elastic-san/azext_elastic_san/_help.py b/src/elastic-san/azext_elastic_san/_help.py new file mode 100644 index 00000000000..126d5d00714 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/_help.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +# pylint: disable=too-many-lines + +from knack.help_files import helps # pylint: disable=unused-import diff --git a/src/elastic-san/azext_elastic_san/_params.py b/src/elastic-san/azext_elastic_san/_params.py new file mode 100644 index 00000000000..cfcec717c9c --- /dev/null +++ b/src/elastic-san/azext_elastic_san/_params.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + + +def load_arguments(self, _): # pylint: disable=unused-argument + pass diff --git a/src/elastic-san/azext_elastic_san/aaz/__init__.py b/src/elastic-san/azext_elastic_san/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/__init__.py b/src/elastic-san/azext_elastic_san/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/__cmd_group.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/__cmd_group.py new file mode 100644 index 00000000000..71e03268425 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "elastic-san", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manage Elastic SAN. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/__init__.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/__init__.py new file mode 100644 index 00000000000..18bda683c99 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/__init__.py @@ -0,0 +1,18 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._list_sku import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_create.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_create.py new file mode 100644 index 00000000000..c38a43d3551 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_create.py @@ -0,0 +1,404 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san create", + is_preview=True, +) +class Create(AAZCommand): + """Create an Elastic SAN. + + :example: Create an Elastic SAN. + az elastic-san create -n {san_name} -g {rg} --tags "{key1810:aaaa}" -l southcentralusstg --base-size-tib 23 --extended-capacity-size-tib 14 --sku "{name:Premium_LRS,tier:Premium}" + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}", "2021-11-20-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-n", "--name", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Parameters" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Parameters", + help="The geo-location where the resource lives.", + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Parameters", + help="Azure resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.availability_zones = AAZListArg( + options=["--availability-zones"], + arg_group="Properties", + help="Logical zone for Elastic San resource; example: [\"1\"].", + ) + _args_schema.base_size_tib = AAZIntArg( + options=["--base-size-tib"], + arg_group="Properties", + help="Base size of the Elastic San appliance in TiB.", + required=True, + ) + _args_schema.extended_capacity_size_tib = AAZIntArg( + options=["--extended-size", "--extended-capacity-size-tib"], + arg_group="Properties", + help="Extended size of the Elastic San appliance in TiB.", + required=True, + ) + _args_schema.sku = AAZObjectArg( + options=["--sku"], + arg_group="Properties", + help="resource sku", + required=True, + ) + + availability_zones = cls._args_schema.availability_zones + availability_zones.Element = AAZStrArg() + + sku = cls._args_schema.sku + sku.name = AAZStrArg( + options=["name"], + help="The sku name.", + required=True, + enum={"Premium_LRS": "Premium_LRS", "Premium_ZRS": "Premium_ZRS"}, + ) + sku.tier = AAZStrArg( + options=["tier"], + help="The sku tier.", + enum={"Premium": "Premium"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ElasticSansCreate(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ElasticSansCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("availabilityZones", AAZListType, ".availability_zones") + properties.set_prop("baseSizeTiB", AAZIntType, ".base_size_tib", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("extendedCapacitySizeTiB", AAZIntType, ".extended_capacity_size_tib", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("sku", AAZObjectType, ".sku", typ_kwargs={"flags": {"required": True}}) + + availability_zones = _builder.get(".properties.availabilityZones") + if availability_zones is not None: + availability_zones.set_elements(AAZStrType, ".") + + sku = _builder.get(".properties.sku") + if sku is not None: + sku.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + sku.set_prop("tier", AAZStrType, ".tier") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _build_schema_elastic_san_read(cls._schema_on_200) + + return cls._schema_on_200 + + +_schema_elastic_san_read = None + + +def _build_schema_elastic_san_read(_schema): + global _schema_elastic_san_read + if _schema_elastic_san_read is not None: + _schema.id = _schema_elastic_san_read.id + _schema.location = _schema_elastic_san_read.location + _schema.name = _schema_elastic_san_read.name + _schema.properties = _schema_elastic_san_read.properties + _schema.system_data = _schema_elastic_san_read.system_data + _schema.tags = _schema_elastic_san_read.tags + _schema.type = _schema_elastic_san_read.type + return + + _schema_elastic_san_read = AAZObjectType() + + elastic_san_read = _schema_elastic_san_read + elastic_san_read.id = AAZStrType( + flags={"read_only": True}, + ) + elastic_san_read.location = AAZStrType() + elastic_san_read.name = AAZStrType( + flags={"read_only": True}, + ) + elastic_san_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + elastic_san_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + elastic_san_read.tags = AAZDictType() + elastic_san_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_elastic_san_read.properties + properties.availability_zones = AAZListType( + serialized_name="availabilityZones", + ) + properties.base_size_ti_b = AAZIntType( + serialized_name="baseSizeTiB", + flags={"required": True}, + ) + properties.extended_capacity_size_ti_b = AAZIntType( + serialized_name="extendedCapacitySizeTiB", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.sku = AAZObjectType( + flags={"required": True}, + ) + properties.total_iops = AAZIntType( + serialized_name="totalIops", + flags={"read_only": True}, + ) + properties.total_m_bps = AAZIntType( + serialized_name="totalMBps", + flags={"read_only": True}, + ) + properties.total_size_ti_b = AAZIntType( + serialized_name="totalSizeTiB", + flags={"read_only": True}, + ) + properties.total_volume_size_gi_b = AAZIntType( + serialized_name="totalVolumeSizeGiB", + flags={"read_only": True}, + ) + properties.volume_group_count = AAZIntType( + serialized_name="volumeGroupCount", + flags={"read_only": True}, + ) + + availability_zones = _schema_elastic_san_read.properties.availability_zones + availability_zones.Element = AAZStrType() + + sku = _schema_elastic_san_read.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + system_data = _schema_elastic_san_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = _schema_elastic_san_read.tags + tags.Element = AAZStrType() + + _schema.id = _schema_elastic_san_read.id + _schema.location = _schema_elastic_san_read.location + _schema.name = _schema_elastic_san_read.name + _schema.properties = _schema_elastic_san_read.properties + _schema.system_data = _schema_elastic_san_read.system_data + _schema.tags = _schema_elastic_san_read.tags + _schema.type = _schema_elastic_san_read.type + + +__all__ = ["Create"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_delete.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_delete.py new file mode 100644 index 00000000000..72877d584e3 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_delete.py @@ -0,0 +1,165 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san delete", + is_preview=True, + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete an Elastic SAN. + + :example: Delete an Elastic SAN. + az elastic-san delete -g {rg} -n {san_name} + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}", "2021-11-20-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-n", "--name", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ElasticSansDelete(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + class ElasticSansDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +__all__ = ["Delete"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_list.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_list.py new file mode 100644 index 00000000000..3d2e68c6c8a --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_list.py @@ -0,0 +1,447 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san list", + is_preview=True, +) +class List(AAZCommand): + """Get a list of Elastic SANs in a subscription. + + :example: Get a list of Elastic SANs in a subscription. + az elastic-san list -g {rg} + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.elasticsan/elasticsans", "2021-11-20-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans", "2021-11-20-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + if condition_0: + self.ElasticSansListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.ElasticSansListBySubscription(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class ElasticSansListByResourceGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.availability_zones = AAZListType( + serialized_name="availabilityZones", + ) + properties.base_size_ti_b = AAZIntType( + serialized_name="baseSizeTiB", + flags={"required": True}, + ) + properties.extended_capacity_size_ti_b = AAZIntType( + serialized_name="extendedCapacitySizeTiB", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.sku = AAZObjectType( + flags={"required": True}, + ) + properties.total_iops = AAZIntType( + serialized_name="totalIops", + flags={"read_only": True}, + ) + properties.total_m_bps = AAZIntType( + serialized_name="totalMBps", + flags={"read_only": True}, + ) + properties.total_size_ti_b = AAZIntType( + serialized_name="totalSizeTiB", + flags={"read_only": True}, + ) + properties.total_volume_size_gi_b = AAZIntType( + serialized_name="totalVolumeSizeGiB", + flags={"read_only": True}, + ) + properties.volume_group_count = AAZIntType( + serialized_name="volumeGroupCount", + flags={"read_only": True}, + ) + + availability_zones = cls._schema_on_200.value.Element.properties.availability_zones + availability_zones.Element = AAZStrType() + + sku = cls._schema_on_200.value.Element.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class ElasticSansListBySubscription(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.ElasticSan/elasticSans", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.availability_zones = AAZListType( + serialized_name="availabilityZones", + ) + properties.base_size_ti_b = AAZIntType( + serialized_name="baseSizeTiB", + flags={"required": True}, + ) + properties.extended_capacity_size_ti_b = AAZIntType( + serialized_name="extendedCapacitySizeTiB", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.sku = AAZObjectType( + flags={"required": True}, + ) + properties.total_iops = AAZIntType( + serialized_name="totalIops", + flags={"read_only": True}, + ) + properties.total_m_bps = AAZIntType( + serialized_name="totalMBps", + flags={"read_only": True}, + ) + properties.total_size_ti_b = AAZIntType( + serialized_name="totalSizeTiB", + flags={"read_only": True}, + ) + properties.total_volume_size_gi_b = AAZIntType( + serialized_name="totalVolumeSizeGiB", + flags={"read_only": True}, + ) + properties.volume_group_count = AAZIntType( + serialized_name="volumeGroupCount", + flags={"read_only": True}, + ) + + availability_zones = cls._schema_on_200.value.Element.properties.availability_zones + availability_zones.Element = AAZStrType() + + sku = cls._schema_on_200.value.Element.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["List"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_list_sku.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_list_sku.py new file mode 100644 index 00000000000..8af04d3a524 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_list_sku.py @@ -0,0 +1,217 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san list-sku", + is_preview=True, +) +class ListSku(AAZCommand): + """Get a list of Elastic SAN skus. + + :example: Get a list of Elastic SAN skus. + az elastic-san list-sku + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.elasticsan/skus", "2021-11-20-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.filter = AAZStrArg( + options=["--filter"], + help="Specify $filter='location eq ' to filter on location.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SkusList(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + return result + + class SkusList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.ElasticSan/skus", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$filter", self.ctx.args.filter, + ), + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = cls._schema_on_200.value.Element + _element.capabilities = AAZListType( + flags={"read_only": True}, + ) + _element.location_info = AAZListType( + serialized_name="locationInfo", + flags={"read_only": True}, + ) + _element.locations = AAZListType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"required": True, "read_only": True}, + ) + _element.resource_type = AAZStrType( + serialized_name="resourceType", + flags={"read_only": True}, + ) + _element.tier = AAZStrType( + flags={"read_only": True}, + ) + + capabilities = cls._schema_on_200.value.Element.capabilities + capabilities.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = cls._schema_on_200.value.Element.capabilities.Element + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.value = AAZStrType( + flags={"read_only": True}, + ) + + location_info = cls._schema_on_200.value.Element.location_info + location_info.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = cls._schema_on_200.value.Element.location_info.Element + _element.location = AAZStrType( + flags={"read_only": True}, + ) + _element.zones = AAZListType( + flags={"read_only": True}, + ) + + zones = cls._schema_on_200.value.Element.location_info.Element.zones + zones.Element = AAZStrType( + flags={"read_only": True}, + ) + + locations = cls._schema_on_200.value.Element.locations + locations.Element = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +__all__ = ["ListSku"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_show.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_show.py new file mode 100644 index 00000000000..47e6f2a048c --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_show.py @@ -0,0 +1,262 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san show", + is_preview=True, +) +class Show(AAZCommand): + """Get an Elastic SAN. + + :example: Get an Elastic SAN. + az elastic-san show -g {rg} -n {san_name} + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}", "2021-11-20-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-n", "--name", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ElasticSansGet(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ElasticSansGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.availability_zones = AAZListType( + serialized_name="availabilityZones", + ) + properties.base_size_ti_b = AAZIntType( + serialized_name="baseSizeTiB", + flags={"required": True}, + ) + properties.extended_capacity_size_ti_b = AAZIntType( + serialized_name="extendedCapacitySizeTiB", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.sku = AAZObjectType( + flags={"required": True}, + ) + properties.total_iops = AAZIntType( + serialized_name="totalIops", + flags={"read_only": True}, + ) + properties.total_m_bps = AAZIntType( + serialized_name="totalMBps", + flags={"read_only": True}, + ) + properties.total_size_ti_b = AAZIntType( + serialized_name="totalSizeTiB", + flags={"read_only": True}, + ) + properties.total_volume_size_gi_b = AAZIntType( + serialized_name="totalVolumeSizeGiB", + flags={"read_only": True}, + ) + properties.volume_group_count = AAZIntType( + serialized_name="volumeGroupCount", + flags={"read_only": True}, + ) + + availability_zones = cls._schema_on_200.properties.availability_zones + availability_zones.Element = AAZStrType() + + sku = cls._schema_on_200.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["Show"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_update.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_update.py new file mode 100644 index 00000000000..fbb904b79d8 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_update.py @@ -0,0 +1,518 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san update", + is_preview=True, +) +class Update(AAZCommand): + """Update an Elastic SAN. + + :example: Update an Elastic SAN. + az elastic-san update -n {san_name} -g {rg} --tags "{key1710:bbbb}" --base-size-tib 25 --extended-capacity-size-tib 15 + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}", "2021-11-20-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-n", "--name", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Parameters" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Parameters", + help="Azure resource tags.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.availability_zones = AAZListArg( + options=["--availability-zones"], + arg_group="Properties", + help="Logical zone for Elastic San resource; example: [\"1\"].", + nullable=True, + ) + _args_schema.base_size_tib = AAZIntArg( + options=["--base-size-tib"], + arg_group="Properties", + help="Base size of the Elastic San appliance in TiB.", + ) + _args_schema.extended_capacity_size_tib = AAZIntArg( + options=["--extended-size", "--extended-capacity-size-tib"], + arg_group="Properties", + help="Extended size of the Elastic San appliance in TiB.", + ) + _args_schema.sku = AAZObjectArg( + options=["--sku"], + arg_group="Properties", + help="resource sku", + ) + + availability_zones = cls._args_schema.availability_zones + availability_zones.Element = AAZStrArg( + nullable=True, + ) + + sku = cls._args_schema.sku + sku.name = AAZStrArg( + options=["name"], + help="The sku name.", + enum={"Premium_LRS": "Premium_LRS", "Premium_ZRS": "Premium_ZRS"}, + ) + sku.tier = AAZStrArg( + options=["tier"], + help="The sku tier.", + nullable=True, + enum={"Premium": "Premium"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ElasticSansGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.ElasticSansCreate(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + # @register_callback + def pre_instance_update(self, instance): + pass + + # @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ElasticSansGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _build_schema_elastic_san_read(cls._schema_on_200) + + return cls._schema_on_200 + + class ElasticSansCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _build_schema_elastic_san_read(cls._schema_on_200) + + return cls._schema_on_200 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("availabilityZones", AAZListType, ".availability_zones") + properties.set_prop("baseSizeTiB", AAZIntType, ".base_size_tib", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("extendedCapacitySizeTiB", AAZIntType, ".extended_capacity_size_tib", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("sku", AAZObjectType, ".sku", typ_kwargs={"flags": {"required": True}}) + + availability_zones = _builder.get(".properties.availabilityZones") + if availability_zones is not None: + availability_zones.set_elements(AAZStrType, ".") + + sku = _builder.get(".properties.sku") + if sku is not None: + sku.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + sku.set_prop("tier", AAZStrType, ".tier") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +_schema_elastic_san_read = None + + +def _build_schema_elastic_san_read(_schema): + global _schema_elastic_san_read + if _schema_elastic_san_read is not None: + _schema.id = _schema_elastic_san_read.id + _schema.location = _schema_elastic_san_read.location + _schema.name = _schema_elastic_san_read.name + _schema.properties = _schema_elastic_san_read.properties + _schema.system_data = _schema_elastic_san_read.system_data + _schema.tags = _schema_elastic_san_read.tags + _schema.type = _schema_elastic_san_read.type + return + + _schema_elastic_san_read = AAZObjectType() + + elastic_san_read = _schema_elastic_san_read + elastic_san_read.id = AAZStrType( + flags={"read_only": True}, + ) + elastic_san_read.location = AAZStrType() + elastic_san_read.name = AAZStrType( + flags={"read_only": True}, + ) + elastic_san_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + elastic_san_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + elastic_san_read.tags = AAZDictType() + elastic_san_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_elastic_san_read.properties + properties.availability_zones = AAZListType( + serialized_name="availabilityZones", + ) + properties.base_size_ti_b = AAZIntType( + serialized_name="baseSizeTiB", + flags={"required": True}, + ) + properties.extended_capacity_size_ti_b = AAZIntType( + serialized_name="extendedCapacitySizeTiB", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.sku = AAZObjectType( + flags={"required": True}, + ) + properties.total_iops = AAZIntType( + serialized_name="totalIops", + flags={"read_only": True}, + ) + properties.total_m_bps = AAZIntType( + serialized_name="totalMBps", + flags={"read_only": True}, + ) + properties.total_size_ti_b = AAZIntType( + serialized_name="totalSizeTiB", + flags={"read_only": True}, + ) + properties.total_volume_size_gi_b = AAZIntType( + serialized_name="totalVolumeSizeGiB", + flags={"read_only": True}, + ) + properties.volume_group_count = AAZIntType( + serialized_name="volumeGroupCount", + flags={"read_only": True}, + ) + + availability_zones = _schema_elastic_san_read.properties.availability_zones + availability_zones.Element = AAZStrType() + + sku = _schema_elastic_san_read.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + system_data = _schema_elastic_san_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = _schema_elastic_san_read.tags + tags.Element = AAZStrType() + + _schema.id = _schema_elastic_san_read.id + _schema.location = _schema_elastic_san_read.location + _schema.name = _schema_elastic_san_read.name + _schema.properties = _schema_elastic_san_read.properties + _schema.system_data = _schema_elastic_san_read.system_data + _schema.tags = _schema_elastic_san_read.tags + _schema.type = _schema_elastic_san_read.type + + +__all__ = ["Update"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_wait.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_wait.py new file mode 100644 index 00000000000..c2874fa0186 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/_wait.py @@ -0,0 +1,257 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}", "2021-11-20-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-n", "--name", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ElasticSansGet(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class ElasticSansGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.availability_zones = AAZListType( + serialized_name="availabilityZones", + ) + properties.base_size_ti_b = AAZIntType( + serialized_name="baseSizeTiB", + flags={"required": True}, + ) + properties.extended_capacity_size_ti_b = AAZIntType( + serialized_name="extendedCapacitySizeTiB", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.sku = AAZObjectType( + flags={"required": True}, + ) + properties.total_iops = AAZIntType( + serialized_name="totalIops", + flags={"read_only": True}, + ) + properties.total_m_bps = AAZIntType( + serialized_name="totalMBps", + flags={"read_only": True}, + ) + properties.total_size_ti_b = AAZIntType( + serialized_name="totalSizeTiB", + flags={"read_only": True}, + ) + properties.total_volume_size_gi_b = AAZIntType( + serialized_name="totalVolumeSizeGiB", + flags={"read_only": True}, + ) + properties.volume_group_count = AAZIntType( + serialized_name="volumeGroupCount", + flags={"read_only": True}, + ) + + availability_zones = cls._schema_on_200.properties.availability_zones + availability_zones.Element = AAZStrType() + + sku = cls._schema_on_200.properties.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["Wait"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/__cmd_group.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/__cmd_group.py new file mode 100644 index 00000000000..76191dfab88 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "elastic-san volume", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manage Elastic SAN Volume. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/__init__.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_create.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_create.py new file mode 100644 index 00000000000..ec049ed4ae2 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_create.py @@ -0,0 +1,395 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san volume create", + is_preview=True, +) +class Create(AAZCommand): + """Create a Volume. + + :example: Create a Volume. + az elastic-san volume create -g {rg} -e {san_name} -v {vg_name} -n {volume_name} --size-gib 2 + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}/volumegroups/{}/volumes/{}", "2021-11-20-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-e", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.volume_group_name = AAZStrArg( + options=["-v", "--volume-group-name"], + help="The name of the VolumeGroup.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + _args_schema.volume_name = AAZStrArg( + options=["-n", "--name", "--volume-name"], + help="The name of the Volume.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^[a-z0-9]+(-[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + + # define Arg Group "Parameters" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Parameters", + help="Azure resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.creation_data = AAZObjectArg( + options=["--creation-data"], + arg_group="Properties", + help="State of the operation on the resource.", + ) + _args_schema.size_gib = AAZIntArg( + options=["--size-gib"], + arg_group="Properties", + help="Volume size.", + ) + + creation_data = cls._args_schema.creation_data + creation_data.create_source = AAZStrArg( + options=["create-source"], + help="This enumerates the possible sources of a volume creation.", + enum={"None": "None"}, + ) + creation_data.source_uri = AAZStrArg( + options=["source-uri"], + help="If createOption is Copy, this is the ARM id of the source snapshot or disk. If createOption is Restore, this is the ARM-like id of the source disk restore point.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.VolumesCreate(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class VolumesCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeGroupName", self.ctx.args.volume_group_name, + required=True, + ), + **self.serialize_url_param( + "volumeName", self.ctx.args.volume_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("creationData", AAZObjectType, ".creation_data") + properties.set_prop("sizeGiB", AAZIntType, ".size_gib") + + creation_data = _builder.get(".properties.creationData") + if creation_data is not None: + creation_data.set_prop("createSource", AAZStrType, ".create_source") + creation_data.set_prop("sourceUri", AAZStrType, ".source_uri") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _build_schema_volume_read(cls._schema_on_200) + + return cls._schema_on_200 + + +_schema_volume_read = None + + +def _build_schema_volume_read(_schema): + global _schema_volume_read + if _schema_volume_read is not None: + _schema.id = _schema_volume_read.id + _schema.name = _schema_volume_read.name + _schema.properties = _schema_volume_read.properties + _schema.system_data = _schema_volume_read.system_data + _schema.tags = _schema_volume_read.tags + _schema.type = _schema_volume_read.type + return + + _schema_volume_read = AAZObjectType() + + volume_read = _schema_volume_read + volume_read.id = AAZStrType( + flags={"read_only": True}, + ) + volume_read.name = AAZStrType( + flags={"read_only": True}, + ) + volume_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + volume_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + volume_read.tags = AAZDictType() + volume_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_volume_read.properties + properties.creation_data = AAZObjectType( + serialized_name="creationData", + ) + properties.size_gi_b = AAZIntType( + serialized_name="sizeGiB", + ) + properties.storage_target = AAZObjectType( + serialized_name="storageTarget", + flags={"read_only": True}, + ) + properties.volume_id = AAZStrType( + serialized_name="volumeId", + flags={"read_only": True}, + ) + + creation_data = _schema_volume_read.properties.creation_data + creation_data.create_source = AAZStrType( + serialized_name="createSource", + ) + creation_data.source_uri = AAZStrType( + serialized_name="sourceUri", + ) + + storage_target = _schema_volume_read.properties.storage_target + storage_target.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + storage_target.status = AAZStrType( + flags={"read_only": True}, + ) + storage_target.target_iqn = AAZStrType( + serialized_name="targetIqn", + flags={"read_only": True}, + ) + storage_target.target_portal_hostname = AAZStrType( + serialized_name="targetPortalHostname", + flags={"read_only": True}, + ) + storage_target.target_portal_port = AAZIntType( + serialized_name="targetPortalPort", + flags={"read_only": True}, + ) + + system_data = _schema_volume_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = _schema_volume_read.tags + tags.Element = AAZStrType() + + _schema.id = _schema_volume_read.id + _schema.name = _schema_volume_read.name + _schema.properties = _schema_volume_read.properties + _schema.system_data = _schema_volume_read.system_data + _schema.tags = _schema_volume_read.tags + _schema.type = _schema_volume_read.type + + +__all__ = ["Create"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_delete.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_delete.py new file mode 100644 index 00000000000..f7e802305d8 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_delete.py @@ -0,0 +1,195 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san volume delete", + is_preview=True, + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a Volume. + + :example: Delete a Volume. + az elastic-san volume delete -g {rg} -e {san_name} -v {vg_name} -n {volume_name} + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}/volumegroups/{}/volumes/{}", "2021-11-20-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-e", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.volume_group_name = AAZStrArg( + options=["-v", "--volume-group-name"], + help="The name of the VolumeGroup.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + _args_schema.volume_name = AAZStrArg( + options=["-n", "--name", "--volume-name"], + help="The name of the Volume.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^[a-z0-9]+(-[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.VolumesDelete(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + class VolumesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeGroupName", self.ctx.args.volume_group_name, + required=True, + ), + **self.serialize_url_param( + "volumeName", self.ctx.args.volume_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +__all__ = ["Delete"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_list.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_list.py new file mode 100644 index 00000000000..79bbae9cf5e --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_list.py @@ -0,0 +1,282 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san volume list", + is_preview=True, +) +class List(AAZCommand): + """List Volumes in a Volume Group. + + :example: List Volumes in a Volume Group. + az elastic-san volume list -g {rg} -e {san_name} -v {vg_name} + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}/volumegroups/{}/volumes", "2021-11-20-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-e", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.volume_group_name = AAZStrArg( + options=["-v", "--volume-group-name"], + help="The name of the VolumeGroup.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VolumesListByVolumeGroup(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class VolumesListByVolumeGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeGroupName", self.ctx.args.volume_group_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.creation_data = AAZObjectType( + serialized_name="creationData", + ) + properties.size_gi_b = AAZIntType( + serialized_name="sizeGiB", + ) + properties.storage_target = AAZObjectType( + serialized_name="storageTarget", + flags={"read_only": True}, + ) + properties.volume_id = AAZStrType( + serialized_name="volumeId", + flags={"read_only": True}, + ) + + creation_data = cls._schema_on_200.value.Element.properties.creation_data + creation_data.create_source = AAZStrType( + serialized_name="createSource", + ) + creation_data.source_uri = AAZStrType( + serialized_name="sourceUri", + ) + + storage_target = cls._schema_on_200.value.Element.properties.storage_target + storage_target.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + storage_target.status = AAZStrType( + flags={"read_only": True}, + ) + storage_target.target_iqn = AAZStrType( + serialized_name="targetIqn", + flags={"read_only": True}, + ) + storage_target.target_portal_hostname = AAZStrType( + serialized_name="targetPortalHostname", + flags={"read_only": True}, + ) + storage_target.target_portal_port = AAZIntType( + serialized_name="targetPortalPort", + flags={"read_only": True}, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["List"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_show.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_show.py new file mode 100644 index 00000000000..5fc3f7560e1 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_show.py @@ -0,0 +1,287 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san volume show", + is_preview=True, +) +class Show(AAZCommand): + """Get a Volume. + + :example: Get a Volume. + az elastic-san volume show -g {rg} -e {san_name} -v {vg_name} -n {volume_name} + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}/volumegroups/{}/volumes/{}", "2021-11-20-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-e", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.volume_group_name = AAZStrArg( + options=["-v", "--volume-group-name"], + help="The name of the VolumeGroup.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + _args_schema.volume_name = AAZStrArg( + options=["-n", "--name", "--volume-name"], + help="The name of the Volume.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^[a-z0-9]+(-[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VolumesGet(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class VolumesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeGroupName", self.ctx.args.volume_group_name, + required=True, + ), + **self.serialize_url_param( + "volumeName", self.ctx.args.volume_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.creation_data = AAZObjectType( + serialized_name="creationData", + ) + properties.size_gi_b = AAZIntType( + serialized_name="sizeGiB", + ) + properties.storage_target = AAZObjectType( + serialized_name="storageTarget", + flags={"read_only": True}, + ) + properties.volume_id = AAZStrType( + serialized_name="volumeId", + flags={"read_only": True}, + ) + + creation_data = cls._schema_on_200.properties.creation_data + creation_data.create_source = AAZStrType( + serialized_name="createSource", + ) + creation_data.source_uri = AAZStrType( + serialized_name="sourceUri", + ) + + storage_target = cls._schema_on_200.properties.storage_target + storage_target.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + storage_target.status = AAZStrType( + flags={"read_only": True}, + ) + storage_target.target_iqn = AAZStrType( + serialized_name="targetIqn", + flags={"read_only": True}, + ) + storage_target.target_portal_hostname = AAZStrType( + serialized_name="targetPortalHostname", + flags={"read_only": True}, + ) + storage_target.target_portal_port = AAZIntType( + serialized_name="targetPortalPort", + flags={"read_only": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["Show"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_update.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_update.py new file mode 100644 index 00000000000..05e41dde2e3 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume/_update.py @@ -0,0 +1,529 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san volume update", + is_preview=True, +) +class Update(AAZCommand): + """Update a Volume. + + :example: Update a Volume. + az elastic-san volume update -g {rg} -e {san_name} -v {vg_name} -n {volume_name} --size-gib 3 + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}/volumegroups/{}/volumes/{}", "2021-11-20-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-e", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.volume_group_name = AAZStrArg( + options=["-v", "--volume-group-name"], + help="The name of the VolumeGroup.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + _args_schema.volume_name = AAZStrArg( + options=["-n", "--name", "--volume-name"], + help="The name of the Volume.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^[a-z0-9]+(-[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + + # define Arg Group "Parameters" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Parameters", + help="Azure resource tags.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.creation_data = AAZObjectArg( + options=["--creation-data"], + arg_group="Properties", + help="State of the operation on the resource.", + nullable=True, + ) + _args_schema.size_gib = AAZIntArg( + options=["--size-gib"], + arg_group="Properties", + help="Volume size.", + nullable=True, + ) + + creation_data = cls._args_schema.creation_data + creation_data.create_source = AAZStrArg( + options=["create-source"], + help="This enumerates the possible sources of a volume creation.", + nullable=True, + enum={"None": "None"}, + ) + creation_data.source_uri = AAZStrArg( + options=["source-uri"], + help="If createOption is Copy, this is the ARM id of the source snapshot or disk. If createOption is Restore, this is the ARM-like id of the source disk restore point.", + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VolumesGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.VolumesCreate(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + # @register_callback + def pre_instance_update(self, instance): + pass + + # @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class VolumesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeGroupName", self.ctx.args.volume_group_name, + required=True, + ), + **self.serialize_url_param( + "volumeName", self.ctx.args.volume_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _build_schema_volume_read(cls._schema_on_200) + + return cls._schema_on_200 + + class VolumesCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeGroupName", self.ctx.args.volume_group_name, + required=True, + ), + **self.serialize_url_param( + "volumeName", self.ctx.args.volume_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _build_schema_volume_read(cls._schema_on_200) + + return cls._schema_on_200 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("creationData", AAZObjectType, ".creation_data") + properties.set_prop("sizeGiB", AAZIntType, ".size_gib") + + creation_data = _builder.get(".properties.creationData") + if creation_data is not None: + creation_data.set_prop("createSource", AAZStrType, ".create_source") + creation_data.set_prop("sourceUri", AAZStrType, ".source_uri") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +_schema_volume_read = None + + +def _build_schema_volume_read(_schema): + global _schema_volume_read + if _schema_volume_read is not None: + _schema.id = _schema_volume_read.id + _schema.name = _schema_volume_read.name + _schema.properties = _schema_volume_read.properties + _schema.system_data = _schema_volume_read.system_data + _schema.tags = _schema_volume_read.tags + _schema.type = _schema_volume_read.type + return + + _schema_volume_read = AAZObjectType() + + volume_read = _schema_volume_read + volume_read.id = AAZStrType( + flags={"read_only": True}, + ) + volume_read.name = AAZStrType( + flags={"read_only": True}, + ) + volume_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + volume_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + volume_read.tags = AAZDictType() + volume_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_volume_read.properties + properties.creation_data = AAZObjectType( + serialized_name="creationData", + ) + properties.size_gi_b = AAZIntType( + serialized_name="sizeGiB", + ) + properties.storage_target = AAZObjectType( + serialized_name="storageTarget", + flags={"read_only": True}, + ) + properties.volume_id = AAZStrType( + serialized_name="volumeId", + flags={"read_only": True}, + ) + + creation_data = _schema_volume_read.properties.creation_data + creation_data.create_source = AAZStrType( + serialized_name="createSource", + ) + creation_data.source_uri = AAZStrType( + serialized_name="sourceUri", + ) + + storage_target = _schema_volume_read.properties.storage_target + storage_target.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + storage_target.status = AAZStrType( + flags={"read_only": True}, + ) + storage_target.target_iqn = AAZStrType( + serialized_name="targetIqn", + flags={"read_only": True}, + ) + storage_target.target_portal_hostname = AAZStrType( + serialized_name="targetPortalHostname", + flags={"read_only": True}, + ) + storage_target.target_portal_port = AAZIntType( + serialized_name="targetPortalPort", + flags={"read_only": True}, + ) + + system_data = _schema_volume_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = _schema_volume_read.tags + tags.Element = AAZStrType() + + _schema.id = _schema_volume_read.id + _schema.name = _schema_volume_read.name + _schema.properties = _schema_volume_read.properties + _schema.system_data = _schema_volume_read.system_data + _schema.tags = _schema_volume_read.tags + _schema.type = _schema_volume_read.type + + +__all__ = ["Update"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/__cmd_group.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/__cmd_group.py new file mode 100644 index 00000000000..e3d8e2cac70 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "elastic-san volume-group", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manage Elastic SAN Volume Group. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/__init__.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_create.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_create.py new file mode 100644 index 00000000000..fddcd9eecf0 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_create.py @@ -0,0 +1,392 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san volume-group create", + is_preview=True, +) +class Create(AAZCommand): + """Create a Volume Group. + + :example: Create a Volume Group. + az elastic-san volume-group create -e {san_name} -n {vg_name} -g {rg} --tags "{key1910:bbbb}" --encryption EncryptionAtRestWithPlatformKey --protocol-type Iscsi --network-acls "{virtual-network-rules:["{id:{subnet_id},action:Allow}"]}" + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}/volumegroups/{}", "2021-11-20-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-e", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.volume_group_name = AAZStrArg( + options=["-n", "--name", "--volume-group-name"], + help="The name of the VolumeGroup.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + + # define Arg Group "Parameters" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Parameters", + help="Azure resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.encryption = AAZStrArg( + options=["--encryption"], + arg_group="Properties", + help="Type of encryption", + enum={"EncryptionAtRestWithPlatformKey": "EncryptionAtRestWithPlatformKey"}, + ) + _args_schema.network_acls = AAZObjectArg( + options=["--network-acls"], + arg_group="Properties", + help="A collection of rules governing the accessibility from specific network locations.", + ) + _args_schema.protocol_type = AAZStrArg( + options=["--protocol-type"], + arg_group="Properties", + help="Type of storage target", + enum={"Iscsi": "Iscsi", "None": "None"}, + ) + + network_acls = cls._args_schema.network_acls + network_acls.virtual_network_rules = AAZListArg( + options=["virtual-network-rules"], + help="The list of virtual network rules.", + ) + + virtual_network_rules = cls._args_schema.network_acls.virtual_network_rules + virtual_network_rules.Element = AAZObjectArg() + + _element = cls._args_schema.network_acls.virtual_network_rules.Element + _element.action = AAZStrArg( + options=["action"], + help="The action of virtual network rule.", + default="Allow", + enum={"Allow": "Allow"}, + ) + _element.id = AAZStrArg( + options=["id"], + help="Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.VolumeGroupsCreate(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class VolumeGroupsCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeGroupName", self.ctx.args.volume_group_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("encryption", AAZStrType, ".encryption") + properties.set_prop("networkAcls", AAZObjectType, ".network_acls") + properties.set_prop("protocolType", AAZStrType, ".protocol_type") + + network_acls = _builder.get(".properties.networkAcls") + if network_acls is not None: + network_acls.set_prop("virtualNetworkRules", AAZListType, ".virtual_network_rules") + + virtual_network_rules = _builder.get(".properties.networkAcls.virtualNetworkRules") + if virtual_network_rules is not None: + virtual_network_rules.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.networkAcls.virtualNetworkRules[]") + if _elements is not None: + _elements.set_prop("action", AAZStrType, ".action") + _elements.set_prop("id", AAZStrType, ".id", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _build_schema_volume_group_read(cls._schema_on_200) + + return cls._schema_on_200 + + +_schema_volume_group_read = None + + +def _build_schema_volume_group_read(_schema): + global _schema_volume_group_read + if _schema_volume_group_read is not None: + _schema.id = _schema_volume_group_read.id + _schema.name = _schema_volume_group_read.name + _schema.properties = _schema_volume_group_read.properties + _schema.system_data = _schema_volume_group_read.system_data + _schema.tags = _schema_volume_group_read.tags + _schema.type = _schema_volume_group_read.type + return + + _schema_volume_group_read = AAZObjectType() + + volume_group_read = _schema_volume_group_read + volume_group_read.id = AAZStrType( + flags={"read_only": True}, + ) + volume_group_read.name = AAZStrType( + flags={"read_only": True}, + ) + volume_group_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + volume_group_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + volume_group_read.tags = AAZDictType() + volume_group_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_volume_group_read.properties + properties.encryption = AAZStrType() + properties.network_acls = AAZObjectType( + serialized_name="networkAcls", + ) + properties.protocol_type = AAZStrType( + serialized_name="protocolType", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + network_acls = _schema_volume_group_read.properties.network_acls + network_acls.virtual_network_rules = AAZListType( + serialized_name="virtualNetworkRules", + ) + + virtual_network_rules = _schema_volume_group_read.properties.network_acls.virtual_network_rules + virtual_network_rules.Element = AAZObjectType() + + _element = _schema_volume_group_read.properties.network_acls.virtual_network_rules.Element + _element.action = AAZStrType() + _element.id = AAZStrType( + flags={"required": True}, + ) + _element.state = AAZStrType( + flags={"read_only": True}, + ) + + system_data = _schema_volume_group_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = _schema_volume_group_read.tags + tags.Element = AAZStrType() + + _schema.id = _schema_volume_group_read.id + _schema.name = _schema_volume_group_read.name + _schema.properties = _schema_volume_group_read.properties + _schema.system_data = _schema_volume_group_read.system_data + _schema.tags = _schema_volume_group_read.tags + _schema.type = _schema_volume_group_read.type + + +__all__ = ["Create"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_delete.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_delete.py new file mode 100644 index 00000000000..b10a879eef2 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_delete.py @@ -0,0 +1,180 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san volume-group delete", + is_preview=True, + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a Volume Group. + + :example: Delete a Volume Group. + az elastic-san volume-group delete -g {rg} -e {san_name} -n {vg_name} + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}/volumegroups/{}", "2021-11-20-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-e", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.volume_group_name = AAZStrArg( + options=["-n", "--name", "--volume-group-name"], + help="The name of the VolumeGroup.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.VolumeGroupsDelete(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + class VolumeGroupsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeGroupName", self.ctx.args.volume_group_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +__all__ = ["Delete"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_list.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_list.py new file mode 100644 index 00000000000..52d0321beb0 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_list.py @@ -0,0 +1,253 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san volume-group list", + is_preview=True, +) +class List(AAZCommand): + """List Volume Groups. + + :example: List Volume Groups. + az elastic-san volume-group list -g {rg} -e {san_name} + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}/volumegroups", "2021-11-20-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-e", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VolumeGroupsListByElasticSan(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class VolumeGroupsListByElasticSan(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumeGroups", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.encryption = AAZStrType() + properties.network_acls = AAZObjectType( + serialized_name="networkAcls", + ) + properties.protocol_type = AAZStrType( + serialized_name="protocolType", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + network_acls = cls._schema_on_200.value.Element.properties.network_acls + network_acls.virtual_network_rules = AAZListType( + serialized_name="virtualNetworkRules", + ) + + virtual_network_rules = cls._schema_on_200.value.Element.properties.network_acls.virtual_network_rules + virtual_network_rules.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.network_acls.virtual_network_rules.Element + _element.action = AAZStrType() + _element.id = AAZStrType( + flags={"required": True}, + ) + _element.state = AAZStrType( + flags={"read_only": True}, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["List"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_show.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_show.py new file mode 100644 index 00000000000..ae4feb68411 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_show.py @@ -0,0 +1,257 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san volume-group show", + is_preview=True, +) +class Show(AAZCommand): + """Get a Volume Group. + + :example: Get a Volume Group. + az elastic-san volume-group show -g {rg} -e {san_name} -n {vg_name} + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}/volumegroups/{}", "2021-11-20-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-e", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.volume_group_name = AAZStrArg( + options=["-n", "--name", "--volume-group-name"], + help="The name of the VolumeGroup.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VolumeGroupsGet(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class VolumeGroupsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeGroupName", self.ctx.args.volume_group_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.encryption = AAZStrType() + properties.network_acls = AAZObjectType( + serialized_name="networkAcls", + ) + properties.protocol_type = AAZStrType( + serialized_name="protocolType", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + network_acls = cls._schema_on_200.properties.network_acls + network_acls.virtual_network_rules = AAZListType( + serialized_name="virtualNetworkRules", + ) + + virtual_network_rules = cls._schema_on_200.properties.network_acls.virtual_network_rules + virtual_network_rules.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.network_acls.virtual_network_rules.Element + _element.action = AAZStrType() + _element.id = AAZStrType( + flags={"required": True}, + ) + _element.state = AAZStrType( + flags={"read_only": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["Show"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_update.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_update.py new file mode 100644 index 00000000000..4d534ce0e6e --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_update.py @@ -0,0 +1,523 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san volume-group update", + is_preview=True, +) +class Update(AAZCommand): + """Update a Volume Group. + + :example: Update a Volume Group. + az elastic-san volume-group update -e {san_name} -n {vg_name} -g {rg} --tags "{key2011:cccc}" --protocol-type None --network-acls "{virtual-network-rules:["{id:{subnet_id_2},action:Allow}"]}" + """ + + _aaz_info = { + "version": "2021-11-20-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}/volumegroups/{}", "2021-11-20-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-e", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.volume_group_name = AAZStrArg( + options=["-n", "--name", "--volume-group-name"], + help="The name of the VolumeGroup.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + + # define Arg Group "Parameters" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Parameters", + help="Azure resource tags.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.encryption = AAZStrArg( + options=["--encryption"], + arg_group="Properties", + help="Type of encryption", + nullable=True, + enum={"EncryptionAtRestWithPlatformKey": "EncryptionAtRestWithPlatformKey"}, + ) + _args_schema.network_acls = AAZObjectArg( + options=["--network-acls"], + arg_group="Properties", + help="A collection of rules governing the accessibility from specific network locations.", + nullable=True, + ) + _args_schema.protocol_type = AAZStrArg( + options=["--protocol-type"], + arg_group="Properties", + help="Type of storage target", + nullable=True, + enum={"Iscsi": "Iscsi", "None": "None"}, + ) + + network_acls = cls._args_schema.network_acls + network_acls.virtual_network_rules = AAZListArg( + options=["virtual-network-rules"], + help="The list of virtual network rules.", + nullable=True, + ) + + virtual_network_rules = cls._args_schema.network_acls.virtual_network_rules + virtual_network_rules.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.network_acls.virtual_network_rules.Element + _element.action = AAZStrArg( + options=["action"], + help="The action of virtual network rule.", + nullable=True, + enum={"Allow": "Allow"}, + ) + _element.id = AAZStrArg( + options=["id"], + help="Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VolumeGroupsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.VolumeGroupsCreate(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + # @register_callback + def pre_instance_update(self, instance): + pass + + # @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class VolumeGroupsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeGroupName", self.ctx.args.volume_group_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _build_schema_volume_group_read(cls._schema_on_200) + + return cls._schema_on_200 + + class VolumeGroupsCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeGroupName", self.ctx.args.volume_group_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _build_schema_volume_group_read(cls._schema_on_200) + + return cls._schema_on_200 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("encryption", AAZStrType, ".encryption") + properties.set_prop("networkAcls", AAZObjectType, ".network_acls") + properties.set_prop("protocolType", AAZStrType, ".protocol_type") + + network_acls = _builder.get(".properties.networkAcls") + if network_acls is not None: + network_acls.set_prop("virtualNetworkRules", AAZListType, ".virtual_network_rules") + + virtual_network_rules = _builder.get(".properties.networkAcls.virtualNetworkRules") + if virtual_network_rules is not None: + virtual_network_rules.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.networkAcls.virtualNetworkRules[]") + if _elements is not None: + _elements.set_prop("action", AAZStrType, ".action") + _elements.set_prop("id", AAZStrType, ".id", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +_schema_volume_group_read = None + + +def _build_schema_volume_group_read(_schema): + global _schema_volume_group_read + if _schema_volume_group_read is not None: + _schema.id = _schema_volume_group_read.id + _schema.name = _schema_volume_group_read.name + _schema.properties = _schema_volume_group_read.properties + _schema.system_data = _schema_volume_group_read.system_data + _schema.tags = _schema_volume_group_read.tags + _schema.type = _schema_volume_group_read.type + return + + _schema_volume_group_read = AAZObjectType() + + volume_group_read = _schema_volume_group_read + volume_group_read.id = AAZStrType( + flags={"read_only": True}, + ) + volume_group_read.name = AAZStrType( + flags={"read_only": True}, + ) + volume_group_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + volume_group_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + volume_group_read.tags = AAZDictType() + volume_group_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_volume_group_read.properties + properties.encryption = AAZStrType() + properties.network_acls = AAZObjectType( + serialized_name="networkAcls", + ) + properties.protocol_type = AAZStrType( + serialized_name="protocolType", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + network_acls = _schema_volume_group_read.properties.network_acls + network_acls.virtual_network_rules = AAZListType( + serialized_name="virtualNetworkRules", + ) + + virtual_network_rules = _schema_volume_group_read.properties.network_acls.virtual_network_rules + virtual_network_rules.Element = AAZObjectType() + + _element = _schema_volume_group_read.properties.network_acls.virtual_network_rules.Element + _element.action = AAZStrType() + _element.id = AAZStrType( + flags={"required": True}, + ) + _element.state = AAZStrType( + flags={"read_only": True}, + ) + + system_data = _schema_volume_group_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = _schema_volume_group_read.tags + tags.Element = AAZStrType() + + _schema.id = _schema_volume_group_read.id + _schema.name = _schema_volume_group_read.name + _schema.properties = _schema_volume_group_read.properties + _schema.system_data = _schema_volume_group_read.system_data + _schema.tags = _schema_volume_group_read.tags + _schema.type = _schema_volume_group_read.type + + +__all__ = ["Update"] diff --git a/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_wait.py b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_wait.py new file mode 100644 index 00000000000..1c11b995e34 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/aaz/latest/elastic_san/volume_group/_wait.py @@ -0,0 +1,252 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "elastic-san volume-group wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.elasticsan/elasticsans/{}/volumegroups/{}", "2021-11-20-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.elastic_san_name = AAZStrArg( + options=["-e", "--elastic-san-name"], + help="The name of the ElasticSan.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=24, + min_length=3, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.volume_group_name = AAZStrArg( + options=["-n", "--name", "--volume-group-name"], + help="The name of the VolumeGroup.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9]+((-|_)[a-z0-9A-Z]+)*$", + max_length=63, + min_length=3, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VolumeGroupsGet(ctx=self.ctx)() + self.post_operations() + + # @register_callback + def pre_operations(self): + pass + + # @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class VolumeGroupsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "elasticSanName", self.ctx.args.elastic_san_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeGroupName", self.ctx.args.volume_group_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-11-20-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.encryption = AAZStrType() + properties.network_acls = AAZObjectType( + serialized_name="networkAcls", + ) + properties.protocol_type = AAZStrType( + serialized_name="protocolType", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + network_acls = cls._schema_on_200.properties.network_acls + network_acls.virtual_network_rules = AAZListType( + serialized_name="virtualNetworkRules", + ) + + virtual_network_rules = cls._schema_on_200.properties.network_acls.virtual_network_rules + virtual_network_rules.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.network_acls.virtual_network_rules.Element + _element.action = AAZStrType() + _element.id = AAZStrType( + flags={"required": True}, + ) + _element.state = AAZStrType( + flags={"read_only": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["Wait"] diff --git a/src/elastic-san/azext_elastic_san/azext_metadata.json b/src/elastic-san/azext_elastic_san/azext_metadata.json new file mode 100644 index 00000000000..e5473deabe6 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.40.0" +} diff --git a/src/elastic-san/azext_elastic_san/commands.py b/src/elastic-san/azext_elastic_san/commands.py new file mode 100644 index 00000000000..b0d842e4993 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/commands.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +# from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): # pylint: disable=unused-argument + pass diff --git a/src/elastic-san/azext_elastic_san/custom.py b/src/elastic-san/azext_elastic_san/custom.py new file mode 100644 index 00000000000..86df1e48ef5 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/custom.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +from knack.log import get_logger + + +logger = get_logger(__name__) diff --git a/src/elastic-san/azext_elastic_san/tests/__init__.py b/src/elastic-san/azext_elastic_san/tests/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/tests/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/elastic-san/azext_elastic_san/tests/latest/__init__.py b/src/elastic-san/azext_elastic_san/tests/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/tests/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/elastic-san/azext_elastic_san/tests/latest/recordings/test_elastic_san_scenarios.yaml b/src/elastic-san/azext_elastic_san/tests/latest/recordings/test_elastic_san_scenarios.yaml new file mode 100644 index 00000000000..ea9d6f235f4 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/tests/latest/recordings/test_elastic_san_scenarios.yaml @@ -0,0 +1,504 @@ +interactions: +- request: + body: '{"location": "southcentralusstg", "properties": {"baseSizeTiB": 23, "extendedCapacitySizeTiB": + 14, "sku": {"name": "Premium_LRS", "tier": "Premium"}}, "tags": {"key1810": + "aaaa"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san create + Connection: + - keep-alive + Content-Length: + - '179' + Content-Type: + - application/json + ParameterSetName: + - -n -g --tags -l --base-size-tib --extended-capacity-size-tib --sku + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"sku":{"name":"Premium_LRS","tier":"Premium"},"provisioningState":"Creating","baseSizeTiB":23,"extendedCapacitySizeTiB":14,"totalIops":115000,"totalMBps":1840,"totalSizeTiB":37,"volumeGroupCount":0,"totalVolumeSizeGiB":0},"location":"southcentralusstg","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002","name":"elastic-san000002","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1810":"aaaa"},"systemData":{"createdAt":"2022-09-29T08:34:13.3143577Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:34:13.3143577Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '770' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:34:14 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/1acf9011-2637-4290-b4a8-baaec195da35?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san create + Connection: + - keep-alive + ParameterSetName: + - -n -g --tags -l --base-size-tib --extended-capacity-size-tib --sku + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/1acf9011-2637-4290-b4a8-baaec195da35?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/plain; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:34:31 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/1acf9011-2637-4290-b4a8-baaec195da35?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san create + Connection: + - keep-alive + ParameterSetName: + - -n -g --tags -l --base-size-tib --extended-capacity-size-tib --sku + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/1acf9011-2637-4290-b4a8-baaec195da35?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"sku":{"name":"Premium_LRS","tier":"Premium"},"provisioningState":"Succeeded","baseSizeTiB":23,"extendedCapacitySizeTiB":14,"totalIops":115000,"totalMBps":1840,"totalSizeTiB":37,"volumeGroupCount":0,"totalVolumeSizeGiB":0},"location":"southcentralusstg","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002","name":"elastic-san000002","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1810":"aaaa"},"systemData":{"createdAt":"2022-09-29T08:34:13.3143577Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:34:13.3143577Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '771' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:34:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"sku":{"name":"Premium_LRS","tier":"Premium"},"provisioningState":"Succeeded","baseSizeTiB":23,"extendedCapacitySizeTiB":14,"totalIops":115000,"totalMBps":1840,"totalSizeTiB":37,"volumeGroupCount":0,"totalVolumeSizeGiB":0},"location":"southcentralusstg","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002","name":"elastic-san000002","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1810":"aaaa"},"systemData":{"createdAt":"2022-09-29T08:34:13.3143577Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:34:13.3143577Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '771' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:34:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans?api-version=2021-11-20-preview + response: + body: + string: '{"value":[{"properties":{"sku":{"name":"Premium_LRS","tier":"Premium"},"provisioningState":"Succeeded","baseSizeTiB":23,"extendedCapacitySizeTiB":14,"totalIops":115000,"totalMBps":1840,"totalSizeTiB":37,"volumeGroupCount":0,"totalVolumeSizeGiB":0},"location":"southcentralusstg","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002","name":"elastic-san000002","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1810":"aaaa"},"systemData":{"createdAt":"2022-09-29T08:34:13.3143577Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:34:13.3143577Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '783' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:34:52 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san list-sku + Connection: + - keep-alive + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/skus?api-version=2021-11-20-preview + response: + body: + string: '{"value":[{"resourceType":"elasticSans","name":"Premium_LRS","tier":"Premium","locations":["centraluseuap"],"locationInfo":[{"location":"centraluseuap","zones":["1","2"],"zoneDetails":[]}],"capabilities":[{"name":"elasticSanIopsPerBaseTiB","value":"5000"},{"name":"elasticSanMaxSizeTiB","value":"100"},{"name":"elasticSanMinSizeTiB","value":"1"},{"name":"elasticSanMBpsPerBaseTiB","value":"80"},{"name":"elasticSanMaxMBps","value":"8000"},{"name":"elasticSanMinIncrementSizeTiB","value":"1"},{"name":"elasticSanMaxVolumeGroupCount","value":"20"},{"name":"elastiSanMaxIOPS","value":"500000"},{"name":"volumeGroupMaxVolumeCount","value":"1000"},{"name":"volumeMaxSizeGiB","value":"65536"},{"name":"volumeMinSizeGiB","value":"1"},{"name":"volumeIopsPerBaseGiB","value":"750"},{"name":"volumeMBpsPerBaseGiB","value":"192"},{"name":"volumeMaxIops","value":"64000"},{"name":"volumeMaxMBps","value":"1024"},{"name":"volumeMinIncrementSizeGiB","value":"1"}],"restrictions":[]},{"resourceType":"elasticSans","name":"Premium_LRS","tier":"Premium","locations":["eastus2stage"],"locationInfo":[{"location":"eastus2stage","zones":[],"zoneDetails":[]}],"capabilities":[{"name":"elasticSanIopsPerBaseTiB","value":"5000"},{"name":"elasticSanMaxSizeTiB","value":"1024"},{"name":"elasticSanMinSizeTiB","value":"64"},{"name":"elasticSanMBpsPerBaseTiB","value":"80"},{"name":"elasticSanMaxMBps","value":"81920"},{"name":"elasticSanMinIncrementSizeTiB","value":"1"},{"name":"elasticSanMaxVolumeGroupCount","value":"20"},{"name":"volumeGroupMaxVolumeCount","value":"1000"},{"name":"volumeMaxSizeGiB","value":"65536"},{"name":"volumeMinSizeGiB","value":"1"},{"name":"volumeIopsPerBaseGiB","value":"750"},{"name":"volumeMBpsPerBaseGiB","value":"192"},{"name":"volumeMaxIops","value":"64000"},{"name":"volumeMaxMBps","value":"1024"},{"name":"volumeMinIncrementSizeGiB","value":"1"}],"restrictions":[]},{"resourceType":"elasticSans","name":"Premium_LRS","tier":"Premium","locations":["southcentralusstg"],"locationInfo":[{"location":"southcentralusstg","zones":[],"zoneDetails":[]}],"capabilities":[{"name":"elasticSanIopsPerBaseTiB","value":"5000"},{"name":"elasticSanMaxSizeTiB","value":"100"},{"name":"elasticSanMinSizeTiB","value":"1"},{"name":"elasticSanMBpsPerBaseTiB","value":"80"},{"name":"elasticSanMaxMBps","value":"8000"},{"name":"elasticSanMinIncrementSizeTiB","value":"1"},{"name":"elasticSanMaxVolumeGroupCount","value":"20"},{"name":"elastiSanMaxIOPS","value":"500000"},{"name":"volumeGroupMaxVolumeCount","value":"1000"},{"name":"volumeMaxSizeGiB","value":"65536"},{"name":"volumeMinSizeGiB","value":"1"},{"name":"volumeIopsPerBaseGiB","value":"750"},{"name":"volumeMBpsPerBaseGiB","value":"192"},{"name":"volumeMaxIops","value":"64000"},{"name":"volumeMaxMBps","value":"1024"},{"name":"volumeMinIncrementSizeGiB","value":"1"}],"restrictions":[]},{"resourceType":"elasticSans","name":"Premium_ZRS","tier":"Premium","locations":["eastus2euap"],"locationInfo":[{"location":"eastus2euap","zones":[],"zoneDetails":[]}],"capabilities":[{"name":"elasticSanIopsPerBaseTiB","value":"5000"},{"name":"elasticSanMaxSizeTiB","value":"100"},{"name":"elasticSanMinSizeTiB","value":"1"},{"name":"elasticSanMBpsPerBaseTiB","value":"80"},{"name":"elasticSanMaxMBps","value":"8000"},{"name":"elasticSanMinIncrementSizeTiB","value":"1"},{"name":"elasticSanMaxVolumeGroupCount","value":"20"},{"name":"elastiSanMaxIOPS","value":"500000"},{"name":"volumeGroupMaxVolumeCount","value":"1000"},{"name":"volumeMaxSizeGiB","value":"65536"},{"name":"volumeMinSizeGiB","value":"1"},{"name":"volumeIopsPerBaseGiB","value":"750"},{"name":"volumeMBpsPerBaseGiB","value":"192"},{"name":"volumeMaxIops","value":"64000"},{"name":"volumeMaxMBps","value":"1024"},{"name":"volumeMinIncrementSizeGiB","value":"1"}],"restrictions":[]}]}' + headers: + cache-control: + - no-cache + content-length: + - '3786' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:34:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san update + Connection: + - keep-alive + ParameterSetName: + - -n -g --tags --base-size-tib --extended-capacity-size-tib + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"sku":{"name":"Premium_LRS","tier":"Premium"},"provisioningState":"Succeeded","baseSizeTiB":23,"extendedCapacitySizeTiB":14,"totalIops":115000,"totalMBps":1840,"totalSizeTiB":37,"volumeGroupCount":0,"totalVolumeSizeGiB":0},"location":"southcentralusstg","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002","name":"elastic-san000002","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1810":"aaaa"},"systemData":{"createdAt":"2022-09-29T08:34:13.3143577Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:34:13.3143577Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '771' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:34:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "southcentralusstg", "properties": {"baseSizeTiB": 25, "extendedCapacitySizeTiB": + 15, "sku": {"name": "Premium_LRS", "tier": "Premium"}}, "tags": {"key1710": + "bbbb"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san update + Connection: + - keep-alive + Content-Length: + - '179' + Content-Type: + - application/json + ParameterSetName: + - -n -g --tags --base-size-tib --extended-capacity-size-tib + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"sku":{"name":"Premium_LRS","tier":"Premium"},"provisioningState":"Updating","baseSizeTiB":25,"extendedCapacitySizeTiB":15,"totalIops":125000,"totalMBps":2000,"totalSizeTiB":40,"volumeGroupCount":0,"totalVolumeSizeGiB":0},"location":"southcentralusstg","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002","name":"elastic-san000002","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1710":"bbbb"},"systemData":{"createdAt":"2022-09-29T08:34:13.3143577Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:01.046445Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '769' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:35:00 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/c7ad04fd-2348-4b8c-88a1-eefc19592e05?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san update + Connection: + - keep-alive + ParameterSetName: + - -n -g --tags --base-size-tib --extended-capacity-size-tib + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/c7ad04fd-2348-4b8c-88a1-eefc19592e05?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"sku":{"name":"Premium_LRS","tier":"Premium"},"provisioningState":"Succeeded","baseSizeTiB":25,"extendedCapacitySizeTiB":15,"totalIops":125000,"totalMBps":2000,"totalSizeTiB":40,"volumeGroupCount":0,"totalVolumeSizeGiB":0},"location":"southcentralusstg","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002","name":"elastic-san000002","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1710":"bbbb"},"systemData":{"createdAt":"2022-09-29T08:34:13.3143577Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:01.046445Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '770' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:35:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -y + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002?api-version=2021-11-20-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/plain; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:35:27 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan000001/providers/Microsoft.ElasticSan/elasticSans?api-version=2021-11-20-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:35:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/elastic-san/azext_elastic_san/tests/latest/recordings/test_elastic_san_volume_group_and_volume_scenarios.yaml b/src/elastic-san/azext_elastic_san/tests/latest/recordings/test_elastic_san_volume_group_and_volume_scenarios.yaml new file mode 100644 index 00000000000..6526d1f2ff0 --- /dev/null +++ b/src/elastic-san/azext_elastic_san/tests/latest/recordings/test_elastic_san_volume_group_and_volume_scenarios.yaml @@ -0,0 +1,1681 @@ +interactions: +- request: + body: '{"location": "southcentralusstg", "properties": {"baseSizeTiB": 23, "extendedCapacitySizeTiB": + 14, "sku": {"name": "Premium_LRS", "tier": "Premium"}}, "tags": {"key1810": + "aaaa"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san create + Connection: + - keep-alive + Content-Length: + - '179' + Content-Type: + - application/json + ParameterSetName: + - -n -g --tags -l --base-size-tib --extended-capacity-size-tib --sku + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"sku":{"name":"Premium_LRS","tier":"Premium"},"provisioningState":"Creating","baseSizeTiB":23,"extendedCapacitySizeTiB":14,"totalIops":115000,"totalMBps":1840,"totalSizeTiB":37,"volumeGroupCount":0,"totalVolumeSizeGiB":0},"location":"southcentralusstg","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002","name":"elastic-san000002","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1810":"aaaa"},"systemData":{"createdAt":"2022-09-29T08:34:10.2505955Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:34:10.2505955Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '782' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:34:10 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/2e49de7b-6a7f-4465-8dec-cce831e7d093?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san create + Connection: + - keep-alive + ParameterSetName: + - -n -g --tags -l --base-size-tib --extended-capacity-size-tib --sku + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/2e49de7b-6a7f-4465-8dec-cce831e7d093?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/plain; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:34:27 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/2e49de7b-6a7f-4465-8dec-cce831e7d093?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san create + Connection: + - keep-alive + ParameterSetName: + - -n -g --tags -l --base-size-tib --extended-capacity-size-tib --sku + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/2e49de7b-6a7f-4465-8dec-cce831e7d093?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"sku":{"name":"Premium_LRS","tier":"Premium"},"provisioningState":"Succeeded","baseSizeTiB":23,"extendedCapacitySizeTiB":14,"totalIops":115000,"totalMBps":1840,"totalSizeTiB":37,"volumeGroupCount":0,"totalVolumeSizeGiB":0},"location":"southcentralusstg","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002","name":"elastic-san000002","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1810":"aaaa"},"systemData":{"createdAt":"2022-09-29T08:34:10.2505955Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:34:10.2505955Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '783' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:34:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - -g -n --address-prefix --subnet-name --subnet-prefix + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.9.6 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg.testelasticsan.volumegroup000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001","name":"clitest.rg.testelasticsan.volumegroup000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2022-09-29T08:34:01Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '369' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:34:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2euap", "tags": {}, "properties": {"addressSpace": + {"addressPrefixes": ["10.0.0.0/16"]}, "dhcpOptions": {}, "subnets": [{"name": + "subnet000005", "properties": {"addressPrefix": "10.0.0.0/24", "privateEndpointNetworkPolicies": + "Disabled", "privateLinkServiceNetworkPolicies": "Enabled"}}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + Content-Length: + - '309' + Content-Type: + - application/json + ParameterSetName: + - -g -n --address-prefix --subnet-name --subnet-prefix + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.9.6 + (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n + \ \"etag\": \"W/\\\"9c9f4779-3abe-4425-b21a-df55ed4c9ef0\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"d3a41d66-a423-4e0f-abe9-ff20a8596415\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"subnet000005\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005\",\r\n + \ \"etag\": \"W/\\\"9c9f4779-3abe-4425-b21a-df55ed4c9ef0\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": + \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/9c5b32aa-9451-4c3c-a6a7-3d66afd424ab?api-version=2022-01-01 + cache-control: + - no-cache + content-length: + - '1370' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:34:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 44f3709a-b9c0-47ee-a274-d1a98eb531bf + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - -g -n --address-prefix --subnet-name --subnet-prefix + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.9.6 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/9c5b32aa-9451-4c3c-a6a7-3d66afd424ab?api-version=2022-01-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:34:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 1cba8f51-0491-48e2-9c90-6be0cdb03bed + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - -g -n --address-prefix --subnet-name --subnet-prefix + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.9.6 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n + \ \"etag\": \"W/\\\"9fa810b3-e730-4e23-8ded-558db578bc9a\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"d3a41d66-a423-4e0f-abe9-ff20a8596415\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"subnet000005\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005\",\r\n + \ \"etag\": \"W/\\\"9fa810b3-e730-4e23-8ded-558db578bc9a\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": + \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1372' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:34:58 GMT + etag: + - W/"9fa810b3-e730-4e23-8ded-558db578bc9a" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 79208f9b-20b4-492d-bc65-b1457bac4f3a + status: + code: 200 + message: '' +- request: + body: '{"properties": {"encryption": "EncryptionAtRestWithPlatformKey", "networkAcls": + {"virtualNetworkRules": [{"action": "Allow", "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005"}]}, + "protocolType": "Iscsi"}, "tags": {"key1910": "bbbb"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume-group create + Connection: + - keep-alive + Content-Length: + - '378' + Content-Type: + - application/json + ParameterSetName: + - -e -n -g --tags --encryption --protocol-type --network-acls + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"provisioningState":"Creating","networkAcls":{"virtualNetworkRules":[{"action":"Allow","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005"}]},"protocolType":"iSCSI","encryption":"EncryptionAtRestWithPlatformKey"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003","name":"volume-group000003","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1910":"bbbb"},"systemData":{"createdAt":"2022-09-29T08:35:00.8550064Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:00.8550064Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '917' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:35:02 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/a0f43cce-9d93-4576-b1ae-3e047827398f?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume-group create + Connection: + - keep-alive + ParameterSetName: + - -e -n -g --tags --encryption --protocol-type --network-acls + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/a0f43cce-9d93-4576-b1ae-3e047827398f?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","networkAcls":{"virtualNetworkRules":[{"action":"Allow","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005"}]},"protocolType":"iSCSI","encryption":"EncryptionAtRestWithPlatformKey"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003","name":"volume-group000003","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1910":"bbbb"},"systemData":{"createdAt":"2022-09-29T08:35:00.8550064Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:00.8550064Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '918' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:35:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume-group show + Connection: + - keep-alive + ParameterSetName: + - -g -e -n + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","networkAcls":{"virtualNetworkRules":[{"action":"Allow","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005"}]},"protocolType":"iSCSI","encryption":"EncryptionAtRestWithPlatformKey"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003","name":"volume-group000003","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1910":"bbbb"},"systemData":{"createdAt":"2022-09-29T08:35:00.8550064Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:00.8550064Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '918' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:35:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume-group list + Connection: + - keep-alive + ParameterSetName: + - -g -e + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumeGroups?api-version=2021-11-20-preview + response: + body: + string: '{"value":[{"properties":{"provisioningState":"Succeeded","networkAcls":{"virtualNetworkRules":[{"action":"Allow","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005"}]},"protocolType":"iSCSI","encryption":"EncryptionAtRestWithPlatformKey"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003","name":"volume-group000003","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1910":"bbbb"},"systemData":{"createdAt":"2022-09-29T08:35:00.8550064Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:00.8550064Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '930' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:35:25 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + ParameterSetName: + - -g --vnet-name --name --address-prefixes --service-endpoints + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.9.6 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n + \ \"etag\": \"W/\\\"9fa810b3-e730-4e23-8ded-558db578bc9a\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"d3a41d66-a423-4e0f-abe9-ff20a8596415\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"subnet000005\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005\",\r\n + \ \"etag\": \"W/\\\"9fa810b3-e730-4e23-8ded-558db578bc9a\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": + \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1372' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:35:26 GMT + etag: + - W/"9fa810b3-e730-4e23-8ded-558db578bc9a" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 242390d4-4074-44db-aebb-84f4ce78e974 + status: + code: 200 + message: '' +- request: + body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004", + "location": "eastus2euap", "tags": {}, "properties": {"addressSpace": {"addressPrefixes": + ["10.0.0.0/16"]}, "dhcpOptions": {"dnsServers": []}, "subnets": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005", + "name": "subnet000005", "type": "Microsoft.Network/virtualNetworks/subnets", + "properties": {"addressPrefix": "10.0.0.0/24", "delegations": [], "privateEndpointNetworkPolicies": + "Disabled", "privateLinkServiceNetworkPolicies": "Enabled"}}, {"name": "subnet000006", + "properties": {"addressPrefix": "10.0.1.0/24", "serviceEndpoints": [{"service": + "Microsoft.Storage"}], "privateEndpointNetworkPolicies": "Disabled", "privateLinkServiceNetworkPolicies": + "Enabled"}}], "virtualNetworkPeerings": [], "enableDdosProtection": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + Content-Length: + - '1053' + Content-Type: + - application/json + ParameterSetName: + - -g --vnet-name --name --address-prefixes --service-endpoints + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.9.6 + (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n + \ \"etag\": \"W/\\\"ed295433-2ed6-4135-8cd6-98494b01d6a2\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"d3a41d66-a423-4e0f-abe9-ff20a8596415\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"subnet000005\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005\",\r\n + \ \"etag\": \"W/\\\"ed295433-2ed6-4135-8cd6-98494b01d6a2\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": + \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ },\r\n {\r\n \"name\": \"subnet000006\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000006\",\r\n + \ \"etag\": \"W/\\\"ed295433-2ed6-4135-8cd6-98494b01d6a2\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"10.0.1.0/24\",\r\n \"serviceEndpoints\": + [\r\n {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"service\": \"Microsoft.Storage\",\r\n \"locations\": + [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": + \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/6a22ea54-8595-4f4d-aa9d-24036a1476f8?api-version=2022-01-01 + cache-control: + - no-cache + content-length: + - '2260' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:35:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - ef80f5ee-691d-4a92-9a2a-f0e91f1bbc76 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + ParameterSetName: + - -g --vnet-name --name --address-prefixes --service-endpoints + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.9.6 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/6a22ea54-8595-4f4d-aa9d-24036a1476f8?api-version=2022-01-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:35:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 2dcb767b-e569-4944-b938-0ed66a94b4da + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + ParameterSetName: + - -g --vnet-name --name --address-prefixes --service-endpoints + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.9.6 + (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n + \ \"etag\": \"W/\\\"7ce96f6d-0d66-4c5b-99e0-8f732f3a3c35\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2euap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"d3a41d66-a423-4e0f-abe9-ff20a8596415\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"subnet000005\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005\",\r\n + \ \"etag\": \"W/\\\"7ce96f6d-0d66-4c5b-99e0-8f732f3a3c35\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": + \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ },\r\n {\r\n \"name\": \"subnet000006\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000006\",\r\n + \ \"etag\": \"W/\\\"7ce96f6d-0d66-4c5b-99e0-8f732f3a3c35\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.1.0/24\",\r\n \"serviceEndpoints\": + [\r\n {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"service\": \"Microsoft.Storage\",\r\n \"locations\": + [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": + \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2264' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:35:33 GMT + etag: + - W/"7ce96f6d-0d66-4c5b-99e0-8f732f3a3c35" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 36dd0171-7228-4066-a4dc-3f190b8aae07 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume-group update + Connection: + - keep-alive + ParameterSetName: + - -e -n -g --tags --protocol-type --network-acls + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","networkAcls":{"virtualNetworkRules":[{"action":"Allow","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005"}]},"protocolType":"iSCSI","encryption":"EncryptionAtRestWithPlatformKey"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003","name":"volume-group000003","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key1910":"bbbb"},"systemData":{"createdAt":"2022-09-29T08:35:00.8550064Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:00.8550064Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '918' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:35:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"encryption": "EncryptionAtRestWithPlatformKey", "networkAcls": + {"virtualNetworkRules": [{"action": "Allow", "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000006"}]}, + "protocolType": "None"}, "tags": {"key2011": "cccc"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume-group update + Connection: + - keep-alive + Content-Length: + - '377' + Content-Type: + - application/json + ParameterSetName: + - -e -n -g --tags --protocol-type --network-acls + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"provisioningState":"Updating","networkAcls":{"virtualNetworkRules":[{"action":"Allow","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000006"}]},"protocolType":"None","encryption":"EncryptionAtRestWithPlatformKey"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003","name":"volume-group000003","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key2011":"cccc"},"systemData":{"createdAt":"2022-09-29T08:35:36.6905948Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:36.6905948Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '916' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:35:36 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/8e3ab53c-cab4-4f28-9971-b5c167bfabce?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume-group update + Connection: + - keep-alive + ParameterSetName: + - -e -n -g --tags --protocol-type --network-acls + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/8e3ab53c-cab4-4f28-9971-b5c167bfabce?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","networkAcls":{"virtualNetworkRules":[{"action":"Allow","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000006"}]},"protocolType":"None","encryption":"EncryptionAtRestWithPlatformKey"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003","name":"volume-group000003","type":"Microsoft.ElasticSan/ElasticSans","tags":{"key2011":"cccc"},"systemData":{"createdAt":"2022-09-29T08:35:36.6905948Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:36.6905948Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '917' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:35:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"sizeGiB": 2}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume create + Connection: + - keep-alive + Content-Length: + - '30' + Content-Type: + - application/json + ParameterSetName: + - -g -e -v -n --size-gib + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes/volume000007?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"creationData":{"createSource":"None"},"sizeGiB":2,"storageTarget":{"provisioningState":"Creating","status":"Pending"},"volumeId":"de28b105-997b-474f-8109-72a56cc5d8e7"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes/volume000007","name":"volume000007","type":"Microsoft.ElasticSan/ElasticSans","systemData":{"createdAt":"2022-09-29T08:35:55.3028146Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:55.3028146Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '721' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:35:55 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/c0b73142-1c28-4912-89fa-be1b272d93c7?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume create + Connection: + - keep-alive + ParameterSetName: + - -g -e -v -n --size-gib + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/c0b73142-1c28-4912-89fa-be1b272d93c7?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/plain; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:36:12 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/c0b73142-1c28-4912-89fa-be1b272d93c7?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume create + Connection: + - keep-alive + ParameterSetName: + - -g -e -v -n --size-gib + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/c0b73142-1c28-4912-89fa-be1b272d93c7?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/plain; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:36:16 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/c0b73142-1c28-4912-89fa-be1b272d93c7?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume create + Connection: + - keep-alive + ParameterSetName: + - -g -e -v -n --size-gib + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/c0b73142-1c28-4912-89fa-be1b272d93c7?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/plain; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:36:19 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/c0b73142-1c28-4912-89fa-be1b272d93c7?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume create + Connection: + - keep-alive + ParameterSetName: + - -g -e -v -n --size-gib + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/c0b73142-1c28-4912-89fa-be1b272d93c7?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/plain; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:36:22 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/c0b73142-1c28-4912-89fa-be1b272d93c7?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume create + Connection: + - keep-alive + ParameterSetName: + - -g -e -v -n --size-gib + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/c0b73142-1c28-4912-89fa-be1b272d93c7?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"creationData":{"createSource":"None"},"sizeGiB":2,"storageTarget":{"targetIqn":"iqn.2022-09.net.windows.core.blob.ElasticSan.es-opd3okhhftn0:volume000007","provisioningState":"Succeeded","status":"Running","targetPortalHostname":"es-opd3okhhftn0.z30.blob.storage.azure.net","targetPortalPort":3260},"volumeId":"de28b105-997b-474f-8109-72a56cc5d8e7"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes/volume000007","name":"volume000007","type":"Microsoft.ElasticSan/ElasticSans","systemData":{"createdAt":"2022-09-29T08:35:55.3028146Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:55.3028146Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '902' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:36:26 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume show + Connection: + - keep-alive + ParameterSetName: + - -g -e -v -n + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes/volume000007?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"creationData":{"createSource":"None"},"sizeGiB":2,"storageTarget":{"targetIqn":"iqn.2022-09.net.windows.core.blob.ElasticSan.es-opd3okhhftn0:volume000007","provisioningState":"Succeeded","status":"Running","targetPortalHostname":"es-opd3okhhftn0.z30.blob.storage.azure.net","targetPortalPort":3260},"volumeId":"de28b105-997b-474f-8109-72a56cc5d8e7"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes/volume000007","name":"volume000007","type":"Microsoft.ElasticSan/ElasticSans","systemData":{"createdAt":"2022-09-29T08:35:55.3028146Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:55.3028146Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '902' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:36:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume list + Connection: + - keep-alive + ParameterSetName: + - -g -e -v + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes?api-version=2021-11-20-preview + response: + body: + string: '{"value":[{"properties":{"creationData":{"createSource":"None"},"sizeGiB":2,"storageTarget":{"targetIqn":"iqn.2022-09.net.windows.core.blob.ElasticSan.es-opd3okhhftn0:volume000007","provisioningState":"Succeeded","status":"Running","targetPortalHostname":"es-opd3okhhftn0.z30.blob.storage.azure.net","targetPortalPort":3260},"volumeId":"de28b105-997b-474f-8109-72a56cc5d8e7"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes/volume000007","name":"volume000007","type":"Microsoft.ElasticSan/ElasticSans","systemData":{"createdAt":"2022-09-29T08:35:55.3028146Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:55.3028146Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '914' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:36:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume update + Connection: + - keep-alive + ParameterSetName: + - -g -e -v -n --size-gib + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes/volume000007?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"creationData":{"createSource":"None"},"sizeGiB":2,"storageTarget":{"targetIqn":"iqn.2022-09.net.windows.core.blob.ElasticSan.es-opd3okhhftn0:volume000007","provisioningState":"Succeeded","status":"Running","targetPortalHostname":"es-opd3okhhftn0.z30.blob.storage.azure.net","targetPortalPort":3260},"volumeId":"de28b105-997b-474f-8109-72a56cc5d8e7"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes/volume000007","name":"volume000007","type":"Microsoft.ElasticSan/ElasticSans","systemData":{"createdAt":"2022-09-29T08:35:55.3028146Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:35:55.3028146Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '902' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:36:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"creationData": {"createSource": "None"}, "sizeGiB": 3}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume update + Connection: + - keep-alive + Content-Length: + - '72' + Content-Type: + - application/json + ParameterSetName: + - -g -e -v -n --size-gib + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes/volume000007?api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"creationData":{"createSource":"None"},"sizeGiB":3,"storageTarget":{"targetIqn":"iqn.2022-09.net.windows.core.blob.ElasticSan.es-opd3okhhftn0:volume000007","provisioningState":"Updating","status":"Pending","targetPortalHostname":"es-opd3okhhftn0.z30.blob.storage.azure.net","targetPortalPort":3260},"volumeId":"de28b105-997b-474f-8109-72a56cc5d8e7"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes/volume000007","name":"volume000007","type":"Microsoft.ElasticSan/ElasticSans","systemData":{"createdAt":"2022-09-29T08:36:32.7247158Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:36:32.7247158Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '901' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:36:32 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/658efcf0-af20-4609-b48f-7865ee1a41ab?monitor=true&api-version=2021-11-20-preview + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume update + Connection: + - keep-alive + ParameterSetName: + - -g -e -v -n --size-gib + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ElasticSan/locations/southcentralusstg/asyncoperations/658efcf0-af20-4609-b48f-7865ee1a41ab?monitor=true&api-version=2021-11-20-preview + response: + body: + string: '{"properties":{"creationData":{"createSource":"None"},"sizeGiB":3,"storageTarget":{"targetIqn":"iqn.2022-09.net.windows.core.blob.ElasticSan.es-opd3okhhftn0:volume000007","provisioningState":"Succeeded","status":"Running","targetPortalHostname":"es-opd3okhhftn0.z30.blob.storage.azure.net","targetPortalPort":3260},"volumeId":"de28b105-997b-474f-8109-72a56cc5d8e7"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes/volume000007","name":"volume000007","type":"Microsoft.ElasticSan/ElasticSans","systemData":{"createdAt":"2022-09-29T08:36:32.7247158Z","createdBy":"zhiyihuang@microsoft.com","createdByType":"User","lastModifiedAt":"2022-09-29T08:36:32.7247158Z","lastModifiedBy":"zhiyihuang@microsoft.com","lastModifiedByType":"User"}}' + headers: + cache-control: + - no-cache + content-length: + - '902' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:36:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -e -v -n -y + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes/volume000007?api-version=2021-11-20-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/plain; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:36:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume list + Connection: + - keep-alive + ParameterSetName: + - -g -e -v + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003/volumes?api-version=2021-11-20-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json + date: + - Thu, 29 Sep 2022 08:36:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san volume-group delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -e -n -y + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002/volumegroups/volume-group000003?api-version=2021-11-20-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/plain; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:36:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - elastic-san delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -y + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.9.6 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg.testelasticsan.volumegroup000001/providers/Microsoft.ElasticSan/elasticSans/elastic-san000002?api-version=2021-11-20-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/plain; charset=utf-8 + date: + - Thu, 29 Sep 2022 08:37:24 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +version: 1 diff --git a/src/elastic-san/azext_elastic_san/tests/latest/test_elastic_san.py b/src/elastic-san/azext_elastic_san/tests/latest/test_elastic_san.py new file mode 100644 index 00000000000..92ef44ec33a --- /dev/null +++ b/src/elastic-san/azext_elastic_san/tests/latest/test_elastic_san.py @@ -0,0 +1,105 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from azure.cli.testsdk import * +import time + +class ElasticSanScenario(ScenarioTest): + @ResourceGroupPreparer(location='eastus2euap', name_prefix='clitest.rg.testelasticsan') + def test_elastic_san_scenarios(self, resource_group): + self.kwargs.update({ + "san_name": self.create_random_name('elastic-san', 24) + }) + self.cmd('az elastic-san create -n {san_name} -g {rg} --tags {{key1810:aaaa}} -l southcentralusstg ' + '--base-size-tib 23 --extended-capacity-size-tib 14 ' + '--sku {{name:Premium_LRS,tier:Premium}}', + checks=[JMESPathCheck('name', self.kwargs.get('san_name', '')), + JMESPathCheck('location', "southcentralusstg"), + JMESPathCheck('tags', {"key1810": "aaaa"}), + JMESPathCheck('baseSizeTiB', 23), + JMESPathCheck('extendedCapacitySizeTiB', 14), + JMESPathCheck('sku', {"name": "Premium_LRS", + "tier": "Premium"}) + ]) + self.cmd('az elastic-san show -g {rg} -n {san_name}', + checks=[JMESPathCheck('name', self.kwargs.get('san_name', '')), + JMESPathCheck('location', "southcentralusstg"), + JMESPathCheck('tags', {"key1810": "aaaa"}), + JMESPathCheck('baseSizeTiB', 23), + JMESPathCheck('extendedCapacitySizeTiB', 14), + JMESPathCheck('sku', {"name": "Premium_LRS", + "tier": "Premium"}) + ]) + self.cmd('az elastic-san list -g {rg}', checks=[JMESPathCheck('length(@)', 1)]) + self.cmd('az elastic-san list-sku') + self.cmd('az elastic-san update -n {san_name} -g {rg} --tags {{key1710:bbbb}} ' + '--base-size-tib 25 --extended-capacity-size-tib 15', + checks=[JMESPathCheck('name', self.kwargs.get('san_name', '')), + JMESPathCheck('tags', {"key1710": "bbbb"}), + JMESPathCheck('baseSizeTiB', 25), + JMESPathCheck('extendedCapacitySizeTiB', 15)]) + self.cmd('az elastic-san delete -g {rg} -n {san_name} -y') + time.sleep(20) + self.cmd('az elastic-san list -g {rg}', checks=[JMESPathCheck('length(@)', 0)]) + + @ResourceGroupPreparer(location='eastus2euap', name_prefix='clitest.rg.testelasticsan.volumegroup') + def test_elastic_san_volume_group_and_volume_scenarios(self, resource_group): + self.kwargs.update({ + "san_name": self.create_random_name('elastic-san', 24), + "vg_name": self.create_random_name('volume-group', 24), + "vnet_name": self.create_random_name('vnet', 24), + "subnet_name": self.create_random_name('subnet', 24), + "subnet_name_2": self.create_random_name('subnet', 24), + "volume_name": self.create_random_name('volume', 24) + }) + self.cmd('az elastic-san create -n {san_name} -g {rg} --tags {{key1810:aaaa}} -l southcentralusstg ' + '--base-size-tib 23 --extended-capacity-size-tib 14 ' + '--sku {{name:Premium_LRS,tier:Premium}}') + subnet_id = self.cmd('az network vnet create -g {rg} -n {vnet_name} --address-prefix 10.0.0.0/16 ' + '--subnet-name {subnet_name} ' + '--subnet-prefix 10.0.0.0/24').get_output_in_json()["newVNet"]["subnets"][0]["id"] + self.kwargs.update({"subnet_id": subnet_id}) + self.cmd('az elastic-san volume-group create -e {san_name} -n {vg_name} -g {rg} --tags {{key1910:bbbb}} ' + '--encryption EncryptionAtRestWithPlatformKey --protocol-type Iscsi ' + '--network-acls {{virtual-network-rules:[{{id:{subnet_id},action:Allow}}]}}') + self.cmd('az elastic-san volume-group show -g {rg} -e {san_name} -n {vg_name}', + checks=[JMESPathCheck('name', self.kwargs.get('vg_name', '')), + JMESPathCheck('tags', {"key1910": "bbbb"}), + JMESPathCheck('encryption', "EncryptionAtRestWithPlatformKey"), + JMESPathCheck('protocolType', "iSCSI"), + JMESPathCheck('networkAcls', {"virtualNetworkRules":[{ + "action": "Allow", + "id": subnet_id, + "resourceGroup": self.kwargs.get('rg','')}]})]) + self.cmd('az elastic-san volume-group list -g {rg} -e {san_name}', checks=[JMESPathCheck('length(@)', 1)]) + + subnet_id_2 = self.cmd('az network vnet subnet create -g {rg} --vnet-name {vnet_name} --name {subnet_name_2} ' + '--address-prefixes 10.0.1.0/24 ' + '--service-endpoints Microsoft.Storage').get_output_in_json()["id"] + self.kwargs.update({"subnet_id_2": subnet_id_2}) + self.cmd('az elastic-san volume-group update -e {san_name} -n {vg_name} -g {rg} --tags {{key2011:cccc}} ' + '--protocol-type None ' + '--network-acls {{virtual-network-rules:[{{id:{subnet_id_2},action:Allow}}]}}', + checks=[JMESPathCheck('tags', {"key2011": "cccc"}), + JMESPathCheck('protocolType', "None"), + JMESPathCheck('networkAcls.virtualNetworkRules[0].id', subnet_id_2)]) + + self.cmd('az elastic-san volume create -g {rg} -e {san_name} -v {vg_name} -n {volume_name} --size-gib 2') + self.cmd('az elastic-san volume show -g {rg} -e {san_name} -v {vg_name} -n {volume_name}', + checks=[JMESPathCheck('name', self.kwargs.get('volume_name', '')), + JMESPathCheck('sizeGiB', 2)]) + self.cmd('az elastic-san volume list -g {rg} -e {san_name} -v {vg_name}', + checks=[JMESPathCheck('length(@)', 1)]) + self.cmd('az elastic-san volume update -g {rg} -e {san_name} -v {vg_name} -n {volume_name} --size-gib 3', + checks=[JMESPathCheck('sizeGiB', 3)]) + self.cmd('az elastic-san volume delete -g {rg} -e {san_name} -v {vg_name} -n {volume_name} -y') + self.cmd('az elastic-san volume list -g {rg} -e {san_name} -v {vg_name}', + checks=[JMESPathCheck('length(@)', 0)]) + + self.cmd('az elastic-san volume-group delete -g {rg} -e {san_name} -n {vg_name} -y') + time.sleep(20) + self.cmd('az elastic-san delete -g {rg} -n {san_name} -y') diff --git a/src/elastic-san/setup.cfg b/src/elastic-san/setup.cfg new file mode 100644 index 00000000000..2fdd96e5d39 --- /dev/null +++ b/src/elastic-san/setup.cfg @@ -0,0 +1 @@ +#setup.cfg \ No newline at end of file diff --git a/src/elastic-san/setup.py b/src/elastic-san/setup.py new file mode 100644 index 00000000000..cca23688c41 --- /dev/null +++ b/src/elastic-san/setup.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from codecs import open +from setuptools import setup, find_packages + + +# HISTORY.rst entry. +VERSION = '0.1.0' + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = [] + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='elastic-san', + version=VERSION, + description='Microsoft Azure Command-Line Tools ElasticSan Extension.', + long_description=README + '\n\n' + HISTORY, + license='MIT', + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions/tree/master/src/elastic-san', + classifiers=CLASSIFIERS, + packages=find_packages(exclude=["tests"]), + package_data={'azext_elastic_san': ['azext_metadata.json']}, + install_requires=DEPENDENCIES +) diff --git a/src/index.json b/src/index.json index 633cf463eff..02904846dbc 100644 --- a/src/index.json +++ b/src/index.json @@ -16317,6 +16317,59 @@ "version": "1.3.3" }, "sha256Digest": "1a42dd74a1c4d8552ed57112314da641a8e78acc1ba7ec763ebecc390b5aaf9c" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/connectedk8s-1.3.4-py2.py3-none-any.whl", + "filename": "connectedk8s-1.3.4-py2.py3-none-any.whl", + "metadata": { + "azext.minCliCoreVersion": "2.30.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "description_content_type": "text/markdown", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "k8connect@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/connectedk8s" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "connectedk8s", + "run_requires": [ + { + "requires": [ + "azure-mgmt-hybridcompute (==7.0.0)", + "kubernetes (==11.0.0)", + "pycryptodome (==3.14.1)" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools Connectedk8s Extension", + "version": "1.3.4" + }, + "sha256Digest": "83ed63bb821ae47b944b6d2e4894229bfc76e9b0cefec8b73a0c74f9ea44e833" } ], "connectedmachine": [ @@ -18668,6 +18721,49 @@ "version": "0.18.1" }, "sha256Digest": "e75b001721b1a542f8ab8e15105e7b6502a1dc68f2850c20a97e67a6eecb003f" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/cosmosdb_preview-0.19.0-py2.py3-none-any.whl", + "filename": "cosmosdb_preview-0.19.0-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.17.1", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "kakhandr@microsoft.com", + "name": "Kalyan khandrika", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/cosmosdb-preview" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "cosmosdb-preview", + "summary": "Microsoft Azure Command-Line Tools Cosmosdb-preview Extension", + "version": "0.19.0" + }, + "sha256Digest": "aee16bae5d9bcde85fba80e6be5483c63709339f2227378ae4a721fad9a83ee0" } ], "costmanagement": [ @@ -22340,6 +22436,51 @@ "sha256Digest": "bcc9f3d37aa7a73a57899873c1f4ed3baa7d5d80e98f8ac74cdbc993ea939215" } ], + "elastic-san": [ + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/elastic_san-0.1.0-py3-none-any.whl", + "filename": "elastic_san-0.1.0-py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.40.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/elastic-san" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "elastic-san", + "summary": "Microsoft Azure Command-Line Tools ElasticSan Extension.", + "version": "0.1.0" + }, + "sha256Digest": "eda91cb50484637810d1aa9177affbe4bb2008ef1072497414ddcc4cde558fdf" + } + ], "enterprise-edge": [ { "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/enterprise_edge-0.1.0-py3-none-any.whl", @@ -32949,6 +33090,52 @@ "sha256Digest": "db8c673e2e29498e9f54f3392a5305952c273e7c24d293d96c0708dd3e90d5fe" } ], + "reservation": [ + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/reservation-0.1.0-py3-none-any.whl", + "filename": "reservation-0.1.0-py3-none-any.whl", + "metadata": { + "azext.minCliCoreVersion": "2.15.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/reservation" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "reservation", + "summary": "Microsoft Azure Command-Line Tools Reservation Extension", + "version": "0.1.0" + }, + "sha256Digest": "42235bca7368dca70d5cf5063c79b79d1cf713e63170ef038c08275af2daeedb" + } + ], "resource-graph": [ { "downloadUrl": "https://files.pythonhosted.org/packages/bd/c1/3df175a9a6a0c6aeae1ca1a7499955d75dd03452b5ba75f6df01a02b7c7f/resource_graph-1.0.0-py2.py3-none-any.whl", diff --git a/src/k8s-extension/HISTORY.rst b/src/k8s-extension/HISTORY.rst index d220fc47465..1de8cc95b23 100644 --- a/src/k8s-extension/HISTORY.rst +++ b/src/k8s-extension/HISTORY.rst @@ -5,6 +5,8 @@ Release History 1.3.6 ++++++++++++++++++ +* k8s-extension updating the api version for extension type calls +* k8s-extension adding tests for all extension type calls * k8s-extension fix to address the error TypeError: cf_k8s_extension() takes 1 positional argument but 2 were given while running all az k8s-extension extension-types commands * microsoft.azuremonitor.containers: Update DCR creation to Clusters resource group instead of workspace * microsoft.dataprotection.kubernetes: Authoring a new k8s partner extension for the BCDR solution of AKS clusters diff --git a/src/reservation/HISTORY.rst b/src/reservation/HISTORY.rst new file mode 100644 index 00000000000..1c139576ba0 --- /dev/null +++ b/src/reservation/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +0.1.0 +++++++ +* Initial release. diff --git a/src/reservation/README.md b/src/reservation/README.md new file mode 100644 index 00000000000..eb7a6ff3b2c --- /dev/null +++ b/src/reservation/README.md @@ -0,0 +1,117 @@ +# Azure CLI Reservation Extension # +This is the extension for reservation feature + +### How to use ### +Install this extension using the below CLI command +``` +az extension add --name reservation +``` + +### Included Features +#### Manage Azure Reservations. + +##### Get catalog of available reservation. +``` +az reservations catalog show --subscription-id {subId} \ + [--location {location}] \ + [--offer-id {offerId}] \ + [--plan-id {planId}] \ + [--publisher-id {publisherId}] \ + [--reserved-resource-type {AVS, AppService, AzureDataExplorer, AzureFiles, BlockBlob, CosmosDb, DataFactory, Databricks, DedicatedHost, ManagedDisk, MariaDb, MySql, NetAppStorage, PostgreSql, RedHat, RedHatOsa, RedisCache, SapHana, SqlAzureHybridBenefit, SqlDataWarehouse, SqlDatabases, SqlEdge, SuseLinux, VMwareCloudSimple, VirtualMachineSoftware, VirtualMachines}] +``` + +##### List all reservations within a reservation order. +``` +az reservations reservation list \ + --reservation-order-id {orderId} +``` + +##### Get history of a reservation. +``` +az reservations reservation list-history \ + --reservation-id {reservationId} \ + --reservation-order-id {orderId} +``` + +##### Merge two reservations. +``` +az reservations reservation merge \ + --reservation-id-1 {reservationId1} \ + --reservation-id-2 {reservationId2} \ + --reservation-order-id {orderId} +``` + +##### Get details of a reservation. +``` +az reservations reservation show \ + --reservation-id {reservationId} \ + --reservation-order-id {orderId} +``` + +##### Split a reservation. +``` +az reservations reservation split \ + --quantity-1 {quantity1} \ + --quantity-2 {quantity2} \ + --reservation-id {reservationId} \ + --reservation-order-id {orderId} +``` + +##### Updates the applied scopes of the reservation. +``` +az reservations reservation update --applied-scope-type {Shared, Single} \ + --reservation-id {reservationId} \ + --reservation-order-id {orderId} \ + [--applied-scopes] \ + [--instance-flexibility {Off, On}] \ +``` + +##### Calculate price for placing a reservation order. +``` +az reservations reservation-order calculate + --applied-scope-type {Shared, Single} \ + --billing-scope {billingScope} \ + --display-name {name} \ + --quantity {quantity} \ + --reserved-resource-type {AVS, AppService, AzureDataExplorer, AzureFiles, BlockBlob, CosmosDb, DataFactory, Databricks, DedicatedHost, ManagedDisk, MariaDb, MySql, NetAppStorage, PostgreSql, RedHat, RedHatOsa, RedisCache, SapHana, SqlAzureHybridBenefit, SqlDataWarehouse, SqlDatabases, SqlEdge, SuseLinux, VMwareCloudSimple, VirtualMachineSoftware, VirtualMachines} \ + --sku {skuName} \ + --term {P1Y, P3Y, P5Y} \ + [--applied-scope {scopeId}] \ + [--billing-plan {Monthly, Upfront}] \ + [--instance-flexibility {On, Off}] \ + [--location {location}] \ + [--renew {false, true}] +``` + +##### List of all the reservation orders that the user has access to in the current tenant. +``` +az reservations reservation list +``` + +##### Purchase reservation order and create resource under the specified URI. +``` +az reservations reservation-order purchase + --reservation-order-id {orderId} \ + --applied-scope-type {Shared, Single} \ + --billing-scope {billingScope} \ + --display-name {name} \ + --quantity {quantity} \ + --reserved-resource-type {AVS, AppService, AzureDataExplorer, AzureFiles, BlockBlob, CosmosDb, DataFactory, Databricks, DedicatedHost, ManagedDisk, MariaDb, MySql, NetAppStorage, PostgreSql, RedHat, RedHatOsa, RedisCache, SapHana, SqlAzureHybridBenefit, SqlDataWarehouse, SqlDatabases, SqlEdge, SuseLinux, VMwareCloudSimple, VirtualMachineSoftware, VirtualMachines} \ + --sku {skuName} \ + --term {P1Y, P3Y, P5Y} \ + [--applied-scope {scopeId}] \ + [--billing-plan {Monthly, Upfront}] \ + [--instance-flexibility {On, Off}] \ + [--location {location}] \ + [--renew {false, true}] +``` + +##### Get the details of the reservation order. +``` +az reservations reservation-order show --reservation-order-id {orderId} +``` + +##### Get applicable reservations that are applied to this subscription. +``` +az reservations reservation-order-id list --subscription-id {subId} +``` \ No newline at end of file diff --git a/src/reservation/azext_reservation/__init__.py b/src/reservation/azext_reservation/__init__.py new file mode 100644 index 00000000000..a2c8b8442aa --- /dev/null +++ b/src/reservation/azext_reservation/__init__.py @@ -0,0 +1,34 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader + +from azext_reservation._client_factory import reservation_mgmt_client_factory +from ._exception_handler import reservations_exception_handler + + +class ReservationsCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + from azure.cli.core.profiles import ResourceType + reservations_custom = CliCommandType(operations_tmpl='azext_reservation.custom#{}', + client_factory=reservation_mgmt_client_factory, + exception_handler=reservations_exception_handler) + super().__init__(cli_ctx=cli_ctx, + custom_command_type=reservations_custom, + resource_type=ResourceType.MGMT_RESERVATIONS) + + def load_command_table(self, args): + from azext_reservation.commands import load_command_table + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_reservation._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = ReservationsCommandsLoader diff --git a/src/reservation/azext_reservation/_client_factory.py b/src/reservation/azext_reservation/_client_factory.py new file mode 100644 index 00000000000..06d8d2bae18 --- /dev/null +++ b/src/reservation/azext_reservation/_client_factory.py @@ -0,0 +1,22 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +def cf_reservations(cli_ctx, **_): + from azure.cli.core.commands.client_factory import get_mgmt_service_client + from .vendored_sdks.reservations import AzureReservationAPI + return get_mgmt_service_client(cli_ctx, AzureReservationAPI, subscription_bound=False) + + +def reservation_mgmt_client_factory(cli_ctx, kwargs): + return cf_reservations(cli_ctx, **kwargs).reservation + + +def reservation_order_mgmt_client_factory(cli_ctx, kwargs): + return cf_reservations(cli_ctx, **kwargs).reservation_order + + +def base_mgmt_client_factory(cli_ctx, kwargs): + return cf_reservations(cli_ctx, **kwargs) diff --git a/src/reservation/azext_reservation/_exception_handler.py b/src/reservation/azext_reservation/_exception_handler.py new file mode 100644 index 00000000000..b86b34ed2e2 --- /dev/null +++ b/src/reservation/azext_reservation/_exception_handler.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core.util import CLIError + + +def reservations_exception_handler(ex): + from .vendored_sdks.reservations.models import Error + if isinstance(ex, Error): + message = ex.error.error.message + raise CLIError(message) + raise ex diff --git a/src/reservation/azext_reservation/_help.py b/src/reservation/azext_reservation/_help.py new file mode 100644 index 00000000000..74f306a6986 --- /dev/null +++ b/src/reservation/azext_reservation/_help.py @@ -0,0 +1,182 @@ +# coding=utf-8 +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.help_files import helps # pylint: disable=unused-import +# pylint: disable=line-too-long, too-many-lines + +helps['reservations'] = """ +type: group +short-summary: Manage Azure Reservations. +""" + +helps['reservations catalog'] = """ +type: group +short-summary: See catalog of available reservations +""" + +helps['reservations catalog show'] = """ +type: command +short-summary: Get catalog of available reservation. +long-summary: | + Get the regions and skus that are available for RI purchase for the specified Azure subscription. +parameters: + - name: --subscription-id + type: string + short-summary: Id of the subscription to get the catalog for + - name: --reserved-resource-type + type: string + short-summary: Type of the resource for which the skus should be provided. +""" + +helps['reservations reservation'] = """ +type: group +short-summary: Manage reservation entities +""" + +helps['reservations reservation list'] = """ +type: command +short-summary: Get all reservations. +long-summary: | + List all reservations within a reservation order. +parameters: + - name: --reservation-order-id + type: string + short-summary: Id of container reservation order +""" + +helps['reservations reservation list-history'] = """ +type: command +short-summary: Get history of a reservation. +parameters: + - name: --reservation-order-id + type: string + short-summary: Order id of the reservation + - name: --reservation-id + type: string + short-summary: Reservation id of the reservation +""" + +helps['reservations reservation merge'] = """ +type: command +short-summary: Merge two reservations. +parameters: + - name: --reservation-order-id + type: string + short-summary: Reservation order id of the reservations to merge + - name: --reservation-id-1 -1 + type: string + short-summary: Id of the first reservation to merge + - name: --reservation-id-2 -2 + type: string + short-summary: Id of the second reservation to merge +""" + +helps['reservations reservation show'] = """ +type: command +short-summary: Get details of a reservation. +parameters: + - name: --reservation-order-id + type: string + short-summary: Order id of reservation to look up + - name: --reservation-id + type: string + short-summary: Reservation id of reservation to look up +""" + +helps['reservations reservation split'] = """ +type: command +short-summary: Split a reservation. +parameters: + - name: --reservation-order-id + type: string + short-summary: Reservation order id of the reservation to split + - name: --reservation-id + type: string + short-summary: Reservation id of the reservation to split + - name: --quantity-1 -1 + type: int + short-summary: Quantity of the first reservation that will be created from split operation + - name: --quantity-2 -2 + type: int + short-summary: Quantity of the second reservation that will be created from split operation +""" + +helps['reservations reservation update'] = """ +type: command +short-summary: Updates the applied scopes of the reservation. +parameters: + - name: --reservation-order-id + type: string + short-summary: Reservation order id of the reservation to update + - name: --reservation-id + type: string + short-summary: Id of the reservation to update + - name: --applied-scope-type -t + type: string + short-summary: Type of the Applied Scope to update the reservation with + - name: --applied-scopes -s + type: string + short-summary: Subscription that the benefit will be applied. Do not specify if AppliedScopeType is Shared. + - name: --instance-flexibility -i + type: string + short-summary: Type of the Instance Flexibility to update the reservation with +""" + +helps['reservations reservation-order'] = """ +type: group +short-summary: Manage reservation order, which is container for reservations +""" + +helps['reservations reservation-order list'] = """ +type: command +short-summary: Get all reservation orders +long-summary: | + List of all the reservation orders that the user has access to in the current tenant. +""" + +helps['reservations reservation-order show'] = """ +type: command +short-summary: Get a specific reservation order. +long-summary: Get the details of the reservation order. +parameters: + - name: --reservation-order-id + type: string + short-summary: Id of reservation order to look up +""" + +helps['reservations reservation-order-id'] = """ +type: group +short-summary: See reservation order ids that are applied to subscription +""" + +helps['reservations reservation-order-id list'] = """ +type: command +short-summary: Get list of applicable reservation order ids. +long-summary: | + Get applicable reservations that are applied to this subscription. +parameters: + - name: --subscription-id + type: string + short-summary: Id of the subscription to look up applied reservations +""" + +helps['reservations reservation-order calculate'] = """ +type: command +short-summary: Calculate price for a reservation order. +long-summary: Calculate price for placing a reservation order. +examples: + - name: Calculate price and get quote for specific resource type. + text: az reservations reservation-order calculate --sku standard_b1ls --location westus --reserved-resource-type VirtualMachines --billing-scope {SubId} --term P1Y --billing-plan Upfront --quantity 1 --applied-scope-type Single --applied-scope SubId --display-name test +""" + +helps['reservations reservation-order purchase'] = """ +type: command +short-summary: Purchase reservation order +long-summary: Purchase reservation order and create resource under the specified URI. +examples: + - name: Purchase reservation order + text: az reservations reservation-order purchase --reservation-order-id {reservationOrderId} --sku standard_b1ls --location westus --reserved-resource-type VirtualMachines --billing-scope {SubId} --term P1Y --billing-plan Upfront --quantity 1 --applied-scope-type Single --applied-scope {SubId} --display-name test +""" diff --git a/src/reservation/azext_reservation/_params.py b/src/reservation/azext_reservation/_params.py new file mode 100644 index 00000000000..209e2b5952d --- /dev/null +++ b/src/reservation/azext_reservation/_params.py @@ -0,0 +1,108 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +# pylint: disable=line-too-long +# pylint: disable=too-many-statements + +from azure.cli.core.commands.parameters import (get_enum_type, get_three_state_flag) + +from .vendored_sdks.reservations.models import ( + ReservedResourceType, + InstanceFlexibility, + AppliedScopeType, + ReservationBillingPlan, + ReservationTerm +) + + +def load_arguments(self, _): + from knack.arguments import CLIArgumentType + + billing_scope_id_type = CLIArgumentType( + options_list=['--billing-scope'], + help='Subscription that will be charged for purchasing Reservation.') + sku_type = CLIArgumentType( + options_list=['--sku'], + help='Sku name, get the sku list by using command az reservations catalog show') + display_name_type = CLIArgumentType( + options_list=['--display-name'], + help='Friendly name for user to easily identified the reservation.') + term_type = CLIArgumentType( + options_list=['--term'], + help='Available reservation terms for this resource.', + arg_type=get_enum_type(ReservationTerm)) + renew_type = CLIArgumentType( + options_list=['--renew'], + help='Set this to true will automatically purchase a new reservation on the expiration date time.', + arg_type=get_three_state_flag()) + billing_plan_type = CLIArgumentType( + options_list=['--billing-plan'], + help='The billing plan options available for this SKU.', + arg_type=get_enum_type(ReservationBillingPlan)) + instance_flexibility_type = CLIArgumentType( + options_list=['--instance-flexibility'], + help='Type of the Instance Flexibility to update the reservation with.') + applied_scope_type_param_type = CLIArgumentType( + options_list=['--applied-scope-type'], + help='Type of the Applied Scope to update the reservation with', + arg_type=get_enum_type(AppliedScopeType)) + applied_scope_param_type = CLIArgumentType( + options_list=['--applied-scope'], + help='Subscription that the benefit will be applied. Required if --applied-scope-type is Single. Do not specify if --applied-scope-type is Shared.') + quantity_type = CLIArgumentType( + options_list=['--quantity'], + help='Quantity of product for calculating price or purchasing.' + ) + reservation_resource_type_param_type = CLIArgumentType( + options_list=['--reserved-resource-type'], + help='Type of the resource for which the skus should be provided.', + arg_type=get_enum_type(ReservedResourceType) + ) + + with self.argument_context('reservations reservation update') as c: + c.argument('applied_scope_type', options_list=['--applied-scope-type', '-t'], arg_type=get_enum_type(AppliedScopeType)) + c.argument('applied_scopes', options_list=['--applied-scopes', '-s']) + c.argument('instance_flexibility', options_list=['--instance-flexibility', '-i'], arg_type=get_enum_type(InstanceFlexibility)) + + with self.argument_context('reservations reservation split') as c: + c.argument('quantity_1', options_list=['--quantity-1', '-1']) + c.argument('quantity_2', options_list=['--quantity-2', '-2']) + + with self.argument_context('reservations reservation merge') as c: + c.argument('reservation_id_1', options_list=['--reservation-id-1', '-1']) + c.argument('reservation_id_2', options_list=['--reservation-id-2', '-2']) + + with self.argument_context('reservations catalog show') as c: + c.argument('reserved_resource_type', arg_type=get_enum_type(ReservedResourceType)) + + with self.argument_context('reservations reservation-order calculate') as c: + c.argument('billing_scope_id', billing_scope_id_type) + c.argument('instance_flexibility', instance_flexibility_type) + c.argument('renew', renew_type) + c.argument('reserved_resource_type', reservation_resource_type_param_type) + c.argument('applied_scope_type', applied_scope_type_param_type) + c.argument('billing_plan', billing_plan_type) + c.argument('term', term_type) + c.argument('display_name', display_name_type) + c.argument('sku', sku_type) + c.argument('applied_scope', applied_scope_param_type) + c.argument('quantity', quantity_type) + c.argument('location', options_list=['--location'], help='Values from: `az account list-locations`.') + + with self.argument_context('reservations reservation-order purchase') as c: + c.argument('reservation_order_id', help='Id of reservation order to purchase, generate by `az reservations reservation-order calculate`.') + c.argument('billing_scope_id', billing_scope_id_type) + c.argument('instance_flexibility', instance_flexibility_type) + c.argument('renew', renew_type) + c.argument('reserved_resource_type', reservation_resource_type_param_type) + c.argument('applied_scope_type', applied_scope_type_param_type) + c.argument('billing_plan', billing_plan_type) + c.argument('term', term_type) + c.argument('display_name', display_name_type) + c.argument('sku', sku_type) + c.argument('applied_scope', applied_scope_param_type) + c.argument('quantity', quantity_type) + c.argument('location', options_list=['--location'], help='Values from: `az account list-locations`.') diff --git a/src/reservation/azext_reservation/azext_metadata.json b/src/reservation/azext_reservation/azext_metadata.json new file mode 100644 index 00000000000..3695b0d7077 --- /dev/null +++ b/src/reservation/azext_reservation/azext_metadata.json @@ -0,0 +1,3 @@ +{ + "azext.minCliCoreVersion": "2.15.0" +} \ No newline at end of file diff --git a/src/reservation/azext_reservation/commands.py b/src/reservation/azext_reservation/commands.py new file mode 100644 index 00000000000..d298bcf16f7 --- /dev/null +++ b/src/reservation/azext_reservation/commands.py @@ -0,0 +1,54 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long + +from azure.cli.core.commands import CliCommandType +from ._client_factory import ( + reservation_mgmt_client_factory, reservation_order_mgmt_client_factory, base_mgmt_client_factory) +from ._exception_handler import reservations_exception_handler + + +def load_command_table(self, _): + def reservations_type(*args, **kwargs): + return CliCommandType(*args, exception_handler=reservations_exception_handler, **kwargs) + + reservations_order_sdk = reservations_type( + operations_tmpl='azext_reservation.vendored_sdks.reservations.operations._reservation_order_operations#ReservationOrderOperations.{}', + client_factory=reservation_order_mgmt_client_factory + ) + + reservations_sdk = reservations_type( + operations_tmpl='azext_reservation.vendored_sdks.reservations.operations._reservation_operations#ReservationOperations.{}', + client_factory=reservation_mgmt_client_factory + ) + + reservations_client_sdk = reservations_type( + operations_tmpl='azext_reservation.vendored_sdks.reservations.operations._azure_reservation_api_operations#AzureReservationAPIOperationsMixin.{}', + client_factory=base_mgmt_client_factory + ) + + with self.command_group('reservations reservation-order', reservations_order_sdk, client_factory=reservation_order_mgmt_client_factory) as g: + g.command('list', 'list') + g.show_command('show', 'get') + g.custom_command('calculate', 'cli_calculate') + g.custom_command('purchase', 'cli_purchase') + + with self.command_group('reservations reservation', reservations_sdk) as g: + g.command('list', 'list') + g.show_command('show', 'get') + g.command('list-history', 'list_revisions') + g.custom_command('update', 'cli_reservation_update_reservation') + g.custom_command('split', 'cli_reservation_split_reservation') + g.custom_command('merge', 'cli_reservation_merge_reservation') + + with self.command_group('reservations reservation-order-id', reservations_client_sdk) as g: + g.command('list', 'get_applied_reservation_list') + + with self.command_group('reservations catalog', reservations_client_sdk) as g: + g.show_command('show', 'get_catalog') + + with self.command_group('reservations', is_preview=True): + pass diff --git a/src/reservation/azext_reservation/custom.py b/src/reservation/azext_reservation/custom.py new file mode 100644 index 00000000000..a1743a9879a --- /dev/null +++ b/src/reservation/azext_reservation/custom.py @@ -0,0 +1,82 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from .vendored_sdks.reservations.models import (Patch, + PurchaseRequest, + SplitRequest, + MergeRequest, + SkuName, + PurchaseRequestPropertiesReservedResourceProperties) + + +def cli_reservation_update_reservation(client, reservation_order_id, reservation_id, + applied_scope_type, applied_scopes=None, + instance_flexibility=None): + if applied_scopes: + patch = Patch(applied_scope_type=applied_scope_type, + applied_scopes=[applied_scopes], + instance_flexibility=instance_flexibility) + else: + patch = Patch(applied_scope_type=applied_scope_type, + instance_flexibility=instance_flexibility) + return client.begin_update(reservation_order_id, reservation_id, patch) + + +def create_resource_id(reservation_order_id, reservation_id): + template = '/providers/Microsoft.Capacity/reservationOrders/{0}/reservations/{1}' + return template.format(reservation_order_id, reservation_id) + + +def cli_reservation_split_reservation(client, reservation_order_id, + reservation_id, quantity_1, quantity_2): + reservationToSplit = create_resource_id( + reservation_order_id, reservation_id) + body = SplitRequest( + quantities=[quantity_1, quantity_2], reservation_id=reservationToSplit) + return client.begin_split(reservation_order_id, body) + + +def cli_reservation_merge_reservation(client, reservation_order_id, + reservation_id_1, reservation_id_2): + body = MergeRequest(sources=[create_resource_id(reservation_order_id, reservation_id_1), + create_resource_id(reservation_order_id, reservation_id_2)]) + return client.begin_merge(reservation_order_id, body) + + +def cli_calculate(client, sku, reserved_resource_type, billing_scope_id, term, + quantity, applied_scope_type, display_name, applied_scope=None, + renew=False, instance_flexibility=None, location=None, billing_plan=None): + sku_name = SkuName(name=sku) + if applied_scope: + applied_scopes = [applied_scope] + else: + applied_scopes = None + properties = PurchaseRequestPropertiesReservedResourceProperties( + instance_flexibility=instance_flexibility) + body = PurchaseRequest(sku=sku_name, location=location, reserved_resource_type=reserved_resource_type, + billing_scope_id=billing_scope_id, term=term, quantity=quantity, + display_name=display_name, + applied_scope_type=applied_scope_type, + applied_scopes=applied_scopes, billing_plan=billing_plan, + renew=renew, reserved_resource_properties=properties) + return client.calculate(body) + + +def cli_purchase(client, reservation_order_id, sku, reserved_resource_type, billing_scope_id, term, + quantity, applied_scope_type, display_name, applied_scope=None, + renew=False, instance_flexibility=None, location=None, billing_plan=None): + sku_name = SkuName(name=sku) + if applied_scope: + applied_scopes = [applied_scope] + else: + applied_scopes = None + properties = PurchaseRequestPropertiesReservedResourceProperties( + instance_flexibility=instance_flexibility) + body = PurchaseRequest(sku=sku_name, location=location, reserved_resource_type=reserved_resource_type, + billing_scope_id=billing_scope_id, term=term, quantity=quantity, display_name=display_name, + applied_scope_type=applied_scope_type, applied_scopes=applied_scopes, + billing_plan=billing_plan, + renew=renew, reserved_resource_properties=properties) + return client.begin_purchase(reservation_order_id, body) diff --git a/src/reservation/azext_reservation/tests/__init__.py b/src/reservation/azext_reservation/tests/__init__.py new file mode 100644 index 00000000000..34913fb394d --- /dev/null +++ b/src/reservation/azext_reservation/tests/__init__.py @@ -0,0 +1,4 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- diff --git a/src/reservation/azext_reservation/tests/latest/__init__.py b/src/reservation/azext_reservation/tests/latest/__init__.py new file mode 100644 index 00000000000..34913fb394d --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/__init__.py @@ -0,0 +1,4 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- diff --git a/src/reservation/azext_reservation/tests/latest/recordings/test_calculate_reservation_order.yaml b/src/reservation/azext_reservation/tests/latest/recordings/test_calculate_reservation_order.yaml new file mode 100644 index 00000000000..a96d9b9aab2 --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/recordings/test_calculate_reservation_order.yaml @@ -0,0 +1,66 @@ +interactions: +- request: + body: '{"sku": {"name": "standard_b1ls"}, "location": "westus", "properties": + {"reservedResourceType": "VirtualMachines", "billingScopeId": "d3ae48e5-dbb2-4618-afd4-fb1b8559cb80", + "term": "P1Y", "billingPlan": "Monthly", "quantity": 2, "displayName": "test", + "appliedScopeType": "Shared", "renew": false, "reservedResourceProperties": + {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation-order calculate + Connection: + - keep-alive + Content-Length: + - '332' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --sku --location --reserved-resource-type --scope --term --billing-plan --display-name + --quantity --applied-scope-type + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/providers/Microsoft.Capacity/calculatePrice?api-version=2022-03-01 + response: + body: + string: '{"properties":{"billingCurrencyTotal":{"currencyCode":"USD","amount":63.84},"netTotal":0.0,"taxTotal":0.0,"grandTotal":0.0,"paymentSchedule":[{"dueDate":"2019-11-15","pricingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"billingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"status":"Scheduled"},{"dueDate":"2019-12-15","pricingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"status":"Scheduled"},{"dueDate":"2020-01-15","pricingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"status":"Scheduled"},{"dueDate":"2020-02-15","pricingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"status":"Scheduled"},{"dueDate":"2020-03-15","pricingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"status":"Scheduled"},{"dueDate":"2020-04-15","pricingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"status":"Scheduled"},{"dueDate":"2020-05-15","pricingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"status":"Scheduled"},{"dueDate":"2020-06-15","pricingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"status":"Scheduled"},{"dueDate":"2020-07-15","pricingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"status":"Scheduled"},{"dueDate":"2020-08-15","pricingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"status":"Scheduled"},{"dueDate":"2020-09-15","pricingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"status":"Scheduled"},{"dueDate":"2020-10-15","pricingCurrencyTotal":{"currencyCode":"USD","amount":5.32},"status":"Scheduled"}],"reservationOrderId":"d4ef7ec2-941c-4da7-8ec9-2f148255a0dc","skuTitle":"Reserved + VM Instance, Standard_B1ls, US West, 1 Year","skuDescription":"standard_b1ls","pricingCurrencyTotal":{"currencyCode":"USD","amount":63.84}}}' + headers: + cache-control: + - no-cache + content-length: + - '1696' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-tenant-writes: + - '1199' + x-ms-test: + - '{"contact":"kgautam","scenarios":"v6-recurrence-test,time-scale:35040,AcceleratedPayment","retention":"2/13/2020 + 5:04:30 AM"}' + status: + code: 200 + message: OK +version: 1 diff --git a/src/reservation/azext_reservation/tests/latest/recordings/test_get_applied_reservation_order_ids.yaml b/src/reservation/azext_reservation/tests/latest/recordings/test_get_applied_reservation_order_ids.yaml new file mode 100644 index 00000000000..a6eedc65481 --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/recordings/test_get_applied_reservation_order_ids.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation-order-id list + Connection: + - keep-alive + ParameterSetName: + - --subscription-id + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Capacity/appliedReservations?api-version=2022-03-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.capacity/AppliedReservations/default","type":"Microsoft.Capacity/AppliedReservations","name":"default","properties":{"reservationOrderIds":{"value":["/providers/Microsoft.Capacity/reservationorders/5f47bc68-c4dc-465c-8ccf-59a60155821e","/providers/Microsoft.Capacity/reservationorders/1ce5c506-dc1a-4529-9e8a-ce71a3fce011","/providers/Microsoft.Capacity/reservationorders/5097858c-9ee1-4e1f-9115-e778bc9f07f8","/providers/Microsoft.Capacity/reservationorders/f83755e0-cbcc-4dd6-a381-cd1022e9374f","/providers/Microsoft.Capacity/reservationorders/2c777d7f-2b8f-4249-ac3e-b704bfc9646b","/providers/Microsoft.Capacity/reservationorders/ddc21f31-8ec3-4ecb-a6db-d9c4fa0f1d4d","/providers/Microsoft.Capacity/reservationorders/97460b12-886c-4388-ac53-43740663802b","/providers/Microsoft.Capacity/reservationorders/13c2133e-9d20-4908-8def-965b521bf9b7","/providers/Microsoft.Capacity/reservationorders/451d0d8f-6aff-4b52-a4c8-44d10a4e8b9a","/providers/Microsoft.Capacity/reservationorders/e742d109-1e57-4054-b9d3-dd18548a0256","/providers/Microsoft.Capacity/reservationorders/84586bd7-adae-4f62-b87f-b5a36c219d44","/providers/Microsoft.Capacity/reservationorders/5af652ab-8a38-4821-a88d-9f552037fd86","/providers/Microsoft.Capacity/reservationorders/37fdc3cd-7016-4711-9bb9-c8976367197a","/providers/Microsoft.Capacity/reservationorders/1933daea-fa47-4883-b228-ebdcc345a9d1","/providers/Microsoft.Capacity/reservationorders/f311bbb7-9010-4327-a4cb-81efc96850e0","/providers/Microsoft.Capacity/reservationorders/d983fd17-f9d5-4990-8a28-067d9368c5fd","/providers/Microsoft.Capacity/reservationorders/0107376d-9008-461d-bf44-e0ae83716cf5","/providers/Microsoft.Capacity/reservationorders/6dbddcad-2aa5-4305-8429-4a0c6f31b869","/providers/Microsoft.Capacity/reservationorders/9066e49b-f7a6-4a57-95e3-47cdcb039d7e","/providers/Microsoft.Capacity/reservationorders/4159f0e3-8031-4634-a68f-5b51c3dc6050","/providers/Microsoft.Capacity/reservationorders/7440222d-d419-4fe5-b05b-371b02a0bb9b","/providers/Microsoft.Capacity/reservationorders/f1c36fc4-8b11-4125-a90c-548ad1a45d0b","/providers/Microsoft.Capacity/reservationorders/5d9b905b-fffc-45b5-b4d3-6d7517d931b4","/providers/Microsoft.Capacity/reservationorders/13c73cbd-12de-4c14-8550-ed34b10a32e1","/providers/Microsoft.Capacity/reservationorders/9cd45f08-e1b3-43d1-a82d-27ecb595d05c","/providers/Microsoft.Capacity/reservationorders/39c34e3b-5c05-466d-a421-94577296af06","/providers/Microsoft.Capacity/reservationorders/fdef0d1f-2d3c-402e-9feb-80019f5ae145","/providers/Microsoft.Capacity/reservationorders/c9eff5a5-69ec-4017-aec7-cccee1ec945c","/providers/Microsoft.Capacity/reservationorders/c39c8099-79d1-430f-bc57-23616364ff2a","/providers/Microsoft.Capacity/reservationorders/09895b41-b30c-4c33-8132-18afa2ed5c80","/providers/Microsoft.Capacity/reservationorders/49b5fcb8-a2aa-410c-8552-29592dd7a516","/providers/Microsoft.Capacity/reservationorders/f511a846-907c-486e-b870-a6be48e050a4","/providers/Microsoft.Capacity/reservationorders/d645bf91-149b-46e2-b331-38fa66595842","/providers/Microsoft.Capacity/reservationorders/eae108d9-a71c-47e2-9bc8-7902663db5f1","/providers/Microsoft.Capacity/reservationorders/cfc4c7a8-8d39-45f8-b37b-ee7f6502a366","/providers/Microsoft.Capacity/reservationorders/9a48675e-e8b8-423e-9dea-bf37034b8201","/providers/Microsoft.Capacity/reservationorders/6cabdb81-d202-4450-834d-68a18bd52533","/providers/Microsoft.Capacity/reservationorders/d828b714-cf82-459a-97b7-079747fd772c","/providers/Microsoft.Capacity/reservationorders/fe1341ea-4820-4ac9-9352-4136a6d8a252","/providers/Microsoft.Capacity/reservationorders/f794f893-e8bf-40d5-9e65-9c8dc6b5f01d","/providers/Microsoft.Capacity/reservationorders/c01a66ab-5306-44f5-aa7b-ed7b45d92bf9","/providers/Microsoft.Capacity/reservationorders/ba84276f-2f1b-40d1-b007-5610d4e6d1ac","/providers/Microsoft.Capacity/reservationorders/ff3d6f81-2bea-4d59-b205-85e9effd8c1a","/providers/Microsoft.Capacity/reservationorders/5a8109f2-0b2f-49f3-9b2c-2db32934b5c3","/providers/Microsoft.Capacity/reservationorders/7ec328e0-0312-4d3c-841b-b5e4d032a43c","/providers/Microsoft.Capacity/reservationorders/1d8785bf-0817-4bf5-b7aa-5b2684bc98ee","/providers/Microsoft.Capacity/reservationorders/bb1ee7ab-4e31-4124-8aa0-a17d0f3bead7","/providers/Microsoft.Capacity/reservationorders/1c0b97a3-3a73-4ce7-8abd-d4f260934109","/providers/Microsoft.Capacity/reservationorders/11e0f3cb-d8d2-42d4-8b24-b460cab90b67","/providers/Microsoft.Capacity/reservationorders/8311a3fe-d6c2-45ac-ac10-e8d3763118b6","/providers/Microsoft.Capacity/reservationorders/36ff776c-c4e7-44f0-bd82-82dad39f02c1","/providers/Microsoft.Capacity/reservationorders/0a47417c-cd30-4f67-add6-d631583e09f3","/providers/Microsoft.Capacity/reservationorders/0dc0d697-97d8-4546-87eb-7ae8a84c286c","/providers/Microsoft.Capacity/reservationorders/154ed3db-262c-40e5-baa3-a0505b6cdfdd","/providers/Microsoft.Capacity/reservationorders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d","/providers/Microsoft.Capacity/reservationorders/f0400cad-33cf-4867-a9c3-0ef6b558d163","/providers/Microsoft.Capacity/reservationorders/0af601f3-7868-44ee-b833-4d2e64ad3d70","/providers/Microsoft.Capacity/reservationorders/a27a814f-62e2-4049-afce-fd882f202ab4"]}}}' + headers: + cache-control: + - no-cache + content-length: + - '5277' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/reservation/azext_reservation/tests/latest/recordings/test_get_catalog.yaml b/src/reservation/azext_reservation/tests/latest/recordings/test_get_catalog.yaml new file mode 100644 index 00000000000..3de874ba394 --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/recordings/test_get_catalog.yaml @@ -0,0 +1,508 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations catalog show + Connection: + - keep-alive + ParameterSetName: + - --subscription-id --reserved-resource-type --location + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Capacity/catalogs?api-version=2022-03-01&reservedResourceType=VirtualMachines&location=westus + response: + body: + string: '[{"resourceType":"virtualMachines","name":"Standard_NV48s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"48"},{"name":"RAM","value":"448"},{"name":"ReservationsAutofitGroup","value":"NVSv3 + Series"},{"name":"vCpu","value":"48"},{"name":"ReservationsAutofitRatio","value":"48"},{"name":"ProductShortName","value":"NVSv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines NVSv3 Series"},{"name":"SkuName","value":"NV48s + v3"},{"name":"MeterId","value":"217b7041-a883-4d33-8997-a4b50298ba64"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"NV48s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_NV24s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"24"},{"name":"RAM","value":"224"},{"name":"ReservationsAutofitGroup","value":"NVSv3 + Series"},{"name":"vCpu","value":"24"},{"name":"ReservationsAutofitRatio","value":"24"},{"name":"ProductShortName","value":"NVSv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines NVSv3 Series"},{"name":"SkuName","value":"NV24s + v3"},{"name":"MeterId","value":"d7007c78-917c-438e-b811-713f9a49d0c1"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"NV24s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_NV12s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"12"},{"name":"RAM","value":"112"},{"name":"ReservationsAutofitGroup","value":"NVSv3 + Series"},{"name":"vCpu","value":"12"},{"name":"ReservationsAutofitRatio","value":"12"},{"name":"ProductShortName","value":"NVSv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines NVSv3 Series"},{"name":"SkuName","value":"NV12s + v3"},{"name":"MeterId","value":"481af8f7-4f2b-4cec-bbbe-8659489ca763"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"NV12s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_H16mr","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"224"},{"name":"ReservationsAutofitGroup","value":"H + Series High Memory Low Latency"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"H + Series VM"},{"name":"ProductTitle","value":"Virtual Machines H Series"},{"name":"SkuName","value":"H16mr"},{"name":"MeterId","value":"05e50686-36c1-41ea-8537-75d4da79067c"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"H16mr"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_H16r","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"112"},{"name":"ReservationsAutofitGroup","value":"H + Series Low Latency"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"H + Series VM"},{"name":"ProductTitle","value":"Virtual Machines H Series"},{"name":"SkuName","value":"H16r"},{"name":"MeterId","value":"7ef144e8-61b2-4575-bed9-aa1f153f9bdf"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"H16r"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_H16m","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"224"},{"name":"ReservationsAutofitGroup","value":"H + Series High Memory"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"H + Series VM"},{"name":"ProductTitle","value":"Virtual Machines H Series"},{"name":"SkuName","value":"H16m"},{"name":"MeterId","value":"a3d2bf71-0a63-4b93-90a3-8e2acd001363"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"H16m"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_H8m","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"112"},{"name":"ReservationsAutofitGroup","value":"H + Series High Memory"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"H + Series VM"},{"name":"ProductTitle","value":"Virtual Machines H Series"},{"name":"SkuName","value":"H8m"},{"name":"MeterId","value":"50cd4076-72de-4f42-a240-63d75f45df02"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"H8m"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_H16","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"112"},{"name":"ReservationsAutofitGroup","value":"H + Series"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"H + Series VM"},{"name":"ProductTitle","value":"Virtual Machines H Series"},{"name":"SkuName","value":"H16"},{"name":"MeterId","value":"28bd4017-f91c-4023-a580-2279ec2b7f5a"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"H16"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_H8","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"56"},{"name":"ReservationsAutofitGroup","value":"H + Series"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"H + Series VM"},{"name":"ProductTitle","value":"Virtual Machines H Series"},{"name":"SkuName","value":"H8"},{"name":"MeterId","value":"2bbe2140-2764-45af-ba6a-7c34824b6182"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"H8"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F72s_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"72"},{"name":"RAM","value":"144"},{"name":"ReservationsAutofitGroup","value":"FSv2 + Series"},{"name":"vCpu","value":"72"},{"name":"ReservationsAutofitRatio","value":"72"},{"name":"ProductShortName","value":"FSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FSv2 Series"},{"name":"SkuName","value":"F72s + v2"},{"name":"MeterId","value":"d7fdf0cb-d0c4-430c-95b8-e464d502a836"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F72s v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F64s_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"64"},{"name":"RAM","value":"128"},{"name":"ReservationsAutofitGroup","value":"FSv2 + Series"},{"name":"vCpu","value":"64"},{"name":"ReservationsAutofitRatio","value":"64"},{"name":"ProductShortName","value":"FSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FSv2 Series"},{"name":"SkuName","value":"F64s + v2"},{"name":"MeterId","value":"032c4cf0-b3f6-4c19-98a0-185786ab5217"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F64s v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F48s_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"48"},{"name":"RAM","value":"96"},{"name":"ReservationsAutofitGroup","value":"FSv2 + Series"},{"name":"vCpu","value":"48"},{"name":"ReservationsAutofitRatio","value":"48"},{"name":"ProductShortName","value":"FSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FSv2 Series"},{"name":"SkuName","value":"F48s + v2"},{"name":"MeterId","value":"4b0c3813-a14f-4278-9b3d-871a22e588b2"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F48s v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F32s_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"32"},{"name":"RAM","value":"64"},{"name":"ReservationsAutofitGroup","value":"FSv2 + Series"},{"name":"vCpu","value":"32"},{"name":"ReservationsAutofitRatio","value":"32"},{"name":"ProductShortName","value":"FSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FSv2 Series"},{"name":"SkuName","value":"F32s + v2"},{"name":"MeterId","value":"d02d2391-d8a1-43dd-b043-219756f7c729"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F32s v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F16s_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"32"},{"name":"ReservationsAutofitGroup","value":"FSv2 + Series"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"FSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FSv2 Series"},{"name":"SkuName","value":"F16s + v2"},{"name":"MeterId","value":"cc823cbc-bf60-434d-8aee-a328ecd64154"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F16s v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F8s_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"16"},{"name":"ReservationsAutofitGroup","value":"FSv2 + Series"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"FSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FSv2 Series"},{"name":"SkuName","value":"F8s + v2"},{"name":"MeterId","value":"54ec9ffb-359b-4f84-8ce5-c42afad5b38a"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F8s v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F4s_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"8"},{"name":"ReservationsAutofitGroup","value":"FSv2 + Series"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"FSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FSv2 Series"},{"name":"SkuName","value":"F4s + v2"},{"name":"MeterId","value":"9ac21a95-e778-4df4-92cf-8aa6bbaf0761"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F4s v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F2s_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"4"},{"name":"ReservationsAutofitGroup","value":"FSv2 + Series"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"FSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FSv2 Series"},{"name":"SkuName","value":"F2s + v2"},{"name":"MeterId","value":"fff22ffa-d308-4939-ae75-40679826f5ca"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F2s v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_L32s","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"32"},{"name":"RAM","value":"256"},{"name":"ReservationsAutofitGroup","value":"LS + Series"},{"name":"vCpu","value":"32"},{"name":"ReservationsAutofitRatio","value":"32"},{"name":"ProductShortName","value":"LS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines LS Series"},{"name":"SkuName","value":"L32s"},{"name":"MeterId","value":"4f743466-7a76-422d-976b-20f2560408c8"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"L32s"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_L16s","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"128"},{"name":"ReservationsAutofitGroup","value":"LS + Series"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"LS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines LS Series"},{"name":"SkuName","value":"L16s"},{"name":"MeterId","value":"17a7522f-1e03-4a46-8400-53066aad0cfc"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"L16s"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_L8s","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"64"},{"name":"ReservationsAutofitGroup","value":"LS + Series"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"LS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines LS Series"},{"name":"SkuName","value":"L8s"},{"name":"MeterId","value":"54c40026-ffc2-4da4-888d-481a0ef44704"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"L8s"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_L4s","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"32"},{"name":"ReservationsAutofitGroup","value":"LS + Series"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"LS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines LS Series"},{"name":"SkuName","value":"L4s"},{"name":"MeterId","value":"2478ad4d-37cf-400e-a3d2-857871312862"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"L4s"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS14","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"112"},{"name":"ReservationsAutofitGroup","value":"DS + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D14"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"DS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DS Series"},{"name":"SkuName","value":"DS14"},{"name":"MeterId","value":"c08f7d89-a982-4b80-bfe9-40ccb9e6ee6c"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS14"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS13","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"56"},{"name":"ReservationsAutofitGroup","value":"DS + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D13"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"DS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DS Series"},{"name":"SkuName","value":"DS13"},{"name":"MeterId","value":"f3e734c0-bd1a-46cc-bcb2-8b25fb6464ed"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS13"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS12","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"28"},{"name":"ReservationsAutofitGroup","value":"DS + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D12"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"DS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DS Series"},{"name":"SkuName","value":"DS12"},{"name":"MeterId","value":"4801f383-ed00-4597-a879-da967f7739f3"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS12"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS11","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"14"},{"name":"ReservationsAutofitGroup","value":"DS + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D11"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"DS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DS Series"},{"name":"SkuName","value":"DS11"},{"name":"MeterId","value":"88dfea34-b63f-460b-82cc-22750f689c86"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS11"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS4","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"28"},{"name":"ReservationsAutofitGroup","value":"DS + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D4"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"DS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DS Series"},{"name":"SkuName","value":"DS4"},{"name":"MeterId","value":"8d998c26-3749-4d5c-bc7e-cbd9e15b91d7"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS4"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"14"},{"name":"ReservationsAutofitGroup","value":"DS + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D3"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"DS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DS Series"},{"name":"SkuName","value":"DS3"},{"name":"MeterId","value":"cd4dde62-93d3-4c88-a041-7b392216c326"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"7"},{"name":"ReservationsAutofitGroup","value":"DS + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D2"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"DS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DS Series"},{"name":"SkuName","value":"DS2"},{"name":"MeterId","value":"709fb951-cbf8-425e-9baa-cf504880d6b5"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS1","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"1"},{"name":"RAM","value":"3.5"},{"name":"ReservationsAutofitGroup","value":"DS + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D1"},{"name":"vCpu","value":"1"},{"name":"ReservationsAutofitRatio","value":"1"},{"name":"ProductShortName","value":"DS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DS Series"},{"name":"SkuName","value":"DS1"},{"name":"MeterId","value":"9a721778-24e6-40c4-a4e5-02014fd8f6ee"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS1"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D14","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"112"},{"name":"ReservationsAutofitGroup","value":"D + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS14"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"D + Series VM"},{"name":"ProductTitle","value":"Virtual Machines D Series"},{"name":"SkuName","value":"D14"},{"name":"MeterId","value":"c08f7d89-a982-4b80-bfe9-40ccb9e6ee6c"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D14"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D13","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"56"},{"name":"ReservationsAutofitGroup","value":"D + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS13"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"D + Series VM"},{"name":"ProductTitle","value":"Virtual Machines D Series"},{"name":"SkuName","value":"D13"},{"name":"MeterId","value":"f3e734c0-bd1a-46cc-bcb2-8b25fb6464ed"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D13"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D12","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"28"},{"name":"ReservationsAutofitGroup","value":"D + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS12"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"D + Series VM"},{"name":"ProductTitle","value":"Virtual Machines D Series"},{"name":"SkuName","value":"D12"},{"name":"MeterId","value":"4801f383-ed00-4597-a879-da967f7739f3"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D12"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D11","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"14"},{"name":"ReservationsAutofitGroup","value":"D + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS11"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"D + Series VM"},{"name":"ProductTitle","value":"Virtual Machines D Series"},{"name":"SkuName","value":"D11"},{"name":"MeterId","value":"88dfea34-b63f-460b-82cc-22750f689c86"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D11"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D4","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"28"},{"name":"ReservationsAutofitGroup","value":"D + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS4"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"D + Series VM"},{"name":"ProductTitle","value":"Virtual Machines D Series"},{"name":"SkuName","value":"D4"},{"name":"MeterId","value":"8d998c26-3749-4d5c-bc7e-cbd9e15b91d7"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D4"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"14"},{"name":"ReservationsAutofitGroup","value":"D + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS3"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"D + Series VM"},{"name":"ProductTitle","value":"Virtual Machines D Series"},{"name":"SkuName","value":"D3"},{"name":"MeterId","value":"cd4dde62-93d3-4c88-a041-7b392216c326"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"7"},{"name":"ReservationsAutofitGroup","value":"D + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS2"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"D + Series VM"},{"name":"ProductTitle","value":"Virtual Machines D Series"},{"name":"SkuName","value":"D2"},{"name":"MeterId","value":"709fb951-cbf8-425e-9baa-cf504880d6b5"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D1","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"1"},{"name":"RAM","value":"3.5"},{"name":"ReservationsAutofitGroup","value":"D + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS1"},{"name":"vCpu","value":"1"},{"name":"ReservationsAutofitRatio","value":"1"},{"name":"ProductShortName","value":"D + Series VM"},{"name":"ProductTitle","value":"Virtual Machines D Series"},{"name":"SkuName","value":"D1"},{"name":"MeterId","value":"9a721778-24e6-40c4-a4e5-02014fd8f6ee"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D1"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E64s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"64"},{"name":"RAM","value":"432"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E64_v3"},{"name":"vCpu","value":"64"},{"name":"ReservationsAutofitRatio","value":"57.6"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E64s + v3"},{"name":"MeterId","value":"1095124b-d751-4c82-9938-2f64013a9b9e"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E64s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E64is_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"64"},{"name":"RAM","value":"432"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series Isolated"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E64i_v3"},{"name":"vCpu","value":"64"},{"name":"ReservationsAutofitRatio","value":"64"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E64is + v3"},{"name":"MeterId","value":"5ccec6c7-43ce-4c73-8000-6cf901125fe1"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E64is v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E64-32s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"32"},{"name":"RAM","value":"432"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E64_v3"},{"name":"vCpu","value":"32"},{"name":"ReservationsAutofitRatio","value":"57.6"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E64-32s + v3"},{"name":"MeterId","value":"1095124b-d751-4c82-9938-2f64013a9b9e"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E64-32s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E64-16s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"432"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E64_v3"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"57.6"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E64-16s + v3"},{"name":"MeterId","value":"1095124b-d751-4c82-9938-2f64013a9b9e"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E64-16s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E48s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"48"},{"name":"RAM","value":"384"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"vCpu","value":"48"},{"name":"ReservationsAutofitRatio","value":"48"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E48s + v3"},{"name":"MeterId","value":"d0c3ea4a-5fa4-4916-87bd-f270a7bc0457"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E48s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E32s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"32"},{"name":"RAM","value":"256"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E32_v3"},{"name":"vCpu","value":"32"},{"name":"ReservationsAutofitRatio","value":"32"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E32s + v3"},{"name":"MeterId","value":"a58852c7-34c8-41f7-a2fc-c87be1447f7c"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E32s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E32-16s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"256"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E32_v3"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"32"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E32-16s + v3"},{"name":"MeterId","value":"a58852c7-34c8-41f7-a2fc-c87be1447f7c"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E32-16s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E32-8s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"256"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E32_v3"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"32"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E32-8s + v3"},{"name":"MeterId","value":"a58852c7-34c8-41f7-a2fc-c87be1447f7c"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E32-8s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E20s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"20"},{"name":"RAM","value":"160"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E20_v3"},{"name":"vCpu","value":"20"},{"name":"ReservationsAutofitRatio","value":"20"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E20s + v3"},{"name":"MeterId","value":"9bc28a02-f556-498a-a4fd-47ff0741fae5"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E20s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E16s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"128"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E16_v3"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E16s + v3"},{"name":"MeterId","value":"73f4f834-6b9b-463e-8a1c-1ff38555063d"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E16s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E16-8s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"128"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E16_v3"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E16-8s + v3"},{"name":"MeterId","value":"73f4f834-6b9b-463e-8a1c-1ff38555063d"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E16-8s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E16-4s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"128"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E16_v3"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E16-4s + v3"},{"name":"MeterId","value":"73f4f834-6b9b-463e-8a1c-1ff38555063d"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E16-4s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E8s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"64"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E8_v3"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E8s + v3"},{"name":"MeterId","value":"cc078ca0-87b0-462e-be7e-bbe3c1df0ed2"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E8s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E8-4s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"64"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E8_v3"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E8-4s + v3"},{"name":"MeterId","value":"cc078ca0-87b0-462e-be7e-bbe3c1df0ed2"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E8-4s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E8-2s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"64"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E8_v3"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E8-2s + v3"},{"name":"MeterId","value":"cc078ca0-87b0-462e-be7e-bbe3c1df0ed2"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E8-2s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E4s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"32"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E4_v3"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E4s + v3"},{"name":"MeterId","value":"ad8bf6ff-c2f5-4861-84f9-c5d3101058aa"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E4s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E4-2s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"32"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E4_v3"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E4-2s + v3"},{"name":"MeterId","value":"ad8bf6ff-c2f5-4861-84f9-c5d3101058aa"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E4-2s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E2s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"16"},{"name":"ReservationsAutofitGroup","value":"ESv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E2_v3"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"ESv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines ESv3 Series"},{"name":"SkuName","value":"E2s + v3"},{"name":"MeterId","value":"65822779-1430-4a44-a6c1-ebc7c2aef10a"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E2s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E64_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"64"},{"name":"RAM","value":"432"},{"name":"ReservationsAutofitGroup","value":"Ev3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E64s_v3"},{"name":"vCpu","value":"64"},{"name":"ReservationsAutofitRatio","value":"57.6"},{"name":"ProductShortName","value":"Ev3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Ev3 Series"},{"name":"SkuName","value":"E64 + v3"},{"name":"MeterId","value":"1095124b-d751-4c82-9938-2f64013a9b9e"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E64 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E64i_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"64"},{"name":"RAM","value":"432"},{"name":"ReservationsAutofitGroup","value":"Ev3 + Series Isolated"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E64is_v3"},{"name":"vCpu","value":"64"},{"name":"ReservationsAutofitRatio","value":"64"},{"name":"ProductShortName","value":"Ev3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Ev3 Series"},{"name":"SkuName","value":"E64i + v3"},{"name":"MeterId","value":"5ccec6c7-43ce-4c73-8000-6cf901125fe1"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E64i v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E48_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"48"},{"name":"RAM","value":"384"},{"name":"ReservationsAutofitGroup","value":"Ev3 + Series"},{"name":"vCpu","value":"48"},{"name":"ReservationsAutofitRatio","value":"48"},{"name":"ProductShortName","value":"Ev3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Ev3 Series"},{"name":"SkuName","value":"E48 + v3"},{"name":"MeterId","value":"d0c3ea4a-5fa4-4916-87bd-f270a7bc0457"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E48 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E32_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"32"},{"name":"RAM","value":"256"},{"name":"ReservationsAutofitGroup","value":"Ev3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E32s_v3"},{"name":"vCpu","value":"32"},{"name":"ReservationsAutofitRatio","value":"32"},{"name":"ProductShortName","value":"Ev3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Ev3 Series"},{"name":"SkuName","value":"E32 + v3"},{"name":"MeterId","value":"a58852c7-34c8-41f7-a2fc-c87be1447f7c"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E32 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E20_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"20"},{"name":"RAM","value":"160"},{"name":"ReservationsAutofitGroup","value":"Ev3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E20s_v3"},{"name":"vCpu","value":"20"},{"name":"ReservationsAutofitRatio","value":"20"},{"name":"ProductShortName","value":"Ev3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Ev3 Series"},{"name":"SkuName","value":"E20 + v3"},{"name":"MeterId","value":"9bc28a02-f556-498a-a4fd-47ff0741fae5"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E20 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E16_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"128"},{"name":"ReservationsAutofitGroup","value":"Ev3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E16s_v3"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"Ev3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Ev3 Series"},{"name":"SkuName","value":"E16 + v3"},{"name":"MeterId","value":"73f4f834-6b9b-463e-8a1c-1ff38555063d"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E16 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E8_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"64"},{"name":"ReservationsAutofitGroup","value":"Ev3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E8s_v3"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"Ev3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Ev3 Series"},{"name":"SkuName","value":"E8 + v3"},{"name":"MeterId","value":"cc078ca0-87b0-462e-be7e-bbe3c1df0ed2"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E8 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E4_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"32"},{"name":"ReservationsAutofitGroup","value":"Ev3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E4s_v3"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"Ev3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Ev3 Series"},{"name":"SkuName","value":"E4 + v3"},{"name":"MeterId","value":"ad8bf6ff-c2f5-4861-84f9-c5d3101058aa"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E4 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_E2_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"16"},{"name":"ReservationsAutofitGroup","value":"Ev3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_E2s_v3"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"Ev3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Ev3 Series"},{"name":"SkuName","value":"E2 + v3"},{"name":"MeterId","value":"65822779-1430-4a44-a6c1-ebc7c2aef10a"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"E2 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D64s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"64"},{"name":"RAM","value":"256"},{"name":"ReservationsAutofitGroup","value":"DSv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D64_v3"},{"name":"vCpu","value":"64"},{"name":"ReservationsAutofitRatio","value":"64"},{"name":"ProductShortName","value":"DSv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv3 Series"},{"name":"SkuName","value":"D64s + v3"},{"name":"MeterId","value":"775c4b10-16d1-4b6e-9632-c412bf54c42e"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D64s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D48s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"48"},{"name":"RAM","value":"192"},{"name":"ReservationsAutofitGroup","value":"DSv3 + Series"},{"name":"vCpu","value":"48"},{"name":"ReservationsAutofitRatio","value":"48"},{"name":"ProductShortName","value":"DSv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv3 Series"},{"name":"SkuName","value":"D48s + v3"},{"name":"MeterId","value":"d7143c18-b365-4347-9eb5-6f6d55ab5145"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D48s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D64_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"64"},{"name":"RAM","value":"256"},{"name":"ReservationsAutofitGroup","value":"Dv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D64s_v3"},{"name":"vCpu","value":"64"},{"name":"ReservationsAutofitRatio","value":"64"},{"name":"ProductShortName","value":"Dv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv3 Series"},{"name":"SkuName","value":"D64 + v3"},{"name":"MeterId","value":"775c4b10-16d1-4b6e-9632-c412bf54c42e"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D64 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D48_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"48"},{"name":"RAM","value":"192"},{"name":"ReservationsAutofitGroup","value":"Dv3 + Series"},{"name":"vCpu","value":"48"},{"name":"ReservationsAutofitRatio","value":"48"},{"name":"ProductShortName","value":"Dv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv3 Series"},{"name":"SkuName","value":"D48 + v3"},{"name":"MeterId","value":"d7143c18-b365-4347-9eb5-6f6d55ab5145"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D48 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D32_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"32"},{"name":"RAM","value":"128"},{"name":"ReservationsAutofitGroup","value":"Dv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D32s_v3"},{"name":"vCpu","value":"32"},{"name":"ReservationsAutofitRatio","value":"32"},{"name":"ProductShortName","value":"Dv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv3 Series"},{"name":"SkuName","value":"D32 + v3"},{"name":"MeterId","value":"329a1fce-a987-4d0e-96bb-c9d6ede6a2d1"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D32 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D16_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"64"},{"name":"ReservationsAutofitGroup","value":"Dv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D16s_v3"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"Dv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv3 Series"},{"name":"SkuName","value":"D16 + v3"},{"name":"MeterId","value":"878ae2c5-f13d-4c83-9af2-7b333b1c9fa1"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D16 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D8_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"32"},{"name":"ReservationsAutofitGroup","value":"Dv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D8s_v3"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"Dv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv3 Series"},{"name":"SkuName","value":"D8 + v3"},{"name":"MeterId","value":"f128c5c9-ea87-473a-9672-6cf1fb3b8b98"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D8 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D4_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"16"},{"name":"ReservationsAutofitGroup","value":"Dv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D4s_v3"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"Dv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv3 Series"},{"name":"SkuName","value":"D4 + v3"},{"name":"MeterId","value":"8462aa11-a392-4ae4-87cf-2dbabe31d487"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D4 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D2_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"8"},{"name":"ReservationsAutofitGroup","value":"Dv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D2s_v3"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"Dv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv3 Series"},{"name":"SkuName","value":"D2 + v3"},{"name":"MeterId","value":"23d721f3-3f2c-440f-98d8-08a3f30a80ba"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D2 v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F16","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"32"},{"name":"ReservationsAutofitGroup","value":"F + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_F16s"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"F + Series VM"},{"name":"ProductTitle","value":"Virtual Machines F Series"},{"name":"SkuName","value":"F16"},{"name":"MeterId","value":"f5c756b2-15b2-46cd-97b9-df8953afedd1"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F16"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F8","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"16"},{"name":"ReservationsAutofitGroup","value":"F + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_F8s"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"F + Series VM"},{"name":"ProductTitle","value":"Virtual Machines F Series"},{"name":"SkuName","value":"F8"},{"name":"MeterId","value":"d963fcb5-ca86-46dd-ac1a-95a52ab154b6"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F8"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F4","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"8"},{"name":"ReservationsAutofitGroup","value":"F + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_F4s"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"F + Series VM"},{"name":"ProductTitle","value":"Virtual Machines F Series"},{"name":"SkuName","value":"F4"},{"name":"MeterId","value":"1d0eaa49-0140-4f00-8b6d-2aacfd087e78"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F4"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"4"},{"name":"ReservationsAutofitGroup","value":"F + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_F2s"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"F + Series VM"},{"name":"ProductTitle","value":"Virtual Machines F Series"},{"name":"SkuName","value":"F2"},{"name":"MeterId","value":"efdb48e1-6e65-4d8a-ba65-f7b6a04d05ee"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F1","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"1"},{"name":"RAM","value":"2"},{"name":"ReservationsAutofitGroup","value":"F + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_F1s"},{"name":"vCpu","value":"1"},{"name":"ReservationsAutofitRatio","value":"1"},{"name":"ProductShortName","value":"F + Series VM"},{"name":"ProductTitle","value":"Virtual Machines F Series"},{"name":"SkuName","value":"F1"},{"name":"MeterId","value":"818def1d-898e-488e-9271-800928934f34"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F1"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D15_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"20"},{"name":"RAM","value":"140"},{"name":"ReservationsAutofitGroup","value":"Dv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS15_v2"},{"name":"vCpu","value":"20"},{"name":"ReservationsAutofitRatio","value":"20"},{"name":"ProductShortName","value":"Dv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv2 Series"},{"name":"SkuName","value":"D15 + v2"},{"name":"MeterId","value":"ff79cd83-8a39-47cb-b459-0977e3e89e77"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D15 v2"}],"restrictions":[{"type":"Location","values":["westus"],"reasonCode":"NotAvailableForSubscription"}]},{"resourceType":"virtualMachines","name":"Standard_D14_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"112"},{"name":"ReservationsAutofitGroup","value":"Dv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS14_v2"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"Dv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv2 Series"},{"name":"SkuName","value":"D14 + v2"},{"name":"MeterId","value":"825bdd8a-9501-4f95-ada0-0e4948420152"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D14 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D13_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"56"},{"name":"ReservationsAutofitGroup","value":"Dv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS13_v2"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"Dv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv2 Series"},{"name":"SkuName","value":"D13 + v2"},{"name":"MeterId","value":"63918874-b2ec-4926-8f8c-4c404d384703"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D13 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D12_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"28"},{"name":"ReservationsAutofitGroup","value":"Dv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS12_v2"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"Dv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv2 Series"},{"name":"SkuName","value":"D12 + v2"},{"name":"MeterId","value":"42b49a56-132d-4182-8061-aec164a8a5a8"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D12 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D11_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"14"},{"name":"ReservationsAutofitGroup","value":"Dv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS11_v2"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"Dv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv2 Series"},{"name":"SkuName","value":"D11 + v2"},{"name":"MeterId","value":"25cd7f37-50c4-4c7a-8db7-f5ddcadfe240"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D11 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D5_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"56"},{"name":"ReservationsAutofitGroup","value":"Dv2 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS5_v2"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"Dv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv2 Series"},{"name":"SkuName","value":"D5 + v2"},{"name":"MeterId","value":"bb2ceb60-7694-47ca-8297-ddfbf9f98e05"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D5 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D4_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"28"},{"name":"ReservationsAutofitGroup","value":"Dv2 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS4_v2"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"Dv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv2 Series"},{"name":"SkuName","value":"D4 + v2"},{"name":"MeterId","value":"ab3049b4-0a43-46e3-9b2c-a37ac14785d8"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D4 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D3_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"14"},{"name":"ReservationsAutofitGroup","value":"Dv2 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS3_v2"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"Dv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv2 Series"},{"name":"SkuName","value":"D3 + v2"},{"name":"MeterId","value":"b4e55536-5a69-4246-897a-2e7982be5197"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D3 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D2_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"7"},{"name":"ReservationsAutofitGroup","value":"Dv2 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS2_v2"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"Dv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv2 Series"},{"name":"SkuName","value":"D2 + v2"},{"name":"MeterId","value":"d5a81ebd-6435-4b0f-9ab1-6c0d0dd6eed0"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D2 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D1_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"1"},{"name":"RAM","value":"3.5"},{"name":"ReservationsAutofitGroup","value":"Dv2 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_DS1_v2"},{"name":"vCpu","value":"1"},{"name":"ReservationsAutofitRatio","value":"1"},{"name":"ProductShortName","value":"Dv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines Dv2 Series"},{"name":"SkuName","value":"D1 + v2"},{"name":"MeterId","value":"2e3c2132-1398-43d2-ad45-1d77f6574933"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D1 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D32s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"32"},{"name":"RAM","value":"128"},{"name":"ReservationsAutofitGroup","value":"DSv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D32_v3"},{"name":"vCpu","value":"32"},{"name":"ReservationsAutofitRatio","value":"32"},{"name":"ProductShortName","value":"DSv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv3 Series"},{"name":"SkuName","value":"D32s + v3"},{"name":"MeterId","value":"329a1fce-a987-4d0e-96bb-c9d6ede6a2d1"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D32s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D16s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"64"},{"name":"ReservationsAutofitGroup","value":"DSv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D16_v3"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"DSv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv3 Series"},{"name":"SkuName","value":"D16s + v3"},{"name":"MeterId","value":"878ae2c5-f13d-4c83-9af2-7b333b1c9fa1"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D16s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D8s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"32"},{"name":"ReservationsAutofitGroup","value":"DSv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D8_v3"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"DSv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv3 Series"},{"name":"SkuName","value":"D8s + v3"},{"name":"MeterId","value":"f128c5c9-ea87-473a-9672-6cf1fb3b8b98"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D8s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D4s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"16"},{"name":"ReservationsAutofitGroup","value":"DSv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D4_v3"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"DSv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv3 Series"},{"name":"SkuName","value":"D4s + v3"},{"name":"MeterId","value":"8462aa11-a392-4ae4-87cf-2dbabe31d487"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D4s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_D2s_v3","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"8"},{"name":"ReservationsAutofitGroup","value":"DSv3 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D2_v3"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"DSv3 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv3 Series"},{"name":"SkuName","value":"D2s + v3"},{"name":"MeterId","value":"23d721f3-3f2c-440f-98d8-08a3f30a80ba"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"D2s v3"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F16s","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"32"},{"name":"ReservationsAutofitGroup","value":"FS + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_F16"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"FS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FS Series"},{"name":"SkuName","value":"F16s"},{"name":"MeterId","value":"f5c756b2-15b2-46cd-97b9-df8953afedd1"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F16s"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F8s","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"16"},{"name":"ReservationsAutofitGroup","value":"FS + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_F8"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"FS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FS Series"},{"name":"SkuName","value":"F8s"},{"name":"MeterId","value":"d963fcb5-ca86-46dd-ac1a-95a52ab154b6"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F8s"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F4s","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"8"},{"name":"ReservationsAutofitGroup","value":"FS + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_F4"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"FS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FS Series"},{"name":"SkuName","value":"F4s"},{"name":"MeterId","value":"1d0eaa49-0140-4f00-8b6d-2aacfd087e78"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F4s"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F2s","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"4"},{"name":"ReservationsAutofitGroup","value":"FS + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_F2"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"FS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FS Series"},{"name":"SkuName","value":"F2s"},{"name":"MeterId","value":"efdb48e1-6e65-4d8a-ba65-f7b6a04d05ee"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F2s"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_F1s","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"1"},{"name":"RAM","value":"2"},{"name":"ReservationsAutofitGroup","value":"FS + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_F1"},{"name":"vCpu","value":"1"},{"name":"ReservationsAutofitRatio","value":"1"},{"name":"ProductShortName","value":"FS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines FS Series"},{"name":"SkuName","value":"F1s"},{"name":"MeterId","value":"818def1d-898e-488e-9271-800928934f34"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"F1s"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS15_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"20"},{"name":"RAM","value":"140"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D15_v2"},{"name":"vCpu","value":"20"},{"name":"ReservationsAutofitRatio","value":"20"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS15 + v2"},{"name":"MeterId","value":"ff79cd83-8a39-47cb-b459-0977e3e89e77"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS15 v2"}],"restrictions":[{"type":"Location","values":["westus"],"reasonCode":"NotAvailableForSubscription"}]},{"resourceType":"virtualMachines","name":"Standard_DS14_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"112"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D14_v2"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS14 + v2"},{"name":"MeterId","value":"825bdd8a-9501-4f95-ada0-0e4948420152"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS14 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS14-8_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"112"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D14_v2"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS14-8 + v2"},{"name":"MeterId","value":"825bdd8a-9501-4f95-ada0-0e4948420152"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS14-8 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS14-4_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"112"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D14_v2"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS14-4 + v2"},{"name":"MeterId","value":"825bdd8a-9501-4f95-ada0-0e4948420152"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS14-4 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS13_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"56"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D13_v2"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS13 + v2"},{"name":"MeterId","value":"63918874-b2ec-4926-8f8c-4c404d384703"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS13 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS13-4_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"56"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D13_v2"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS13-4 + v2"},{"name":"MeterId","value":"63918874-b2ec-4926-8f8c-4c404d384703"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS13-4 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS13-2_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"56"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D13_v2"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS13-2 + v2"},{"name":"MeterId","value":"63918874-b2ec-4926-8f8c-4c404d384703"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS13-2 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS12_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"28"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D12_v2"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS12 + v2"},{"name":"MeterId","value":"42b49a56-132d-4182-8061-aec164a8a5a8"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS12 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS12-2_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"28"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D12_v2"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS12-2 + v2"},{"name":"MeterId","value":"42b49a56-132d-4182-8061-aec164a8a5a8"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS12-2 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS12-1_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"28"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D12_v2"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS12-1 + v2"},{"name":"MeterId","value":"42b49a56-132d-4182-8061-aec164a8a5a8"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS12-1 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS11_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"14"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D11_v2"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS11 + v2"},{"name":"MeterId","value":"25cd7f37-50c4-4c7a-8db7-f5ddcadfe240"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS11 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS11-1_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"14"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series High Memory"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D11_v2"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS11-1 + v2"},{"name":"MeterId","value":"25cd7f37-50c4-4c7a-8db7-f5ddcadfe240"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS11-1 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS5_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"56"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D5_v2"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS5 + v2"},{"name":"MeterId","value":"bb2ceb60-7694-47ca-8297-ddfbf9f98e05"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS5 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS4_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"28"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D4_v2"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS4 + v2"},{"name":"MeterId","value":"ab3049b4-0a43-46e3-9b2c-a37ac14785d8"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS4 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS3_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"14"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D3_v2"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS3 + v2"},{"name":"MeterId","value":"b4e55536-5a69-4246-897a-2e7982be5197"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS3 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS2_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"7"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D2_v2"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS2 + v2"},{"name":"MeterId","value":"d5a81ebd-6435-4b0f-9ab1-6c0d0dd6eed0"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS2 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_DS1_v2","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"1"},{"name":"RAM","value":"3.5"},{"name":"ReservationsAutofitGroup","value":"DSv2 + Series"},{"name":"ReservationSwappableArmSkuName","value":"Standard_D1_v2"},{"name":"vCpu","value":"1"},{"name":"ReservationsAutofitRatio","value":"1"},{"name":"ProductShortName","value":"DSv2 + Series VM"},{"name":"ProductTitle","value":"Virtual Machines DSv2 Series"},{"name":"SkuName","value":"DS1 + v2"},{"name":"MeterId","value":"2e3c2132-1398-43d2-ad45-1d77f6574933"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"DS1 v2"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_B20ms","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"20"},{"name":"RAM","value":"80"},{"name":"ReservationsAutofitGroup","value":"BS + Series High Memory"},{"name":"vCpu","value":"20"},{"name":"ReservationsAutofitRatio","value":"20"},{"name":"ProductShortName","value":"BS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines BS Series"},{"name":"SkuName","value":"B20ms"},{"name":"MeterId","value":"eb701016-3f6a-45da-afd4-97b37563ba1b"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"B20ms"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_B16ms","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"16"},{"name":"RAM","value":"64"},{"name":"ReservationsAutofitGroup","value":"BS + Series High Memory"},{"name":"vCpu","value":"16"},{"name":"ReservationsAutofitRatio","value":"16"},{"name":"ProductShortName","value":"BS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines BS Series"},{"name":"SkuName","value":"B16ms"},{"name":"MeterId","value":"2f1d540a-c863-422b-96dc-744d479b8122"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"B16ms"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_B12ms","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"12"},{"name":"RAM","value":"48"},{"name":"ReservationsAutofitGroup","value":"BS + Series High Memory"},{"name":"vCpu","value":"12"},{"name":"ReservationsAutofitRatio","value":"12"},{"name":"ProductShortName","value":"BS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines BS Series"},{"name":"SkuName","value":"B12ms"},{"name":"MeterId","value":"3b593d38-fff4-46c9-aec8-1174d28b48d7"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"B12ms"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_B8ms","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"8"},{"name":"RAM","value":"32"},{"name":"ReservationsAutofitGroup","value":"BS + Series High Memory"},{"name":"vCpu","value":"8"},{"name":"ReservationsAutofitRatio","value":"8"},{"name":"ProductShortName","value":"BS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines BS Series"},{"name":"SkuName","value":"B8ms"},{"name":"MeterId","value":"48c00aac-c54f-451c-b907-782b0e632e71"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"B8ms"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_B4ms","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"4"},{"name":"RAM","value":"16"},{"name":"ReservationsAutofitGroup","value":"BS + Series High Memory"},{"name":"vCpu","value":"4"},{"name":"ReservationsAutofitRatio","value":"4"},{"name":"ProductShortName","value":"BS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines BS Series"},{"name":"SkuName","value":"B4ms"},{"name":"MeterId","value":"9fb5594c-c780-4c72-b470-a245d94260dd"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"B4ms"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_B2s","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"4"},{"name":"ReservationsAutofitGroup","value":"BS + Series"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"BS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines BS Series"},{"name":"SkuName","value":"B2s"},{"name":"MeterId","value":"0cf74939-2520-41ce-94a2-4db03e5952f0"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"B2s"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_B2ms","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"2"},{"name":"RAM","value":"8"},{"name":"ReservationsAutofitGroup","value":"BS + Series High Memory"},{"name":"vCpu","value":"2"},{"name":"ReservationsAutofitRatio","value":"2"},{"name":"ProductShortName","value":"BS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines BS Series"},{"name":"SkuName","value":"B2ms"},{"name":"MeterId","value":"949adaff-7692-4519-bbe0-28d9588f35a1"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"B2ms"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_B1s","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"1"},{"name":"RAM","value":"1"},{"name":"ReservationsAutofitGroup","value":"BS + Series"},{"name":"vCpu","value":"1"},{"name":"ReservationsAutofitRatio","value":"0.5"},{"name":"ProductShortName","value":"BS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines BS Series"},{"name":"SkuName","value":"B1s"},{"name":"MeterId","value":"d1632310-2c4c-406b-85ec-14a68f6fa75e"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"B1s"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_B1ms","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"1"},{"name":"RAM","value":"2"},{"name":"ReservationsAutofitGroup","value":"BS + Series High Memory"},{"name":"vCpu","value":"1"},{"name":"ReservationsAutofitRatio","value":"0.5"},{"name":"ProductShortName","value":"BS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines BS Series"},{"name":"SkuName","value":"B1ms"},{"name":"MeterId","value":"3492700f-2a14-4f8a-8718-fb3db465ac4a"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"B1ms"}],"restrictions":[]},{"resourceType":"virtualMachines","name":"Standard_B1ls","terms":["P1Y","P3Y"],"locations":["westus"],"billingPlans":{"p1Y":["Upfront","Monthly"],"p3Y":["Upfront","Monthly"]},"skuProperties":[{"name":"Cores","value":"1"},{"name":"RAM","value":"0.5"},{"name":"ReservationsAutofitGroup","value":"BS + Series"},{"name":"vCpu","value":"1"},{"name":"ReservationsAutofitRatio","value":"0.25"},{"name":"ProductShortName","value":"BS + Series VM"},{"name":"ProductTitle","value":"Virtual Machines BS Series"},{"name":"SkuName","value":"B1ls"},{"name":"MeterId","value":"5c147045-fc07-4b71-b0fe-5df5ebde7870"},{"name":"MeterType","value":"1 + Compute Hour"},{"name":"SkuDisplayName","value":"B1ls"}],"restrictions":[]}]' + headers: + cache-control: + - no-cache + content-length: + - '95290' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-test: + - '{"contact":"kgautam","scenarios":"v6-recurrence-test,time-scale:35040,AcceleratedPayment","retention":"2/13/2020 + 5:04:30 AM"}' + status: + code: 200 + message: OK +version: 1 diff --git a/src/reservation/azext_reservation/tests/latest/recordings/test_get_reservation.yaml b/src/reservation/azext_reservation/tests/latest/recordings/test_get_reservation.yaml new file mode 100644 index 00000000000..c744934bd5d --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/recordings/test_get_reservation.yaml @@ -0,0 +1,53 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation show + Connection: + - keep-alive + ParameterSetName: + - --reservation-order-id --reservation-id + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f?api-version=2022-03-01 + response: + body: + string: '{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0a47417c-cd30-4f67-add6-d631583e09f3/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f","etag":9,"location":"westus","properties":{"appliedScopeType":"Shared","quantity":3,"provisioningState":"Cancelled","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-08T04:58:40.9726618Z","extendedStatusInfo":{"statusCode":"Split","message":"This + reservation was split and is no longer active"},"lastUpdatedDateTime":"2019-11-08T04:58:43.4518889Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitDestinations":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/d2bf57b5-f3b1-455f-9fc1-1a1b761662b4","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/e35514c8-588a-4c38-bbec-5b43d5a4206e"]},"mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"]},"renew":false,"term":"P1Y","billingScopeId":"/subscriptions/00000000-0000-0000-0000-000000000000","billingPlan":"Upfront"}}' + headers: + cache-control: + - no-cache + content-length: + - '1596' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/reservation/azext_reservation/tests/latest/recordings/test_get_reservation_order.yaml b/src/reservation/azext_reservation/tests/latest/recordings/test_get_reservation_order.yaml new file mode 100644 index 00000000000..c72df1ca275 --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/recordings/test_get_reservation_order.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation-order show + Connection: + - keep-alive + ParameterSetName: + - --reservation-order-id + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3?api-version=2022-03-01 + response: + body: + string: '{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3","type":"Microsoft.Capacity/reservationOrders","name":"0a47417c-cd30-4f67-add6-d631583e09f3","etag":13,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-23T04:08:23.3109013Z","createdDateTime":"2019-08-23T04:13:25.819115Z","expiryDate":"2020-08-23","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/598d44b3-e543-4888-bddc-4a98e6cd7686"},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f"},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f"},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/d2bf57b5-f3b1-455f-9fc1-1a1b761662b4"},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/e35514c8-588a-4c38-bbec-5b43d5a4206e"},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/38046576-be5d-4732-9909-990ea019fbbd"}],"originalQuantity":3,"billingPlan":"Upfront"}}' + headers: + cache-control: + - no-cache + content-length: + - '1488' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/reservation/azext_reservation/tests/latest/recordings/test_list_reservation.yaml b/src/reservation/azext_reservation/tests/latest/recordings/test_list_reservation.yaml new file mode 100644 index 00000000000..c3e5e89fb74 --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/recordings/test_list_reservation.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation list + Connection: + - keep-alive + ParameterSetName: + - --reservation-order-id + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations?api-version=2022-03-01 + response: + body: + string: '{"value":[{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/598d44b3-e543-4888-bddc-4a98e6cd7686","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0a47417c-cd30-4f67-add6-d631583e09f3/598d44b3-e543-4888-bddc-4a98e6cd7686","etag":22,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":3,"provisioningState":"Cancelled","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-08-23T04:15:47.0672076Z","extendedStatusInfo":{"statusCode":"Split","message":"This + reservation was split and is no longer active"},"lastUpdatedDateTime":"2019-08-23T04:15:47.7703092Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitDestinations":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"]},"renew":false,"term":"P1Y","billingScopeId":"/subscriptions/00000000-0000-0000-0000-000000000000","billingPlan":"Upfront"}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0a47417c-cd30-4f67-add6-d631583e09f3/8a835b02-2dac-4c48-928d-403ea989ab2f","etag":5,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":1,"provisioningState":"Cancelled","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-08-23T04:15:50.4891391Z","extendedStatusInfo":{"statusCode":"Merged","message":"This + reservation was merged and is no longer active"},"lastUpdatedDateTime":"2019-08-23T04:15:50.4891391Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitSource":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/598d44b3-e543-4888-bddc-4a98e6cd7686"},"mergeProperties":{"mergeDestination":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f"},"renew":false,"term":"P1Y","billingScopeId":"/subscriptions/00000000-0000-0000-0000-000000000000","billingPlan":"Upfront"}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0a47417c-cd30-4f67-add6-d631583e09f3/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6","etag":4,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":2,"provisioningState":"Cancelled","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-08-23T04:15:50.4891391Z","extendedStatusInfo":{"statusCode":"Merged","message":"This + reservation was merged and is no longer active"},"lastUpdatedDateTime":"2019-08-23T04:15:50.4891391Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitSource":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/598d44b3-e543-4888-bddc-4a98e6cd7686"},"mergeProperties":{"mergeDestination":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f"},"renew":false,"term":"P1Y","billingScopeId":"/subscriptions/00000000-0000-0000-0000-000000000000","billingPlan":"Upfront"}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0a47417c-cd30-4f67-add6-d631583e09f3/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f","etag":9,"location":"westus","properties":{"appliedScopeType":"Shared","quantity":3,"provisioningState":"Cancelled","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-08T04:58:40.9726618Z","extendedStatusInfo":{"statusCode":"Split","message":"This + reservation was split and is no longer active"},"lastUpdatedDateTime":"2019-11-08T04:58:43.4518889Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitDestinations":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/d2bf57b5-f3b1-455f-9fc1-1a1b761662b4","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/e35514c8-588a-4c38-bbec-5b43d5a4206e"]},"mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"]},"renew":false,"term":"P1Y","billingScopeId":"/subscriptions/00000000-0000-0000-0000-000000000000","billingPlan":"Upfront"}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/d2bf57b5-f3b1-455f-9fc1-1a1b761662b4","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0a47417c-cd30-4f67-add6-d631583e09f3/d2bf57b5-f3b1-455f-9fc1-1a1b761662b4","etag":5,"location":"westus","properties":{"appliedScopeType":"Shared","quantity":1,"provisioningState":"Cancelled","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-08T04:58:58.8094848Z","extendedStatusInfo":{"statusCode":"Merged","message":"This + reservation was merged and is no longer active"},"lastUpdatedDateTime":"2019-11-08T04:58:58.8094848Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitSource":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f"},"mergeProperties":{"mergeDestination":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/38046576-be5d-4732-9909-990ea019fbbd"},"renew":false,"term":"P1Y","billingScopeId":"/subscriptions/00000000-0000-0000-0000-000000000000","billingPlan":"Upfront"}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/e35514c8-588a-4c38-bbec-5b43d5a4206e","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0a47417c-cd30-4f67-add6-d631583e09f3/e35514c8-588a-4c38-bbec-5b43d5a4206e","etag":4,"location":"westus","properties":{"appliedScopeType":"Shared","quantity":2,"provisioningState":"Cancelled","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-08T04:58:58.8094848Z","extendedStatusInfo":{"statusCode":"Merged","message":"This + reservation was merged and is no longer active"},"lastUpdatedDateTime":"2019-11-08T04:58:58.8094848Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitSource":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f"},"mergeProperties":{"mergeDestination":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/38046576-be5d-4732-9909-990ea019fbbd"},"renew":false,"term":"P1Y","billingScopeId":"/subscriptions/00000000-0000-0000-0000-000000000000","billingPlan":"Upfront"}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/38046576-be5d-4732-9909-990ea019fbbd","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0a47417c-cd30-4f67-add6-d631583e09f3/38046576-be5d-4732-9909-990ea019fbbd","etag":2,"location":"westus","properties":{"appliedScopeType":"Shared","quantity":3,"provisioningState":"Succeeded","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-08T04:58:58.8094848Z","lastUpdatedDateTime":"2019-11-08T04:58:58.8094848Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/d2bf57b5-f3b1-455f-9fc1-1a1b761662b4","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/e35514c8-588a-4c38-bbec-5b43d5a4206e"]},"capabilities":"ApiReturnEnabled, + ApiExchangeEnabled","renew":false,"term":"P1Y","billingScopeId":"/subscriptions/00000000-0000-0000-0000-000000000000","billingPlan":"Upfront"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '9612' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/reservation/azext_reservation/tests/latest/recordings/test_list_reservation_history.yaml b/src/reservation/azext_reservation/tests/latest/recordings/test_list_reservation_history.yaml new file mode 100644 index 00000000000..3b49d058d10 --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/recordings/test_list_reservation_history.yaml @@ -0,0 +1,69 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation list-history + Connection: + - keep-alive + ParameterSetName: + - --reservation-order-id --reservation-id + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/revisions?api-version=2022-03-01 + response: + body: + string: '{"value":[{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/revisions/9","type":"Microsoft.Capacity/reservationOrders/reservations/revisions","name":"0a47417c-cd30-4f67-add6-d631583e09f3/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/9","etag":9,"location":"westus","properties":{"appliedScopeType":"Shared","quantity":3,"provisioningState":"Cancelled","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-08T04:58:40.9726618Z","extendedStatusInfo":{"statusCode":"Split","message":"This + reservation was split and is no longer active"},"lastUpdatedDateTime":"2019-11-08T04:58:43.4518889Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitDestinations":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/d2bf57b5-f3b1-455f-9fc1-1a1b761662b4","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/e35514c8-588a-4c38-bbec-5b43d5a4206e"]},"mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"]},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/revisions/8","type":"Microsoft.Capacity/reservationOrders/reservations/revisions","name":"0a47417c-cd30-4f67-add6-d631583e09f3/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/8","etag":8,"location":"westus","properties":{"appliedScopeType":"Shared","quantity":3,"provisioningState":"Pending","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-08T04:56:57.4087645Z","extendedStatusInfo":{"statusCode":"Pending","message":"An + operation is in progress on your reservation. Please wait for operation to + complete before taking further action."},"lastUpdatedDateTime":"2019-11-08T04:58:40.9726618Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitDestinations":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/d2bf57b5-f3b1-455f-9fc1-1a1b761662b4","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/e35514c8-588a-4c38-bbec-5b43d5a4206e"]},"mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"]},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/revisions/7","type":"Microsoft.Capacity/reservationOrders/reservations/revisions","name":"0a47417c-cd30-4f67-add6-d631583e09f3/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/7","etag":7,"location":"westus","properties":{"appliedScopeType":"Shared","quantity":3,"provisioningState":"Pending","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-08T04:56:57.4087645Z","extendedStatusInfo":{"statusCode":"Pending","message":"An + operation is in progress on your reservation. Please wait for operation to + complete before taking further action."},"lastUpdatedDateTime":"2019-11-08T04:58:40.7018965Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"]},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/revisions/6","type":"Microsoft.Capacity/reservationOrders/reservations/revisions","name":"0a47417c-cd30-4f67-add6-d631583e09f3/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/6","etag":6,"location":"westus","properties":{"appliedScopeType":"Shared","quantity":3,"provisioningState":"Succeeded","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-08T04:56:57.4087645Z","lastUpdatedDateTime":"2019-11-08T04:56:59.3775643Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"]},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/revisions/5","type":"Microsoft.Capacity/reservationOrders/reservations/revisions","name":"0a47417c-cd30-4f67-add6-d631583e09f3/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/5","etag":5,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":3,"provisioningState":"Pending","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-08T04:56:49.2849104Z","extendedStatusInfo":{"statusCode":"Pending","message":"An + operation is in progress on your reservation. Please wait for operation to + complete before taking further action."},"lastUpdatedDateTime":"2019-11-08T04:56:57.2994287Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"]},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/revisions/4","type":"Microsoft.Capacity/reservationOrders/reservations/revisions","name":"0a47417c-cd30-4f67-add6-d631583e09f3/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/4","etag":4,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":3,"provisioningState":"Succeeded","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-08T04:56:49.2849104Z","lastUpdatedDateTime":"2019-11-08T04:56:53.7764659Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"]},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/revisions/3","type":"Microsoft.Capacity/reservationOrders/reservations/revisions","name":"0a47417c-cd30-4f67-add6-d631583e09f3/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/3","etag":3,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":3,"provisioningState":"Pending","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-08-23T04:15:50.4891391Z","extendedStatusInfo":{"statusCode":"Pending","message":"An + operation is in progress on your reservation. Please wait for operation to + complete before taking further action."},"lastUpdatedDateTime":"2019-11-08T04:56:49.0973562Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"]},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/revisions/2","type":"Microsoft.Capacity/reservationOrders/reservations/revisions","name":"0a47417c-cd30-4f67-add6-d631583e09f3/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/2","etag":2,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":3,"provisioningState":"Succeeded","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-08-23T04:15:50.4891391Z","lastUpdatedDateTime":"2019-08-23T04:15:50.4891391Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"]},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/revisions/1","type":"Microsoft.Capacity/reservationOrders/reservations/revisions","name":"0a47417c-cd30-4f67-add6-d631583e09f3/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f/1","etag":1,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":3,"provisioningState":"Creating","expiryDate":"2020-08-23","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-08-23T04:15:49.7288338Z","lastUpdatedDateTime":"2019-08-23T04:15:49.7288338Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f","/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"]},"renew":false}}]}' + headers: + cache-control: + - no-cache + content-length: + - '11608' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/reservation/azext_reservation/tests/latest/recordings/test_list_reservation_order.yaml b/src/reservation/azext_reservation/tests/latest/recordings/test_list_reservation_order.yaml new file mode 100644 index 00000000000..0715f6dca13 --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/recordings/test_list_reservation_order.yaml @@ -0,0 +1,131 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation-order list + Connection: + - keep-alive + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders?api-version=2022-03-01 + response: + body: + string: '{"value":[{"id":"/providers/microsoft.capacity/reservationOrders/4159f0e3-8031-4634-a68f-5b51c3dc6050","type":"Microsoft.Capacity/reservationOrders","name":"4159f0e3-8031-4634-a68f-5b51c3dc6050","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-29T18:37:03.7537423Z","createdDateTime":"2019-08-29T18:40:03.047827Z","expiryDate":"2020-08-29","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/4159f0e3-8031-4634-a68f-5b51c3dc6050/reservations/5bf8a9c5-6598-4178-a02a-cd16f90549fa"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/49b5fcb8-a2aa-410c-8552-29592dd7a516","type":"Microsoft.Capacity/reservationOrders","name":"49b5fcb8-a2aa-410c-8552-29592dd7a516","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-11T22:14:35.6625059Z","createdDateTime":"2019-09-11T22:17:39.598353Z","expiryDate":"2020-09-11","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/49b5fcb8-a2aa-410c-8552-29592dd7a516/reservations/f5bafdba-2148-4d70-818b-3b9c0908c14d"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/1c0b97a3-3a73-4ce7-8abd-d4f260934109","type":"Microsoft.Capacity/reservationOrders","name":"1c0b97a3-3a73-4ce7-8abd-d4f260934109","etag":12,"properties":{"displayName":"VM_RI_10-25-2019_08-02","requestDateTime":"2019-10-25T15:02:27.8249678Z","createdDateTime":"2019-10-25T15:05:49.1552122Z","expiryDate":"2020-10-25","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/1c0b97a3-3a73-4ce7-8abd-d4f260934109/reservations/0272c6d7-1216-4fb6-8d00-ec7b51733133"}],"originalQuantity":2,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3","type":"Microsoft.Capacity/reservationOrders","name":"0a47417c-cd30-4f67-add6-d631583e09f3","etag":13,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-23T04:08:23.3109013Z","createdDateTime":"2019-08-23T04:13:25.819115Z","expiryDate":"2020-08-23","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/598d44b3-e543-4888-bddc-4a98e6cd7686"},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/8a835b02-2dac-4c48-928d-403ea989ab2f"},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/56a3ec1d-3b6e-4639-b8dd-8f9b0a0edda6"},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/ae1fbdad-6333-4964-9f4c-83f7e2b7f44f"},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/d2bf57b5-f3b1-455f-9fc1-1a1b761662b4"},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/e35514c8-588a-4c38-bbec-5b43d5a4206e"},{"id":"/providers/microsoft.capacity/reservationOrders/0a47417c-cd30-4f67-add6-d631583e09f3/reservations/38046576-be5d-4732-9909-990ea019fbbd"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/154ed3db-262c-40e5-baa3-a0505b6cdfdd","type":"Microsoft.Capacity/reservationOrders","name":"154ed3db-262c-40e5-baa3-a0505b6cdfdd","etag":11,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-12T01:06:51.4409141Z","createdDateTime":"2019-09-12T01:09:55.7425829Z","expiryDate":"2020-09-12","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/154ed3db-262c-40e5-baa3-a0505b6cdfdd/reservations/4bcb5164-bda0-43d6-82b2-31b97c9e1e45"},{"id":"/providers/microsoft.capacity/reservationOrders/154ed3db-262c-40e5-baa3-a0505b6cdfdd/reservations/77826aff-df48-48e9-a1a9-193e491c2fe4"},{"id":"/providers/microsoft.capacity/reservationOrders/154ed3db-262c-40e5-baa3-a0505b6cdfdd/reservations/a5a08bd1-ae00-424f-a6f3-27e3c7a59139"},{"id":"/providers/microsoft.capacity/reservationOrders/154ed3db-262c-40e5-baa3-a0505b6cdfdd/reservations/dc69bacc-87ba-496b-aa2f-40fa168192e0"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/041a7ac7-0eec-4abb-aec8-a5eb64de71fc","type":"Microsoft.Capacity/reservationOrders","name":"041a7ac7-0eec-4abb-aec8-a5eb64de71fc","etag":31,"properties":{"displayName":"VM_RI_10-26-2019_11-30_renewed","requestDateTime":"2019-10-26T18:49:05.0555921Z","createdDateTime":"2019-10-26T18:55:01.594704Z","expiryDate":"2020-10-26","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/041a7ac7-0eec-4abb-aec8-a5eb64de71fc/reservations/c46a3844-3917-4d41-a136-a3444b00fe65"}],"originalQuantity":1,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/1b21f05a-b4f7-457d-b48a-dc740ab8a81a","type":"Microsoft.Capacity/reservationOrders","name":"1b21f05a-b4f7-457d-b48a-dc740ab8a81a","etag":10,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-10-28T04:07:12.7824057Z","createdDateTime":"2019-10-28T04:11:02.4089497Z","expiryDate":"2020-10-28","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/1b21f05a-b4f7-457d-b48a-dc740ab8a81a/reservations/1d8ce36c-d1b9-4289-adbb-cba518a233c2"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/10316f5f-0179-4bc2-aa67-1059281f9fec","type":"Microsoft.Capacity/reservationOrders","name":"10316f5f-0179-4bc2-aa67-1059281f9fec","etag":9,"properties":{"displayName":"RedHatOsa_CheckRefund","requestDateTime":"2019-08-07T18:04:21.2118727Z","createdDateTime":"2019-08-07T18:07:02.729548Z","expiryDate":"2020-08-07","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/10316f5f-0179-4bc2-aa67-1059281f9fec/reservations/1407db51-f754-43c2-8cd5-589ffa633fd9"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/09895b41-b30c-4c33-8132-18afa2ed5c80","type":"Microsoft.Capacity/reservationOrders","name":"09895b41-b30c-4c33-8132-18afa2ed5c80","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-11T22:03:10.8130442Z","createdDateTime":"2019-09-11T22:06:53.0668693Z","expiryDate":"2020-09-11","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/09895b41-b30c-4c33-8132-18afa2ed5c80/reservations/00fda6d8-fd8f-4615-b2cc-bac2dcbe21b5"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/13c73cbd-12de-4c14-8550-ed34b10a32e1","type":"Microsoft.Capacity/reservationOrders","name":"13c73cbd-12de-4c14-8550-ed34b10a32e1","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-10T23:54:40.4877351Z","createdDateTime":"2019-09-10T23:57:48.7184375Z","expiryDate":"2020-09-10","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/13c73cbd-12de-4c14-8550-ed34b10a32e1/reservations/94a23a12-7ff5-48e9-a0f4-e0b598e7c8bb"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/2353aeaf-c1ff-4be7-bf07-508a09a342c1","type":"Microsoft.Capacity/reservationOrders","name":"2353aeaf-c1ff-4be7-bf07-508a09a342c1","etag":9,"properties":{"displayName":"VM_RI_11-07-2019_16-20","requestDateTime":"2019-11-08T00:21:05.4218292Z","term":"P3Y","provisioningState":"Failed","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/2353aeaf-c1ff-4be7-bf07-508a09a342c1/reservations/c11761e4-67fe-4206-97ad-f8349f121ad4"}],"originalQuantity":2,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/2c777d7f-2b8f-4249-ac3e-b704bfc9646b","type":"Microsoft.Capacity/reservationOrders","name":"2c777d7f-2b8f-4249-ac3e-b704bfc9646b","etag":8,"properties":{"displayName":"VirtualMachines_Reservation_07-11-2019_15-06","requestDateTime":"2019-07-11T22:06:24.6863522Z","createdDateTime":"2019-07-11T22:08:44.6759981Z","expiryDate":"2020-07-11","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/2c777d7f-2b8f-4249-ac3e-b704bfc9646b/reservations/eec5d04d-21e2-4804-a0f3-380ab70ed4b4"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/17d3bc3e-e724-4991-a3e6-21a25f7e6d3c","type":"Microsoft.Capacity/reservationOrders","name":"17d3bc3e-e724-4991-a3e6-21a25f7e6d3c","etag":12,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-10-28T04:00:10.240591Z","createdDateTime":"2019-10-28T04:03:29.7190841Z","expiryDate":"2020-10-28","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/17d3bc3e-e724-4991-a3e6-21a25f7e6d3c/reservations/e74e266a-9751-465a-b137-86a414840d1a"},{"id":"/providers/microsoft.capacity/reservationOrders/17d3bc3e-e724-4991-a3e6-21a25f7e6d3c/reservations/4c80444e-bcb1-4fcb-8ca4-2e340ba8edc3"},{"id":"/providers/microsoft.capacity/reservationOrders/17d3bc3e-e724-4991-a3e6-21a25f7e6d3c/reservations/3a4e3925-9687-465b-9e0f-07a6c4595413"},{"id":"/providers/microsoft.capacity/reservationOrders/17d3bc3e-e724-4991-a3e6-21a25f7e6d3c/reservations/51dffe59-de4f-4f42-9382-3c0ef5af0eb9"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/1d8785bf-0817-4bf5-b7aa-5b2684bc98ee","type":"Microsoft.Capacity/reservationOrders","name":"1d8785bf-0817-4bf5-b7aa-5b2684bc98ee","etag":11,"properties":{"displayName":"TestPurchaseBillingPlanReservation","requestDateTime":"2019-10-01T23:03:32.3548104Z","createdDateTime":"2019-10-01T23:07:01.1498056Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/1d8785bf-0817-4bf5-b7aa-5b2684bc98ee/reservations/a2ced41e-b44d-46d8-9397-67e818b57a69"}],"originalQuantity":3,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d","type":"Microsoft.Capacity/reservationOrders","name":"0c0e972c-a418-497c-8fc9-96b5d43fcb1d","etag":13,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-10-01T19:02:20.5947314Z","createdDateTime":"2019-10-01T19:05:27.1050231Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/f9fa8575-9576-4469-95b4-22504c365178"},{"id":"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/edde0097-21bd-46e4-a495-1bda7e7f9aba"},{"id":"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/77ade667-6d1e-49ed-8aa1-341b6009b3a0"},{"id":"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/5d941ba9-22d0-46f5-8194-ca00001bb180"},{"id":"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/5ae9e6f9-6193-4d0b-9c49-d59d5b19fe53"},{"id":"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/4a60de37-8be3-4c67-ba15-1c7722f6a008"},{"id":"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/78c80a1d-0a59-4598-8bfc-ad4a18558ae6"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70","type":"Microsoft.Capacity/reservationOrders","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70","etag":17,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-10-01T20:30:12.7004319Z","createdDateTime":"2019-10-01T20:33:57.6402185Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/ae3ba413-e6fb-48ff-be5e-9f29cd13a3d1"},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/d7385cfc-271c-48a1-93f8-5c2fca837bbe"},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/1cbeb889-2eac-401d-9708-e47eb7e6f89b"},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/78fd7be7-6b46-40d6-8c45-c83b686a40bb"},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/eb13b2da-d7cf-4b60-b37e-99f4563656a3"},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/38018105-23c7-4f4e-be87-a85727547973"},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/a7595c2e-435c-4b2e-b71d-5c34a5672f23"},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/c6fe7828-9bb1-42ed-ac8b-27f9e61f1dcd"},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/168c5c82-4680-44f8-8bb9-c64b709ea972"},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/8a0f3a94-71b4-4cf7-9ec2-d80a78994b64"},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/4e66c701-c495-4518-b305-68778e9b63d6"},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/aee83380-71ab-47ba-bd74-73b45531b941"},{"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/1933daea-fa47-4883-b228-ebdcc345a9d1","type":"Microsoft.Capacity/reservationOrders","name":"1933daea-fa47-4883-b228-ebdcc345a9d1","etag":11,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-23T00:32:49.0298091Z","createdDateTime":"2019-08-23T00:36:03.7241709Z","expiryDate":"2020-08-23","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/1933daea-fa47-4883-b228-ebdcc345a9d1/reservations/c3db41c2-853b-482e-8cc3-c996d50e9ba3"},{"id":"/providers/microsoft.capacity/reservationOrders/1933daea-fa47-4883-b228-ebdcc345a9d1/reservations/a45578bd-c7e1-4518-9287-356fe539d839"},{"id":"/providers/microsoft.capacity/reservationOrders/1933daea-fa47-4883-b228-ebdcc345a9d1/reservations/a17b4e13-2714-4d98-b595-53508d0b8b31"},{"id":"/providers/microsoft.capacity/reservationOrders/1933daea-fa47-4883-b228-ebdcc345a9d1/reservations/8cd2bc26-cdb6-4d4e-8649-c7d26273033d"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/11e0f3cb-d8d2-42d4-8b24-b460cab90b67","type":"Microsoft.Capacity/reservationOrders","name":"11e0f3cb-d8d2-42d4-8b24-b460cab90b67","etag":10,"properties":{"displayName":"VM_RI_10-25-2019_08-10","requestDateTime":"2019-10-25T15:12:40.751763Z","createdDateTime":"2019-10-25T15:19:49.3660504Z","expiryDate":"2020-10-25","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/11e0f3cb-d8d2-42d4-8b24-b460cab90b67/reservations/153f4fea-dde4-4656-949a-50e3191840c9"}],"originalQuantity":5,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/256d9eaa-72b3-414e-aa8a-ef23f5edb95a","type":"Microsoft.Capacity/reservationOrders","name":"256d9eaa-72b3-414e-aa8a-ef23f5edb95a","etag":10,"properties":{"displayName":"test","requestDateTime":"2019-11-14T22:45:30.2871269Z","createdDateTime":"2019-11-14T22:48:56.5683058Z","expiryDate":"2020-11-14","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/256d9eaa-72b3-414e-aa8a-ef23f5edb95a/reservations/998468b9-af7c-45f1-b7b9-f36189d6ceda"}],"originalQuantity":2,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/451d0d8f-6aff-4b52-a4c8-44d10a4e8b9a","type":"Microsoft.Capacity/reservationOrders","name":"451d0d8f-6aff-4b52-a4c8-44d10a4e8b9a","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-22T22:05:03.5564557Z","createdDateTime":"2019-08-22T22:08:09.7454093Z","expiryDate":"2020-08-22","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/451d0d8f-6aff-4b52-a4c8-44d10a4e8b9a/reservations/c08986d6-cd57-4742-abc5-92d532506c1d"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/39c34e3b-5c05-466d-a421-94577296af06","type":"Microsoft.Capacity/reservationOrders","name":"39c34e3b-5c05-466d-a421-94577296af06","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-11T21:32:49.0566257Z","createdDateTime":"2019-09-11T21:35:59.9743049Z","expiryDate":"2020-09-11","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/39c34e3b-5c05-466d-a421-94577296af06/reservations/16306566-e5db-4278-b068-4d0daadde805"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/36ff776c-c4e7-44f0-bd82-82dad39f02c1","type":"Microsoft.Capacity/reservationOrders","name":"36ff776c-c4e7-44f0-bd82-82dad39f02c1","etag":13,"properties":{"displayName":"TestPurchaseBillingPlanReservation","requestDateTime":"2019-10-01T23:08:12.4585215Z","createdDateTime":"2019-10-01T23:21:30.8478343Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/36ff776c-c4e7-44f0-bd82-82dad39f02c1/reservations/55f911b5-9415-4250-8f3c-75f669046794"},{"id":"/providers/microsoft.capacity/reservationOrders/36ff776c-c4e7-44f0-bd82-82dad39f02c1/reservations/b395f9f2-74d2-44f4-82c5-a89fac180766"},{"id":"/providers/microsoft.capacity/reservationOrders/36ff776c-c4e7-44f0-bd82-82dad39f02c1/reservations/b3c08e0c-265e-4851-848d-5a5aab8bc851"},{"id":"/providers/microsoft.capacity/reservationOrders/36ff776c-c4e7-44f0-bd82-82dad39f02c1/reservations/167082db-4961-4da3-9f33-2b38534372bb"}],"originalQuantity":3,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/1ce5c506-dc1a-4529-9e8a-ce71a3fce011","type":"Microsoft.Capacity/reservationOrders","name":"1ce5c506-dc1a-4529-9e8a-ce71a3fce011","etag":8,"properties":{"displayName":"SqlDatabases_Reservation_07-09-2019_15-44","requestDateTime":"2019-07-09T22:44:56.9644907Z","createdDateTime":"2019-07-09T22:48:15.3886028Z","expiryDate":"2020-07-09","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/1ce5c506-dc1a-4529-9e8a-ce71a3fce011/reservations/8a961b96-0fcf-44e1-a127-d367ba9dbe9d"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/0107376d-9008-461d-bf44-e0ae83716cf5","type":"Microsoft.Capacity/reservationOrders","name":"0107376d-9008-461d-bf44-e0ae83716cf5","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-23T02:38:35.6039859Z","createdDateTime":"2019-08-23T02:42:15.8934022Z","expiryDate":"2020-08-23","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/0107376d-9008-461d-bf44-e0ae83716cf5/reservations/c8c058a9-86da-40f0-b9a7-b427a389e788"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/48a6e568-638f-44ec-923b-3e8d1ccc1ac3","type":"Microsoft.Capacity/reservationOrders","name":"48a6e568-638f-44ec-923b-3e8d1ccc1ac3","etag":10,"properties":{"displayName":"test","requestDateTime":"2019-11-12T20:34:05.4163107Z","createdDateTime":"2019-11-12T20:37:56.2529473Z","expiryDate":"2020-11-12","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/48a6e568-638f-44ec-923b-3e8d1ccc1ac3/reservations/8bf473f8-da85-45a7-93eb-ac8ede7f805e"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/13c2133e-9d20-4908-8def-965b521bf9b7","type":"Microsoft.Capacity/reservationOrders","name":"13c2133e-9d20-4908-8def-965b521bf9b7","etag":11,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-22T21:58:34.933665Z","createdDateTime":"2019-08-22T22:01:34.3236568Z","expiryDate":"2020-08-22","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/13c2133e-9d20-4908-8def-965b521bf9b7/reservations/7bac8a25-5e0b-494e-9caa-fdaca8ba3e81"},{"id":"/providers/microsoft.capacity/reservationOrders/13c2133e-9d20-4908-8def-965b521bf9b7/reservations/77a94134-8b8c-4a2f-99e6-3d2e4e7fe58d"},{"id":"/providers/microsoft.capacity/reservationOrders/13c2133e-9d20-4908-8def-965b521bf9b7/reservations/a32ff0b5-880a-41f9-bae1-a44ec57f0342"},{"id":"/providers/microsoft.capacity/reservationOrders/13c2133e-9d20-4908-8def-965b521bf9b7/reservations/c0162157-1fd8-43a2-9586-2a60a08e489d"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/37fdc3cd-7016-4711-9bb9-c8976367197a","type":"Microsoft.Capacity/reservationOrders","name":"37fdc3cd-7016-4711-9bb9-c8976367197a","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-23T00:15:12.1467446Z","createdDateTime":"2019-08-23T00:18:32.8816156Z","expiryDate":"2020-08-23","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/37fdc3cd-7016-4711-9bb9-c8976367197a/reservations/3e057dff-a282-4ee9-8875-a59cf63a4bfc"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/3cab1ae4-be03-4e9a-bb7a-d93aef1a1414","type":"Microsoft.Capacity/reservationOrders","name":"3cab1ae4-be03-4e9a-bb7a-d93aef1a1414","etag":10,"properties":{"displayName":"KG_1010_Upfront_To_Monthly","requestDateTime":"2019-10-10T21:09:53.2525116Z","createdDateTime":"2019-10-10T21:12:43.2353492Z","expiryDate":"2020-10-10","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/3cab1ae4-be03-4e9a-bb7a-d93aef1a1414/reservations/f06922af-fe8d-4c6d-be0f-46dda44602cf"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/086641e5-3de5-41a3-acdd-1ca40b1e88f1","type":"Microsoft.Capacity/reservationOrders","name":"086641e5-3de5-41a3-acdd-1ca40b1e88f1","etag":10,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-10-28T04:19:58.8463652Z","createdDateTime":"2019-10-28T04:22:58.3271351Z","expiryDate":"2020-10-28","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/086641e5-3de5-41a3-acdd-1ca40b1e88f1/reservations/f1041f4f-7cef-4903-811e-4a83bb290476"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/07c6527f-e939-4fa0-b16c-c85dabcc4a7f","type":"Microsoft.Capacity/reservationOrders","name":"07c6527f-e939-4fa0-b16c-c85dabcc4a7f","etag":10,"properties":{"displayName":"test","requestDateTime":"2019-11-14T04:08:14.0050711Z","createdDateTime":"2019-11-14T04:12:15.6539671Z","expiryDate":"2020-11-14","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/07c6527f-e939-4fa0-b16c-c85dabcc4a7f/reservations/4eb7a075-b86f-45d2-94c0-8658c60cd7ad"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/1452f498-9d08-4ade-b56b-0cc1763035e8","type":"Microsoft.Capacity/reservationOrders","name":"1452f498-9d08-4ade-b56b-0cc1763035e8","etag":31,"properties":{"displayName":"KG_Monthly_To_Monthly_renewed","requestDateTime":"2019-10-14T18:39:44.9762827Z","createdDateTime":"2019-10-14T18:42:51.9890346Z","expiryDate":"2020-10-14","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/1452f498-9d08-4ade-b56b-0cc1763035e8/reservations/09a18ca8-d55b-46b9-a314-47bfd72b7aa3"}],"originalQuantity":2,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/403262a8-bb2e-4469-8cb3-6123eae5ee02","type":"Microsoft.Capacity/reservationOrders","name":"403262a8-bb2e-4469-8cb3-6123eae5ee02","etag":10,"properties":{"displayName":"powershellTEST","requestDateTime":"2019-11-08T00:04:04.7098115Z","createdDateTime":"2019-11-08T00:07:49.0723815Z","expiryDate":"2022-11-08","term":"P3Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/403262a8-bb2e-4469-8cb3-6123eae5ee02/reservations/7bc73e45-d0b9-42e0-b8c7-468547728f51"}],"originalQuantity":2,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/0dc0d697-97d8-4546-87eb-7ae8a84c286c","type":"Microsoft.Capacity/reservationOrders","name":"0dc0d697-97d8-4546-87eb-7ae8a84c286c","etag":11,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-23T02:45:09.4249763Z","createdDateTime":"2019-08-23T02:47:54.3426796Z","expiryDate":"2020-08-23","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/0dc0d697-97d8-4546-87eb-7ae8a84c286c/reservations/d5b53ddf-f577-43b0-8f82-5c48fbdf951d"},{"id":"/providers/microsoft.capacity/reservationOrders/0dc0d697-97d8-4546-87eb-7ae8a84c286c/reservations/cea65a91-8e97-4c34-b63c-78ecc65489cf"},{"id":"/providers/microsoft.capacity/reservationOrders/0dc0d697-97d8-4546-87eb-7ae8a84c286c/reservations/fe659055-dc89-40b9-8ed2-f2f90d974c02"},{"id":"/providers/microsoft.capacity/reservationOrders/0dc0d697-97d8-4546-87eb-7ae8a84c286c/reservations/4dea68ba-1fea-4a62-9291-55d615cbfee0"}],"originalQuantity":3,"billingPlan":"Upfront"}}],"nextLink":"https://management.azure.com/providers/Microsoft.Capacity/reservationOrders?api-version=2022-03-01&%24skiptoken=eyJyZyI6IjRjMDNmN2VlLTYxN2ItNDZkNC05YWJmLWJjMTdhZTMwOTZiOSIsImlnIjpudWxsLCJzdCI6bnVsbH0%3d"}' + headers: + cache-control: + - no-cache + content-length: + - '26841' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation-order list + Connection: + - keep-alive + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders?api-version=2022-03-01&%24skiptoken=eyJyZyI6IjRjMDNmN2VlLTYxN2ItNDZkNC05YWJmLWJjMTdhZTMwOTZiOSIsImlnIjpudWxsLCJzdCI6bnVsbH0%3d + response: + body: + string: '{"value":[{"id":"/providers/microsoft.capacity/reservationOrders/5af652ab-8a38-4821-a88d-9f552037fd86","type":"Microsoft.Capacity/reservationOrders","name":"5af652ab-8a38-4821-a88d-9f552037fd86","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-22T23:00:27.5623654Z","createdDateTime":"2019-08-22T23:03:20.0346385Z","expiryDate":"2020-08-22","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/5af652ab-8a38-4821-a88d-9f552037fd86/reservations/5c24d4c1-6711-45af-b7c2-fb3250b7ade5"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/9066e49b-f7a6-4a57-95e3-47cdcb039d7e","type":"Microsoft.Capacity/reservationOrders","name":"9066e49b-f7a6-4a57-95e3-47cdcb039d7e","etag":11,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-29T18:30:00.9351791Z","createdDateTime":"2019-08-29T18:32:38.171893Z","expiryDate":"2020-08-29","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/9066e49b-f7a6-4a57-95e3-47cdcb039d7e/reservations/d489ca6b-3ecf-415b-bcc0-cbee2eff0096"},{"id":"/providers/microsoft.capacity/reservationOrders/9066e49b-f7a6-4a57-95e3-47cdcb039d7e/reservations/2bbabdca-39fe-4631-9324-fa4b4669fe40"},{"id":"/providers/microsoft.capacity/reservationOrders/9066e49b-f7a6-4a57-95e3-47cdcb039d7e/reservations/b71866fb-d3ef-428a-ae09-8b402552aa51"},{"id":"/providers/microsoft.capacity/reservationOrders/9066e49b-f7a6-4a57-95e3-47cdcb039d7e/reservations/59d0ff87-5223-42cc-8383-8818d1fcf7dc"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/ba84276f-2f1b-40d1-b007-5610d4e6d1ac","type":"Microsoft.Capacity/reservationOrders","name":"ba84276f-2f1b-40d1-b007-5610d4e6d1ac","etag":11,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-10-01T20:00:00.2393091Z","createdDateTime":"2019-10-01T20:03:52.9479888Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/ba84276f-2f1b-40d1-b007-5610d4e6d1ac/reservations/16a41cff-199b-451d-824e-3c44d2f3bd4b"},{"id":"/providers/microsoft.capacity/reservationOrders/ba84276f-2f1b-40d1-b007-5610d4e6d1ac/reservations/85c0408c-295a-4040-a113-af842bf085a1"},{"id":"/providers/microsoft.capacity/reservationOrders/ba84276f-2f1b-40d1-b007-5610d4e6d1ac/reservations/c473ed8a-3957-4725-89b4-6379367d7830"},{"id":"/providers/microsoft.capacity/reservationOrders/ba84276f-2f1b-40d1-b007-5610d4e6d1ac/reservations/2f4faae9-22fd-46fd-9c9f-580d620daf5d"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/ab56a47c-fd1d-4381-b0c2-132f44207ce6","type":"Microsoft.Capacity/reservationOrders","name":"ab56a47c-fd1d-4381-b0c2-132f44207ce6","etag":10,"properties":{"displayName":"test","requestDateTime":"2019-11-14T22:50:54.2452939Z","createdDateTime":"2019-11-14T22:54:00.875327Z","expiryDate":"2020-11-14","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/ab56a47c-fd1d-4381-b0c2-132f44207ce6/reservations/f538aa56-3f3b-4c79-b02c-f618bfbfc0ad"}],"originalQuantity":2,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/5150cce6-dd14-4ddf-8620-52bdc9860747","type":"Microsoft.Capacity/reservationOrders","name":"5150cce6-dd14-4ddf-8620-52bdc9860747","etag":10,"properties":{"displayName":"VM_RI_10-26-2019_11-30","requestDateTime":"2019-10-26T18:30:31.2626888Z","createdDateTime":"2019-10-26T18:33:54.3947829Z","expiryDate":"2020-10-26","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/5150cce6-dd14-4ddf-8620-52bdc9860747/reservations/22cfb766-cc8f-4d2c-a923-d4dfe34c677f"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/5f47bc68-c4dc-465c-8ccf-59a60155821e","type":"Microsoft.Capacity/reservationOrders","name":"5f47bc68-c4dc-465c-8ccf-59a60155821e","etag":8,"properties":{"displayName":"VirtualMachines_Reservation_07-09-2019_15-05","requestDateTime":"2019-07-09T22:05:26.0363936Z","createdDateTime":"2019-07-09T22:08:08.0303589Z","expiryDate":"2020-07-09","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/5f47bc68-c4dc-465c-8ccf-59a60155821e/reservations/152b415c-a638-4a7d-a349-05fd30ae36f1"}],"originalQuantity":2,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/97460b12-886c-4388-ac53-43740663802b","type":"Microsoft.Capacity/reservationOrders","name":"97460b12-886c-4388-ac53-43740663802b","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-22T21:53:18.7477069Z","createdDateTime":"2019-08-22T21:56:09.9221741Z","expiryDate":"2020-08-22","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/97460b12-886c-4388-ac53-43740663802b/reservations/f794cd23-12c3-43db-ba6b-a5355bf348bb"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/84586bd7-adae-4f62-b87f-b5a36c219d44","type":"Microsoft.Capacity/reservationOrders","name":"84586bd7-adae-4f62-b87f-b5a36c219d44","etag":11,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-22T22:54:11.9358418Z","createdDateTime":"2019-08-22T22:57:02.1304534Z","expiryDate":"2020-08-22","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/84586bd7-adae-4f62-b87f-b5a36c219d44/reservations/35cb820d-b3a6-4bb5-9ba9-a10cdbac458f"},{"id":"/providers/microsoft.capacity/reservationOrders/84586bd7-adae-4f62-b87f-b5a36c219d44/reservations/aa6e5fdc-2717-4676-bf0b-7744a30fa873"},{"id":"/providers/microsoft.capacity/reservationOrders/84586bd7-adae-4f62-b87f-b5a36c219d44/reservations/fd96ca7a-1559-463d-a6e0-68ef98aef3a6"},{"id":"/providers/microsoft.capacity/reservationOrders/84586bd7-adae-4f62-b87f-b5a36c219d44/reservations/0ba68adc-0aae-4ca9-963f-17f97bec6893"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/5a8109f2-0b2f-49f3-9b2c-2db32934b5c3","type":"Microsoft.Capacity/reservationOrders","name":"5a8109f2-0b2f-49f3-9b2c-2db32934b5c3","etag":11,"properties":{"displayName":"TestPurchaseBillingPlanReservation","requestDateTime":"2019-10-01T21:24:15.7504479Z","createdDateTime":"2019-10-01T21:27:18.0254241Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/5a8109f2-0b2f-49f3-9b2c-2db32934b5c3/reservations/f7f0167e-a66b-44d4-ad74-fcbe570e53bc"}],"originalQuantity":3,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/5097858c-9ee1-4e1f-9115-e778bc9f07f8","type":"Microsoft.Capacity/reservationOrders","name":"5097858c-9ee1-4e1f-9115-e778bc9f07f8","etag":11,"properties":{"displayName":"VirtualMachines_Reservation_07-09-2019_15-57","requestDateTime":"2019-07-09T22:57:52.0232523Z","createdDateTime":"2019-07-09T23:00:57.8324106Z","expiryDate":"2020-07-09","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/5097858c-9ee1-4e1f-9115-e778bc9f07f8/reservations/989e74b1-4b0e-4ba9-ad06-4cca82c92a94"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/8311a3fe-d6c2-45ac-ac10-e8d3763118b6","type":"Microsoft.Capacity/reservationOrders","name":"8311a3fe-d6c2-45ac-ac10-e8d3763118b6","etag":9,"properties":{"displayName":"Databricks_Plan_10-31-2019_11-16","requestDateTime":"2019-10-31T20:07:47.6491939Z","createdDateTime":"2019-10-31T20:10:52.9968102Z","expiryDate":"2020-10-31","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/8311a3fe-d6c2-45ac-ac10-e8d3763118b6/reservations/da7db304-f3d3-49d1-814d-e25f773474e0"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/b5495df6-64c7-42ca-b8ac-adac526a7486","type":"Microsoft.Capacity/reservationOrders","name":"b5495df6-64c7-42ca-b8ac-adac526a7486","etag":9,"properties":{"displayName":"RedHatOsa_Reservation_08-07-2019_13-59","requestDateTime":"2019-08-07T21:00:20.0016079Z","createdDateTime":"2019-08-07T21:03:02.9007671Z","expiryDate":"2020-08-07","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/b5495df6-64c7-42ca-b8ac-adac526a7486/reservations/873ff085-3003-4a29-a7f4-ea8f8a2023fa"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/6dbddcad-2aa5-4305-8429-4a0c6f31b869","type":"Microsoft.Capacity/reservationOrders","name":"6dbddcad-2aa5-4305-8429-4a0c6f31b869","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-23T17:59:49.5123225Z","createdDateTime":"2019-08-23T18:03:31.8207727Z","expiryDate":"2020-08-23","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/6dbddcad-2aa5-4305-8429-4a0c6f31b869/reservations/9cb178f6-774a-42f7-be45-4b2d7de6e815"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/5d9b905b-fffc-45b5-b4d3-6d7517d931b4","type":"Microsoft.Capacity/reservationOrders","name":"5d9b905b-fffc-45b5-b4d3-6d7517d931b4","etag":11,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-10T23:47:53.1687412Z","createdDateTime":"2019-09-10T23:51:12.0799645Z","expiryDate":"2020-09-10","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/5d9b905b-fffc-45b5-b4d3-6d7517d931b4/reservations/eca08156-c381-442f-a09c-79fca8d00ab1"},{"id":"/providers/microsoft.capacity/reservationOrders/5d9b905b-fffc-45b5-b4d3-6d7517d931b4/reservations/ebbbea78-e984-4bd1-b93d-e81b80cd3ba7"},{"id":"/providers/microsoft.capacity/reservationOrders/5d9b905b-fffc-45b5-b4d3-6d7517d931b4/reservations/92931e4c-865b-4f57-a8a8-dde0a6c63ecb"},{"id":"/providers/microsoft.capacity/reservationOrders/5d9b905b-fffc-45b5-b4d3-6d7517d931b4/reservations/182d43f8-8788-4a1a-a38a-b81650cb3df9"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/9a48675e-e8b8-423e-9dea-bf37034b8201","type":"Microsoft.Capacity/reservationOrders","name":"9a48675e-e8b8-423e-9dea-bf37034b8201","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-12T21:15:15.072668Z","createdDateTime":"2019-09-12T21:18:01.1267221Z","expiryDate":"2020-09-12","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/9a48675e-e8b8-423e-9dea-bf37034b8201/reservations/31b20f82-9120-49b8-a7c2-73f414e60a03"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/53f2a7dd-04ba-4354-afa8-68301b2d3d28","type":"Microsoft.Capacity/reservationOrders","name":"53f2a7dd-04ba-4354-afa8-68301b2d3d28","etag":10,"properties":{"displayName":"test","requestDateTime":"2019-11-14T20:37:59.4701894Z","createdDateTime":"2019-11-14T20:41:32.0872378Z","expiryDate":"2020-11-14","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/53f2a7dd-04ba-4354-afa8-68301b2d3d28/reservations/0b45da26-4443-418e-a273-5b9eba12a416"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/a27a814f-62e2-4049-afce-fd882f202ab4","type":"Microsoft.Capacity/reservationOrders","name":"a27a814f-62e2-4049-afce-fd882f202ab4","etag":11,"properties":{"displayName":"test","requestDateTime":"2019-11-15T04:59:34.2052331Z","createdDateTime":"2019-11-15T05:02:43.910484Z","expiryDate":"2020-11-15","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/a27a814f-62e2-4049-afce-fd882f202ab4/reservations/d59bf844-033a-42f7-848b-a240dc511dca"}],"originalQuantity":2,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/a2ddfa74-86a0-4f0e-a266-138ce7ab9386","type":"Microsoft.Capacity/reservationOrders","name":"a2ddfa74-86a0-4f0e-a266-138ce7ab9386","etag":32,"properties":{"displayName":"KG_Monthly_To_Upfront","requestDateTime":"2019-10-14T17:59:59.4407588Z","createdDateTime":"2019-10-14T18:03:04.4261959Z","expiryDate":"2020-10-14","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/a2ddfa74-86a0-4f0e-a266-138ce7ab9386/reservations/b9bbcc53-36bd-4641-872e-fa74902d56ac"}],"originalQuantity":1,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/6dd11294-22bc-4df0-83ad-2ef176ad364f","type":"Microsoft.Capacity/reservationOrders","name":"6dd11294-22bc-4df0-83ad-2ef176ad364f","etag":32,"properties":{"displayName":"KG_Monthly_To_Monthly","requestDateTime":"2019-10-14T18:06:28.3897635Z","createdDateTime":"2019-10-14T18:09:57.5432426Z","expiryDate":"2020-10-14","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/6dd11294-22bc-4df0-83ad-2ef176ad364f/reservations/eaaaf4e7-bd64-4af4-bd63-1297e7cf1fd6"}],"originalQuantity":1,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/b9fbc5c6-fa93-4c1d-b7dc-81a786af5813","type":"Microsoft.Capacity/reservationOrders","name":"b9fbc5c6-fa93-4c1d-b7dc-81a786af5813","etag":10,"properties":{"displayName":"powershellTest","requestDateTime":"2019-11-08T23:02:33.1389991Z","createdDateTime":"2019-11-08T23:06:17.1237837Z","expiryDate":"2022-11-08","term":"P3Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/b9fbc5c6-fa93-4c1d-b7dc-81a786af5813/reservations/d42d1cd5-9ea9-4a93-b3ca-c50a2ab0c0b9"}],"originalQuantity":2,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/6e3cfe3f-ff47-4793-9d19-ebf1fd8c69cd","type":"Microsoft.Capacity/reservationOrders","name":"6e3cfe3f-ff47-4793-9d19-ebf1fd8c69cd","etag":9,"properties":{"displayName":"KG_1010_Upfront_To_Upfront_renewed","requestDateTime":"2019-10-10T21:53:31.143491Z","createdDateTime":"2019-10-10T21:58:55.1639804Z","expiryDate":"2020-10-10","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/6e3cfe3f-ff47-4793-9d19-ebf1fd8c69cd/reservations/e50a1e31-2d71-4d80-93c7-974462177833"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/7ec328e0-0312-4d3c-841b-b5e4d032a43c","type":"Microsoft.Capacity/reservationOrders","name":"7ec328e0-0312-4d3c-841b-b5e4d032a43c","etag":13,"properties":{"displayName":"TestPurchaseBillingPlanReservation","requestDateTime":"2019-10-01T21:29:03.0526386Z","createdDateTime":"2019-10-01T21:32:22.4629501Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/7ec328e0-0312-4d3c-841b-b5e4d032a43c/reservations/f1a4ad8d-a8dd-41ec-a1de-ddb656843503"},{"id":"/providers/microsoft.capacity/reservationOrders/7ec328e0-0312-4d3c-841b-b5e4d032a43c/reservations/84548dbf-70de-4889-b328-048f6b448cda"},{"id":"/providers/microsoft.capacity/reservationOrders/7ec328e0-0312-4d3c-841b-b5e4d032a43c/reservations/96990596-4aad-413a-b4b2-8bfb10800112"},{"id":"/providers/microsoft.capacity/reservationOrders/7ec328e0-0312-4d3c-841b-b5e4d032a43c/reservations/65d0c88e-f940-464b-bdf9-024f9ed09623"}],"originalQuantity":3,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/6cabdb81-d202-4450-834d-68a18bd52533","type":"Microsoft.Capacity/reservationOrders","name":"6cabdb81-d202-4450-834d-68a18bd52533","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-12T21:23:19.9941254Z","createdDateTime":"2019-09-12T21:26:05.6448392Z","expiryDate":"2020-09-12","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/6cabdb81-d202-4450-834d-68a18bd52533/reservations/5c06c84e-9d97-40aa-88f1-411e24ead765"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/7440222d-d419-4fe5-b05b-371b02a0bb9b","type":"Microsoft.Capacity/reservationOrders","name":"7440222d-d419-4fe5-b05b-371b02a0bb9b","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-29T19:15:17.8934833Z","createdDateTime":"2019-08-29T19:19:13.0944347Z","expiryDate":"2020-08-29","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/7440222d-d419-4fe5-b05b-371b02a0bb9b/reservations/c75b7923-903d-4c0b-b4d7-77be57edbb4f"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/9cd45f08-e1b3-43d1-a82d-27ecb595d05c","type":"Microsoft.Capacity/reservationOrders","name":"9cd45f08-e1b3-43d1-a82d-27ecb595d05c","etag":11,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-11T21:25:47.1147475Z","createdDateTime":"2019-09-11T21:28:22.563249Z","expiryDate":"2020-09-11","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/9cd45f08-e1b3-43d1-a82d-27ecb595d05c/reservations/82312545-d93b-45d5-9604-307d7425c0fb"},{"id":"/providers/microsoft.capacity/reservationOrders/9cd45f08-e1b3-43d1-a82d-27ecb595d05c/reservations/e214841c-eefa-4717-9300-115a633f95b6"},{"id":"/providers/microsoft.capacity/reservationOrders/9cd45f08-e1b3-43d1-a82d-27ecb595d05c/reservations/7bbc2007-7292-4dcc-ad6a-641e671ff6b9"},{"id":"/providers/microsoft.capacity/reservationOrders/9cd45f08-e1b3-43d1-a82d-27ecb595d05c/reservations/817817b4-bcd8-40bd-ad06-48043accb559"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/524d1614-54f3-458e-a289-692b3b54684a","type":"Microsoft.Capacity/reservationOrders","name":"524d1614-54f3-458e-a289-692b3b54684a","etag":9,"properties":{"displayName":"KG_Monthly_To_Upfront_renewed","requestDateTime":"2019-10-14T18:33:04.4953723Z","createdDateTime":"2019-10-14T18:37:51.1740078Z","expiryDate":"2020-10-14","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/524d1614-54f3-458e-a289-692b3b54684a/reservations/86a969a7-3841-45b1-84cc-44190a10584d"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/6e237208-5ddd-401a-b59a-519b062b6ab8","type":"Microsoft.Capacity/reservationOrders","name":"6e237208-5ddd-401a-b59a-519b062b6ab8","etag":14,"properties":{"displayName":"VM_RI_10-25-2019_07-58","requestDateTime":"2019-10-25T14:58:48.9506473Z","createdDateTime":"2019-10-25T15:02:40.7184387Z","expiryDate":"2020-10-25","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/6e237208-5ddd-401a-b59a-519b062b6ab8/reservations/8cf058eb-e73f-4499-9276-edad2de713d5"},{"id":"/providers/microsoft.capacity/reservationOrders/6e237208-5ddd-401a-b59a-519b062b6ab8/reservations/2234f94a-4c59-4608-97c8-e4a83052577c"},{"id":"/providers/microsoft.capacity/reservationOrders/6e237208-5ddd-401a-b59a-519b062b6ab8/reservations/82f79724-161f-4509-8740-d835d60ae6e0"},{"id":"/providers/microsoft.capacity/reservationOrders/6e237208-5ddd-401a-b59a-519b062b6ab8/reservations/16b5fa9f-0706-4e3f-847b-5255853cb514"}],"originalQuantity":2,"billingPlan":"Monthly"}}],"nextLink":"https://management.azure.com/providers/Microsoft.Capacity/reservationOrders?api-version=2022-03-01&%24skiptoken=eyJyZyI6ImJiMWVlN2FiLTRlMzEtNDEyNC04YWEwLWExN2QwZjNiZWFkNyIsImlnIjpudWxsLCJzdCI6bnVsbH0%3d"}' + headers: + cache-control: + - no-cache + content-length: + - '20169' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation-order list + Connection: + - keep-alive + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders?api-version=2022-03-01&%24skiptoken=eyJyZyI6ImJiMWVlN2FiLTRlMzEtNDEyNC04YWEwLWExN2QwZjNiZWFkNyIsImlnIjpudWxsLCJzdCI6bnVsbH0%3d + response: + body: + string: '{"value":[{"id":"/providers/microsoft.capacity/reservationOrders/e742d109-1e57-4054-b9d3-dd18548a0256","type":"Microsoft.Capacity/reservationOrders","name":"e742d109-1e57-4054-b9d3-dd18548a0256","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-22T22:45:09.1460424Z","createdDateTime":"2019-08-22T22:48:13.1891572Z","expiryDate":"2020-08-22","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/e742d109-1e57-4054-b9d3-dd18548a0256/reservations/75cc912f-bc4b-4ac3-8812-439c44a34455"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/d983fd17-f9d5-4990-8a28-067d9368c5fd","type":"Microsoft.Capacity/reservationOrders","name":"d983fd17-f9d5-4990-8a28-067d9368c5fd","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-23T02:19:43.2482715Z","createdDateTime":"2019-08-23T02:23:09.3129833Z","expiryDate":"2020-08-23","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/d983fd17-f9d5-4990-8a28-067d9368c5fd/reservations/dfac805d-e0f8-423b-8b5d-52ace715c105"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/eae108d9-a71c-47e2-9bc8-7902663db5f1","type":"Microsoft.Capacity/reservationOrders","name":"eae108d9-a71c-47e2-9bc8-7902663db5f1","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-12T00:41:10.0256748Z","createdDateTime":"2019-09-12T00:44:00.7980911Z","expiryDate":"2020-09-12","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/eae108d9-a71c-47e2-9bc8-7902663db5f1/reservations/87643fa2-a17b-4503-8820-8fa267edf75b"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/f0400cad-33cf-4867-a9c3-0ef6b558d163","type":"Microsoft.Capacity/reservationOrders","name":"f0400cad-33cf-4867-a9c3-0ef6b558d163","etag":11,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-10-01T19:38:30.6097304Z","createdDateTime":"2019-10-01T19:41:37.8710149Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/f0400cad-33cf-4867-a9c3-0ef6b558d163/reservations/65b6c210-6427-4357-90ec-c3fc6b7358bc"},{"id":"/providers/microsoft.capacity/reservationOrders/f0400cad-33cf-4867-a9c3-0ef6b558d163/reservations/e87e99bf-14fc-47c3-95be-934a47b0979b"},{"id":"/providers/microsoft.capacity/reservationOrders/f0400cad-33cf-4867-a9c3-0ef6b558d163/reservations/b439bc63-7f01-4e06-8057-26fb31b72c3d"},{"id":"/providers/microsoft.capacity/reservationOrders/f0400cad-33cf-4867-a9c3-0ef6b558d163/reservations/e38480fa-5250-4b7f-b9b3-905905b76438"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/f311bbb7-9010-4327-a4cb-81efc96850e0","type":"Microsoft.Capacity/reservationOrders","name":"f311bbb7-9010-4327-a4cb-81efc96850e0","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-23T00:38:43.6629089Z","createdDateTime":"2019-08-23T00:42:02.9491229Z","expiryDate":"2020-08-23","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/f311bbb7-9010-4327-a4cb-81efc96850e0/reservations/87e3cc4e-c5aa-4be1-a7d7-c5a2b22bec67"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/f1c36fc4-8b11-4125-a90c-548ad1a45d0b","type":"Microsoft.Capacity/reservationOrders","name":"f1c36fc4-8b11-4125-a90c-548ad1a45d0b","etag":9,"properties":{"displayName":"switzerlandtesting","requestDateTime":"2019-09-05T19:09:53.1356456Z","createdDateTime":"2019-09-05T19:12:47.6627356Z","expiryDate":"2020-09-05","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/f1c36fc4-8b11-4125-a90c-548ad1a45d0b/reservations/2b607986-d214-411e-95d1-35097219ee78"}],"originalQuantity":2,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/c39c8099-79d1-430f-bc57-23616364ff2a","type":"Microsoft.Capacity/reservationOrders","name":"c39c8099-79d1-430f-bc57-23616364ff2a","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-11T21:55:48.368349Z","createdDateTime":"2019-09-11T21:59:20.2117281Z","expiryDate":"2020-09-11","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/c39c8099-79d1-430f-bc57-23616364ff2a/reservations/a304fa74-e3fa-4f72-81e8-522dc8125997"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/ef1a86ba-457b-4251-bc2e-d2935c0bfa0e","type":"Microsoft.Capacity/reservationOrders","name":"ef1a86ba-457b-4251-bc2e-d2935c0bfa0e","etag":31,"properties":{"displayName":"KG_1010_Upfront_To_Monthly_renewed","requestDateTime":"2019-10-10T21:42:57.1199983Z","createdDateTime":"2019-10-10T21:46:37.4579801Z","expiryDate":"2020-10-10","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/ef1a86ba-457b-4251-bc2e-d2935c0bfa0e/reservations/c5303a78-bdc7-45c5-9629-c30037e2ac9d"}],"originalQuantity":2,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/ed1f18ea-192e-4e83-8ed0-a4cba7efdbd9","type":"Microsoft.Capacity/reservationOrders","name":"ed1f18ea-192e-4e83-8ed0-a4cba7efdbd9","etag":9,"properties":{"displayName":"PowershellTest","requestDateTime":"2019-11-08T22:57:15.1879572Z","term":"P3Y","provisioningState":"Failed","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/ed1f18ea-192e-4e83-8ed0-a4cba7efdbd9/reservations/434e8f56-66ac-41f3-930c-6d3a8e89abaa"}],"originalQuantity":2,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/c9eff5a5-69ec-4017-aec7-cccee1ec945c","type":"Microsoft.Capacity/reservationOrders","name":"c9eff5a5-69ec-4017-aec7-cccee1ec945c","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-11T21:53:28.9527085Z","createdDateTime":"2019-09-11T21:56:44.5363963Z","expiryDate":"2020-09-11","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/c9eff5a5-69ec-4017-aec7-cccee1ec945c/reservations/759c0e52-a60b-4e3e-81ef-70d6ea505d02"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/ddc21f31-8ec3-4ecb-a6db-d9c4fa0f1d4d","type":"Microsoft.Capacity/reservationOrders","name":"ddc21f31-8ec3-4ecb-a6db-d9c4fa0f1d4d","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-08-22T21:48:52.7642723Z","createdDateTime":"2019-08-22T21:52:38.3462618Z","expiryDate":"2020-08-22","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/ddc21f31-8ec3-4ecb-a6db-d9c4fa0f1d4d/reservations/b6057a29-616a-4dc6-a88e-398afc580899"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/d645bf91-149b-46e2-b331-38fa66595842","type":"Microsoft.Capacity/reservationOrders","name":"d645bf91-149b-46e2-b331-38fa66595842","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-12T00:33:56.7450205Z","createdDateTime":"2019-09-12T00:37:24.3103463Z","expiryDate":"2020-09-12","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/d645bf91-149b-46e2-b331-38fa66595842/reservations/d073f433-5e8b-475c-b2cd-5fd2ee8b2469"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/cfba07d6-dd12-48c9-a3ae-fbd593b26468","type":"Microsoft.Capacity/reservationOrders","name":"cfba07d6-dd12-48c9-a3ae-fbd593b26468","etag":10,"properties":{"displayName":"KG_1010_Upfront_To_Upfront","requestDateTime":"2019-10-10T21:20:40.3940629Z","createdDateTime":"2019-10-10T21:24:11.0029526Z","expiryDate":"2020-10-10","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/cfba07d6-dd12-48c9-a3ae-fbd593b26468/reservations/31fbb4a2-744a-4aaa-95b0-811083af9f59"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/d828b714-cf82-459a-97b7-079747fd772c","type":"Microsoft.Capacity/reservationOrders","name":"d828b714-cf82-459a-97b7-079747fd772c","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-30T20:44:48.8366447Z","createdDateTime":"2019-09-30T20:48:39.855354Z","expiryDate":"2020-09-30","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/d828b714-cf82-459a-97b7-079747fd772c/reservations/371c8e00-5766-4cc6-b482-4f78edf94e5f"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/fe1341ea-4820-4ac9-9352-4136a6d8a252","type":"Microsoft.Capacity/reservationOrders","name":"fe1341ea-4820-4ac9-9352-4136a6d8a252","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-10-01T17:36:20.7641845Z","createdDateTime":"2019-10-01T17:39:48.5824714Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/fe1341ea-4820-4ac9-9352-4136a6d8a252/reservations/8e5963e2-000b-45bd-a1b4-305c9e5f89c9"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/cfc4c7a8-8d39-45f8-b37b-ee7f6502a366","type":"Microsoft.Capacity/reservationOrders","name":"cfc4c7a8-8d39-45f8-b37b-ee7f6502a366","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-12T00:57:22.8723406Z","createdDateTime":"2019-09-12T01:00:55.1086806Z","expiryDate":"2020-09-12","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/cfc4c7a8-8d39-45f8-b37b-ee7f6502a366/reservations/37978943-0e78-4331-9f88-c37ff51d7f7f"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/ff3d6f81-2bea-4d59-b205-85e9effd8c1a","type":"Microsoft.Capacity/reservationOrders","name":"ff3d6f81-2bea-4d59-b205-85e9effd8c1a","etag":11,"properties":{"displayName":"TestPurchaseBillingPlanReservation","requestDateTime":"2019-10-01T21:21:05.0724227Z","createdDateTime":"2019-10-01T21:24:32.4850277Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/ff3d6f81-2bea-4d59-b205-85e9effd8c1a/reservations/939f13e5-1c2c-42d4-af83-d86bbd0b7be7"}],"originalQuantity":3,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/c01a66ab-5306-44f5-aa7b-ed7b45d92bf9","type":"Microsoft.Capacity/reservationOrders","name":"c01a66ab-5306-44f5-aa7b-ed7b45d92bf9","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-10-01T19:07:30.7644941Z","createdDateTime":"2019-10-01T19:10:45.077275Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/c01a66ab-5306-44f5-aa7b-ed7b45d92bf9/reservations/be1c1f70-d486-4387-af5e-17a0a0101006"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/f69322db-c12b-4584-98dc-62da61f86cdc","type":"Microsoft.Capacity/reservationOrders","name":"f69322db-c12b-4584-98dc-62da61f86cdc","etag":10,"properties":{"displayName":"test","requestDateTime":"2019-11-14T22:15:40.5643005Z","createdDateTime":"2019-11-14T22:18:45.6216056Z","expiryDate":"2020-11-14","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/f69322db-c12b-4584-98dc-62da61f86cdc/reservations/76aeeaef-fa6f-493b-b7c3-4d1716b18047"}],"originalQuantity":2,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/fdef0d1f-2d3c-402e-9feb-80019f5ae145","type":"Microsoft.Capacity/reservationOrders","name":"fdef0d1f-2d3c-402e-9feb-80019f5ae145","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-11T21:48:25.581097Z","createdDateTime":"2019-09-11T21:51:20.5975933Z","expiryDate":"2020-09-11","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/fdef0d1f-2d3c-402e-9feb-80019f5ae145/reservations/9c4539e5-4cdf-487a-a64f-49292749d0f9"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/f511a846-907c-486e-b870-a6be48e050a4","type":"Microsoft.Capacity/reservationOrders","name":"f511a846-907c-486e-b870-a6be48e050a4","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-09-12T00:05:50.7298855Z","createdDateTime":"2019-09-12T00:09:07.2539601Z","expiryDate":"2020-09-12","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/f511a846-907c-486e-b870-a6be48e050a4/reservations/93e72ea6-9388-4819-8c9c-807858ba4fad"}],"originalQuantity":3,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/bb1ee7ab-4e31-4124-8aa0-a17d0f3bead7","type":"Microsoft.Capacity/reservationOrders","name":"bb1ee7ab-4e31-4124-8aa0-a17d0f3bead7","etag":13,"properties":{"displayName":"TestPurchaseBillingPlanReservation","requestDateTime":"2019-10-01T23:40:28.4510197Z","createdDateTime":"2019-10-01T23:43:19.627865Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/bb1ee7ab-4e31-4124-8aa0-a17d0f3bead7/reservations/d9904914-5fa0-4780-95d8-50e3984159a7"},{"id":"/providers/microsoft.capacity/reservationOrders/bb1ee7ab-4e31-4124-8aa0-a17d0f3bead7/reservations/3eb523ff-8665-4919-85b8-0573f1c637c1"},{"id":"/providers/microsoft.capacity/reservationOrders/bb1ee7ab-4e31-4124-8aa0-a17d0f3bead7/reservations/08756b76-2d9d-4a36-8bc3-54aa48243bf2"},{"id":"/providers/microsoft.capacity/reservationOrders/bb1ee7ab-4e31-4124-8aa0-a17d0f3bead7/reservations/89becc12-9893-40c5-b5ab-4036c0053de6"}],"originalQuantity":3,"billingPlan":"Monthly"}},{"id":"/providers/microsoft.capacity/reservationOrders/e092ef40-ec56-4492-8835-80615fa79dce","type":"Microsoft.Capacity/reservationOrders","name":"e092ef40-ec56-4492-8835-80615fa79dce","etag":10,"properties":{"displayName":"test","requestDateTime":"2019-11-14T23:06:37.0770243Z","createdDateTime":"2019-11-14T23:10:44.3124393Z","expiryDate":"2020-11-14","term":"P1Y","provisioningState":"Cancelled","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/e092ef40-ec56-4492-8835-80615fa79dce/reservations/a1c827a8-991c-464f-91e4-875aca3bc7e3"}],"originalQuantity":2,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/f83755e0-cbcc-4dd6-a381-cd1022e9374f","type":"Microsoft.Capacity/reservationOrders","name":"f83755e0-cbcc-4dd6-a381-cd1022e9374f","etag":9,"properties":{"displayName":"SelfServiceExchange_0709","requestDateTime":"2019-07-09T23:03:11.7079521Z","createdDateTime":"2019-07-09T23:09:43.4806781Z","expiryDate":"2020-07-09","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/f83755e0-cbcc-4dd6-a381-cd1022e9374f/reservations/30bfe3e2-8206-4e47-a6e4-4394847ebae4"}],"originalQuantity":1,"billingPlan":"Upfront"}},{"id":"/providers/microsoft.capacity/reservationOrders/f794f893-e8bf-40d5-9e65-9c8dc6b5f01d","type":"Microsoft.Capacity/reservationOrders","name":"f794f893-e8bf-40d5-9e65-9c8dc6b5f01d","etag":9,"properties":{"displayName":"TestPurchaseReservation","requestDateTime":"2019-10-01T17:40:39.1941797Z","createdDateTime":"2019-10-01T17:43:18.3232546Z","expiryDate":"2020-10-01","term":"P1Y","provisioningState":"Succeeded","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/f794f893-e8bf-40d5-9e65-9c8dc6b5f01d/reservations/36a18f70-61f2-4063-9f81-922f9934ef52"}],"originalQuantity":3,"billingPlan":"Upfront"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '16409' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/reservation/azext_reservation/tests/latest/recordings/test_purchase_reservation_order.yaml b/src/reservation/azext_reservation/tests/latest/recordings/test_purchase_reservation_order.yaml new file mode 100644 index 00000000000..f184fd8014b --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/recordings/test_purchase_reservation_order.yaml @@ -0,0 +1,112 @@ +interactions: +- request: + body: '{"sku": {"name": "standard_b1ls"}, "location": "westus", "properties": + {"reservedResourceType": "VirtualMachines", "billingScopeId": "d3ae48e5-dbb2-4618-afd4-fb1b8559cb80", + "term": "P1Y", "billingPlan": "Monthly", "quantity": 2, "displayName": "test", + "appliedScopeType": "Shared", "renew": false, "reservedResourceProperties": + {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation-order purchase + Connection: + - keep-alive + Content-Length: + - '332' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --reservation-order-id --sku --location --reserved-resource-type --scope --term + --billing-plan --display-name --quantity --applied-scope-type + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/d4ef7ec2-941c-4da7-8ec9-2f148255a0dc?api-version=2022-03-01 + response: + body: + string: '{"id":"/providers/microsoft.capacity/reservationOrders/d4ef7ec2-941c-4da7-8ec9-2f148255a0dc","type":"Microsoft.Capacity/reservationOrders","name":"d4ef7ec2-941c-4da7-8ec9-2f148255a0dc","etag":1,"properties":{"displayName":"test","requestDateTime":"2019-11-15T05:11:14.4056282Z","term":"P1Y","provisioningState":"Creating","reservations":[{"sku":{"name":"standard_b1ls"},"id":"/providers/microsoft.capacity/reservationOrders/d4ef7ec2-941c-4da7-8ec9-2f148255a0dc/reservations/5ccde723-b52b-4c30-9f8c-fc5de28cb396","type":"Microsoft.Capacity/reservationOrders/reservations","name":"d4ef7ec2-941c-4da7-8ec9-2f148255a0dc/5ccde723-b52b-4c30-9f8c-fc5de28cb396","etag":1,"location":"westus","properties":{"appliedScopeType":"Shared","quantity":2,"provisioningState":"Creating","displayName":"test","effectiveDateTime":"2019-11-15T05:11:14.4056282Z","lastUpdatedDateTime":"2019-11-15T05:11:14.4056282Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_B1ls, US West, 1 Year","renew":false}}],"originalQuantity":2,"billingPlan":"Monthly"}}' + headers: + cache-control: + - no-cache + content-length: + - '1097' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:11:16 GMT + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/d4ef7ec2-941c-4da7-8ec9-2f148255a0dc?api-version=2022-03-01 + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-tenant-writes: + - '1199' + x-ms-test: + - '{"contact":"kgautam","scenarios":"v6-recurrence-test,time-scale:35040,AcceleratedPayment","retention":"2/13/2020 + 5:11:01 AM"}' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation-order purchase + Connection: + - keep-alive + ParameterSetName: + - --reservation-order-id --sku --location --reserved-resource-type --scope --term + --billing-plan --display-name --quantity --applied-scope-type + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + method: GET + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/d4ef7ec2-941c-4da7-8ec9-2f148255a0dc?api-version=2022-03-01 + response: + body: + string: '{"id":"/providers/microsoft.capacity/reservationOrders/d4ef7ec2-941c-4da7-8ec9-2f148255a0dc","type":"Microsoft.Capacity/reservationOrders","name":"d4ef7ec2-941c-4da7-8ec9-2f148255a0dc","etag":5,"properties":{"displayName":"test","requestDateTime":"2019-11-15T05:11:14.4056282Z","term":"P1Y","provisioningState":"PendingCapacity","reservations":[{"id":"/providers/microsoft.capacity/reservationOrders/d4ef7ec2-941c-4da7-8ec9-2f148255a0dc/reservations/5ccde723-b52b-4c30-9f8c-fc5de28cb396"}],"originalQuantity":2,"billingPlan":"Monthly"}}' + headers: + cache-control: + - no-cache + content-length: + - '536' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:13:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/reservation/azext_reservation/tests/latest/recordings/test_split_and_merge.yaml b/src/reservation/azext_reservation/tests/latest/recordings/test_split_and_merge.yaml new file mode 100644 index 00000000000..88f0bbe5fa0 --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/recordings/test_split_and_merge.yaml @@ -0,0 +1,286 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation show + Connection: + - keep-alive + ParameterSetName: + - --reservation-order-id --reservation-id + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e?api-version=2022-03-01 + response: + body: + string: '{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/6dee7663-3e63-4115-aa4d-41e9a57f551e","etag":2,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":3,"provisioningState":"Succeeded","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T04:59:41.4709954Z","lastUpdatedDateTime":"2019-11-15T04:59:41.4709954Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/4e66c701-c495-4518-b305-68778e9b63d6","/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/aee83380-71ab-47ba-bd74-73b45531b941"]},"capabilities":"ApiReturnEnabled, + ApiExchangeEnabled","renew":false,"term":"P1Y","billingScopeId":"/subscriptions/00000000-0000-0000-0000-000000000000","billingPlan":"Upfront"}}' + headers: + cache-control: + - no-cache + content-length: + - '1298' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"quantities": [1, 2], "reservationId": "/providers/Microsoft.Capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation split + Connection: + - keep-alive + Content-Length: + - '193' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --reservation-order-id --reservation-id -1 -2 + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/split?api-version=2022-03-01 + response: + body: + string: '[{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0771cff0-f3ab-461c-8616-2cd087fe5161","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/0771cff0-f3ab-461c-8616-2cd087fe5161","etag":2,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":1,"provisioningState":"Succeeded","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:31.5961308Z","lastUpdatedDateTime":"2019-11-15T05:04:33.8151027Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitSource":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e"},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/58d17836-d8fb-4f1a-a75a-477f944db2cc","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/58d17836-d8fb-4f1a-a75a-477f944db2cc","etag":2,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":2,"provisioningState":"Succeeded","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:31.5961308Z","lastUpdatedDateTime":"2019-11-15T05:04:33.8151027Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitSource":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e"},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/6dee7663-3e63-4115-aa4d-41e9a57f551e","etag":5,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":3,"provisioningState":"Cancelled","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:31.5961308Z","extendedStatusInfo":{"statusCode":"Split","message":"This + reservation was split and is no longer active"},"lastUpdatedDateTime":"2019-11-15T05:04:33.8151027Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitDestinations":["/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0771cff0-f3ab-461c-8616-2cd087fe5161","/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/58d17836-d8fb-4f1a-a75a-477f944db2cc"]},"mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/4e66c701-c495-4518-b305-68778e9b63d6","/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/aee83380-71ab-47ba-bd74-73b45531b941"]},"renew":false}}]' + headers: + cache-control: + - no-cache + content-length: + - '3555' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:34 GMT + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.Capacity/reservationorders/0af601f3-7868-44ee-b833-4d2e64ad3d70/splitoperationresults/6dee7663-3e63-4115-aa4d-41e9a57f551e_3?api-version=2022-03-01 + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-tenant-writes: + - '1199' + x-ms-test: + - '{"contact":"kgautam","scenarios":"RITesting","retention":"12/30/2019 8:29:59 + PM"}' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation split + Connection: + - keep-alive + ParameterSetName: + - --reservation-order-id --reservation-id -1 -2 + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + method: GET + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationorders/0af601f3-7868-44ee-b833-4d2e64ad3d70/splitoperationresults/6dee7663-3e63-4115-aa4d-41e9a57f551e_3?api-version=2022-03-01 + response: + body: + string: '[{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0771cff0-f3ab-461c-8616-2cd087fe5161","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/0771cff0-f3ab-461c-8616-2cd087fe5161","etag":2,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":1,"provisioningState":"Succeeded","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:31.5961308Z","lastUpdatedDateTime":"2019-11-15T05:04:33.8151027Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitSource":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e"},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/58d17836-d8fb-4f1a-a75a-477f944db2cc","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/58d17836-d8fb-4f1a-a75a-477f944db2cc","etag":2,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":2,"provisioningState":"Succeeded","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:31.5961308Z","lastUpdatedDateTime":"2019-11-15T05:04:33.8151027Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitSource":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e"},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/6dee7663-3e63-4115-aa4d-41e9a57f551e","etag":5,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":3,"provisioningState":"Cancelled","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:31.5961308Z","extendedStatusInfo":{"statusCode":"Split","message":"This + reservation was split and is no longer active"},"lastUpdatedDateTime":"2019-11-15T05:04:33.8151027Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitDestinations":["/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0771cff0-f3ab-461c-8616-2cd087fe5161","/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/58d17836-d8fb-4f1a-a75a-477f944db2cc"]},"mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/4e66c701-c495-4518-b305-68778e9b63d6","/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/aee83380-71ab-47ba-bd74-73b45531b941"]},"renew":false}}]' + headers: + cache-control: + - no-cache + content-length: + - '3555' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"sources": ["/providers/Microsoft.Capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0771cff0-f3ab-461c-8616-2cd087fe5161", + "/providers/Microsoft.Capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/58d17836-d8fb-4f1a-a75a-477f944db2cc"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation merge + Connection: + - keep-alive + Content-Length: + - '305' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --reservation-order-id -1 -2 + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/merge?api-version=2022-03-01 + response: + body: + string: '[{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0771cff0-f3ab-461c-8616-2cd087fe5161","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/0771cff0-f3ab-461c-8616-2cd087fe5161","etag":5,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":1,"provisioningState":"Cancelled","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:48.1377265Z","extendedStatusInfo":{"statusCode":"Merged","message":"This + reservation was merged and is no longer active"},"lastUpdatedDateTime":"2019-11-15T05:04:48.1377265Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitSource":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e"},"mergeProperties":{"mergeDestination":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0dadde4b-b644-4df1-8b06-39f088e00aa5"},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/58d17836-d8fb-4f1a-a75a-477f944db2cc","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/58d17836-d8fb-4f1a-a75a-477f944db2cc","etag":4,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":2,"provisioningState":"Cancelled","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:48.1377265Z","extendedStatusInfo":{"statusCode":"Merged","message":"This + reservation was merged and is no longer active"},"lastUpdatedDateTime":"2019-11-15T05:04:48.1377265Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitSource":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e"},"mergeProperties":{"mergeDestination":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0dadde4b-b644-4df1-8b06-39f088e00aa5"},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0dadde4b-b644-4df1-8b06-39f088e00aa5","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/0dadde4b-b644-4df1-8b06-39f088e00aa5","etag":2,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":3,"provisioningState":"Succeeded","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:48.1377265Z","lastUpdatedDateTime":"2019-11-15T05:04:48.1377265Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0771cff0-f3ab-461c-8616-2cd087fe5161","/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/58d17836-d8fb-4f1a-a75a-477f944db2cc"]},"renew":false}}]' + headers: + cache-control: + - no-cache + content-length: + - '3702' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:47 GMT + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.Capacity/reservationorders/0af601f3-7868-44ee-b833-4d2e64ad3d70/mergeoperationresults/0771cff0-f3ab-461c-8616-2cd087fe5161_3?api-version=2022-03-01 + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-tenant-writes: + - '1199' + x-ms-test: + - '{"contact":"kgautam","scenarios":"RITesting","retention":"12/30/2019 8:29:59 + PM"}' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation merge + Connection: + - keep-alive + ParameterSetName: + - --reservation-order-id -1 -2 + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + method: GET + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationorders/0af601f3-7868-44ee-b833-4d2e64ad3d70/mergeoperationresults/0771cff0-f3ab-461c-8616-2cd087fe5161_3?api-version=2022-03-01 + response: + body: + string: '[{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0771cff0-f3ab-461c-8616-2cd087fe5161","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/0771cff0-f3ab-461c-8616-2cd087fe5161","etag":5,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":1,"provisioningState":"Cancelled","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:48.1377265Z","extendedStatusInfo":{"statusCode":"Merged","message":"This + reservation was merged and is no longer active"},"lastUpdatedDateTime":"2019-11-15T05:04:48.1377265Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitSource":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e"},"mergeProperties":{"mergeDestination":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0dadde4b-b644-4df1-8b06-39f088e00aa5"},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/58d17836-d8fb-4f1a-a75a-477f944db2cc","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/58d17836-d8fb-4f1a-a75a-477f944db2cc","etag":4,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":2,"provisioningState":"Cancelled","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:48.1377265Z","extendedStatusInfo":{"statusCode":"Merged","message":"This + reservation was merged and is no longer active"},"lastUpdatedDateTime":"2019-11-15T05:04:48.1377265Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","splitProperties":{"splitSource":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/6dee7663-3e63-4115-aa4d-41e9a57f551e"},"mergeProperties":{"mergeDestination":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0dadde4b-b644-4df1-8b06-39f088e00aa5"},"renew":false}},{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0dadde4b-b644-4df1-8b06-39f088e00aa5","type":"Microsoft.Capacity/reservationOrders/reservations","name":"0af601f3-7868-44ee-b833-4d2e64ad3d70/0dadde4b-b644-4df1-8b06-39f088e00aa5","etag":2,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":3,"provisioningState":"Succeeded","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:48.1377265Z","lastUpdatedDateTime":"2019-11-15T05:04:48.1377265Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"On","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","mergeProperties":{"mergeSources":["/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/0771cff0-f3ab-461c-8616-2cd087fe5161","/providers/microsoft.capacity/reservationOrders/0af601f3-7868-44ee-b833-4d2e64ad3d70/reservations/58d17836-d8fb-4f1a-a75a-477f944db2cc"]},"renew":false}}]' + headers: + cache-control: + - no-cache + content-length: + - '3702' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/reservation/azext_reservation/tests/latest/recordings/test_update_reservation.yaml b/src/reservation/azext_reservation/tests/latest/recordings/test_update_reservation.yaml new file mode 100644 index 00000000000..6a646d12b37 --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/recordings/test_update_reservation.yaml @@ -0,0 +1,121 @@ +interactions: +- request: + body: '{"properties": {"appliedScopeType": "Single", "appliedScopes": ["/subscriptions/00000000-0000-0000-0000-000000000000"], + "instanceFlexibility": "Off"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation update + Connection: + - keep-alive + Content-Length: + - '150' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --reservation-order-id --reservation-id -t -s --instance-flexibility + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: PATCH + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/fe1341ea-4820-4ac9-9352-4136a6d8a252/reservations/8e5963e2-000b-45bd-a1b4-305c9e5f89c9?api-version=2022-03-01 + response: + body: + string: '{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/fe1341ea-4820-4ac9-9352-4136a6d8a252/reservations/8e5963e2-000b-45bd-a1b4-305c9e5f89c9","type":"Microsoft.Capacity/reservationOrders/reservations","name":"fe1341ea-4820-4ac9-9352-4136a6d8a252/8e5963e2-000b-45bd-a1b4-305c9e5f89c9","etag":37,"location":"westus","properties":{"appliedScopes":["/subscriptions/00000000-0000-0000-0000-000000000000"],"appliedScopeType":"Single","quantity":3,"provisioningState":"Succeeded","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:31.8199549Z","lastUpdatedDateTime":"2019-11-15T05:04:34.75211Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","renew":false}}' + headers: + cache-control: + - no-cache + content-length: + - '825' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:04:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-tenant-writes: + - '1199' + x-ms-test: + - '{"contact":"kgautam","scenarios":"RITesting","retention":"12/30/2019 5:36:07 + PM"}' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"appliedScopeType": "Shared", "instanceFlexibility": "Off"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - reservations reservation update + Connection: + - keep-alive + Content-Length: + - '76' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --reservation-order-id --reservation-id -t --instance-flexibility + User-Agent: + - python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-reservations/0.6.0 Azure-SDK-For-Python AZURECLI/2.0.76 + accept-language: + - en-US + method: PATCH + uri: https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/fe1341ea-4820-4ac9-9352-4136a6d8a252/reservations/8e5963e2-000b-45bd-a1b4-305c9e5f89c9?api-version=2022-03-01 + response: + body: + string: '{"sku":{"name":"Standard_D1"},"id":"/providers/microsoft.capacity/reservationOrders/fe1341ea-4820-4ac9-9352-4136a6d8a252/reservations/8e5963e2-000b-45bd-a1b4-305c9e5f89c9","type":"Microsoft.Capacity/reservationOrders/reservations","name":"fe1341ea-4820-4ac9-9352-4136a6d8a252/8e5963e2-000b-45bd-a1b4-305c9e5f89c9","etag":39,"location":"westus","properties":{"appliedScopeType":"Shared","quantity":3,"provisioningState":"Succeeded","expiryDate":"2020-10-01","displayName":"TestPurchaseReservation","effectiveDateTime":"2019-11-15T05:04:57.8777013Z","lastUpdatedDateTime":"2019-11-15T05:04:59.7609158Z","reservedResourceType":"VirtualMachines","instanceFlexibility":"Off","skuDescription":"Reserved + VM Instance, Standard_D1, US West, 1 Year","renew":false}}' + headers: + cache-control: + - no-cache + content-length: + - '755' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 15 Nov 2019 05:05:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-tenant-writes: + - '1199' + x-ms-test: + - '{"contact":"kgautam","scenarios":"RITesting","retention":"12/30/2019 5:36:07 + PM"}' + status: + code: 200 + message: OK +version: 1 diff --git a/src/reservation/azext_reservation/tests/latest/test_reservation_commands.py b/src/reservation/azext_reservation/tests/latest/test_reservation_commands.py new file mode 100644 index 00000000000..d676b44a97b --- /dev/null +++ b/src/reservation/azext_reservation/tests/latest/test_reservation_commands.py @@ -0,0 +1,229 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +from azure.cli.testsdk import ScenarioTest, record_only + + +class AzureReservationsTests(ScenarioTest): + + def _validate_reservation_order(self, reservation_order): + self.assertIsNotNone(reservation_order) + self.assertTrue(reservation_order['etag']) + self.assertTrue(reservation_order['id']) + self.assertTrue(reservation_order['name']) + self.assertTrue(reservation_order['originalQuantity']) + self.assertTrue(reservation_order['provisioningState']) + self.assertTrue(reservation_order['requestDateTime']) + self.assertTrue(reservation_order['reservations']) + self.assertTrue(reservation_order['term']) + self.assertTrue(reservation_order['type']) + self.assertTrue(reservation_order['type'] == 'Microsoft.Capacity/reservationOrders') + + def _validate_reservation(self, reservation): + self.assertIsNotNone(reservation) + self.assertTrue(reservation['location']) + self.assertTrue(len(reservation['location']) > 0) + self.assertTrue(reservation['etag']) + self.assertTrue(reservation['etag'] > 0) + self.assertTrue(reservation['id']) + self.assertTrue(reservation['name']) + self.assertTrue(reservation['sku']) + self.assertTrue(reservation['properties']) + self.assertTrue(reservation['type']) + self.assertTrue(reservation['type'] == 'Microsoft.Capacity/reservationOrders/reservations') + + @record_only() # This test relies on a subscription id with the existing reservation orders + def test_get_applied_reservation_order_ids(self): + self.kwargs.update({ + 'subscription': '00000000-0000-0000-0000-000000000000' + }) + result = self.cmd('reservations reservation-order-id list --subscription-id {subscription}') \ + .get_output_in_json() + for order_id in result['reservationOrderIds']['value']: + self.assertIn('/providers/Microsoft.Capacity/reservationorders/', order_id) + + @record_only() # This test relies on the existing reservation order + def test_list_reservation_order(self): + reservation_order_list = self.cmd('reservations reservation-order list').get_output_in_json() + self.assertIsNotNone(reservation_order_list) + for order in reservation_order_list: + self._validate_reservation_order(order) + self.assertIn('/providers/microsoft.capacity/reservationOrders/', order['id']) + self.assertGreater(order['etag'], 0) + for reservation in order['reservations']: + self.assertTrue(reservation['id']) + + @record_only() # This test relies on the existing reservation order + def test_get_reservation_order(self): + self.kwargs.update({ + 'reservation_order_id': '0a47417c-cd30-4f67-add6-d631583e09f3' + }) + command = 'reservations reservation-order show --reservation-order-id {reservation_order_id}' + reservation_order = self.cmd(command).get_output_in_json() + self._validate_reservation_order(reservation_order) + self.assertIn('/providers/microsoft.capacity/reservationOrders/', reservation_order['id']) + self.assertGreater(reservation_order['etag'], 0) + + @record_only() # This test relies on the existing reservation order + def test_list_reservation(self): + self.kwargs.update({ + 'reservation_order_id': '0a47417c-cd30-4f67-add6-d631583e09f3' + }) + reservation_list = self.cmd('reservations reservation list --reservation-order-id {reservation_order_id}') \ + .get_output_in_json() + self.assertIsNotNone(reservation_list) + for reservation in reservation_list: + self.assertIn(self.kwargs['reservation_order_id'], reservation['name']) + self.assertGreater(reservation['etag'], 0) + self.assertEqual('Microsoft.Capacity/reservationOrders/reservations', reservation['type']) + + @record_only() # This test relies on the existing reservation order + def test_get_reservation(self): + self.kwargs.update({ + 'reservation_order_id': '0a47417c-cd30-4f67-add6-d631583e09f3', + 'reservation_id': 'ae1fbdad-6333-4964-9f4c-83f7e2b7f44f' + }) + reservation = self.cmd('reservations reservation show --reservation-order-id {reservation_order_id} ' + '--reservation-id {reservation_id}').get_output_in_json() + self.assertIn(self.kwargs['reservation_order_id'], reservation['name']) + self.assertGreater(reservation['etag'], 0) + self.assertGreater(reservation['properties']['quantity'], 0) + self.assertEqual('Microsoft.Capacity/reservationOrders/reservations', reservation['type']) + + @record_only() # This test relies on the existing reservation order + def test_list_reservation_history(self): + self.kwargs.update({ + 'reservation_order_id': '0a47417c-cd30-4f67-add6-d631583e09f3', + 'reservation_id': 'ae1fbdad-6333-4964-9f4c-83f7e2b7f44f' + }) + history = self.cmd('reservations reservation list-history --reservation-order-id {reservation_order_id}' + ' --reservation-id {reservation_id}').get_output_in_json() + self.assertGreater(len(history), 0) + for entry in history: + self.assertGreater(entry['etag'], 0) + name_format = '{}/{}'.format(self.kwargs['reservation_order_id'], self.kwargs['reservation_id']) + self.assertIn(name_format, entry['name']) + + @record_only() # This test relies on a subscription with reservation permissions + def test_get_catalog(self): + self.kwargs.update({ + 'subscription': '00000000-0000-0000-0000-000000000000', + 'type': 'VirtualMachines', + 'location': 'westus' + }) + catalog = self.cmd( + 'reservations catalog show --subscription-id {subscription} --reserved-resource-type {type} --location {location}').get_output_in_json() + self.assertGreater(len(catalog), 0) + for entry in catalog: + self.assertGreater(len(entry['terms']), 0) + self.assertGreater(len(entry['skuProperties']), 0) + self.assertIsNotNone(entry['resourceType']) + self.assertIsNotNone(entry['name']) + + @record_only() # This test relies on the existing reservation order + def test_update_reservation(self): + self.kwargs.update({ + 'reservation_order_id': 'fe1341ea-4820-4ac9-9352-4136a6d8a252', + 'reservation_id': '8e5963e2-000b-45bd-a1b4-305c9e5f89c9', + 'scope': '/subscriptions/d3ae48e5-dbb2-4618-afd4-fb1b8559cb80', + 'instance_flexibility': 'Off' + }) + + single_reservation = self.cmd('reservations reservation update --reservation-order-id {reservation_order_id}' + ' --reservation-id {reservation_id} -t Single -s {scope}' + ' --instance-flexibility {instance_flexibility}').get_output_in_json() + self.assertEqual('Single', single_reservation['properties']['appliedScopeType']) + + shared_reservation = self.cmd('reservations reservation update --reservation-order-id {reservation_order_id} ' + '--reservation-id {reservation_id} -t Shared' + ' --instance-flexibility {instance_flexibility}').get_output_in_json() + self.assertEqual('Shared', shared_reservation['properties']['appliedScopeType']) + + @record_only() # This test relies on the existing reservation order + def test_split_and_merge(self): + self.kwargs.update({ + 'reservation_order_id': '0af601f3-7868-44ee-b833-4d2e64ad3d70', + 'reservation_id': '6dee7663-3e63-4115-aa4d-41e9a57f551e', + 'quantity1': 1, + 'quantity2': 2 + }) + + original_reservation = self.cmd('reservations reservation show --reservation-order-id {reservation_order_id}' + ' --reservation-id {reservation_id}').get_output_in_json() + original_quantity = original_reservation['properties']['quantity'] + + split_items = self.cmd('reservations reservation split --reservation-order-id {reservation_order_id} ' + '--reservation-id {reservation_id} --quantity-1 {quantity1} --quantity-2 {quantity2}').get_output_in_json() + self.assertIsNotNone(split_items) + + quantity_sum = 0 + split_ids = [] + for item in split_items: + self._validate_reservation(item) + if 'Succeeded' in item['properties']['provisioningState']: + item_id = item['name'].split('/')[1] + split_ids.append(item_id) + quantity_sum += item['properties']['quantity'] + self.assertEqual(original_quantity, quantity_sum) + self.assertEqual(2, len(split_ids)) + + self.kwargs.update({ + 'split_id1': split_ids[0], + 'split_id2': split_ids[1] + }) + merge_items = self.cmd('reservations reservation merge --reservation-order-id {reservation_order_id} -1 ' + '{split_id1} -2 {split_id2}').get_output_in_json() + self.assertIsNotNone(merge_items) + for item in merge_items: + self._validate_reservation(item) + if 'Succeeded' in item['properties']['provisioningState']: + self.assertEqual(quantity_sum, item['properties']['quantity']) + + @record_only() # This test relies on a subscription with reservation permissions + def test_calculate_reservation_order(self): + self.kwargs.update({ + 'subid': 'd3ae48e5-dbb2-4618-afd4-fb1b8559cb80', + 'sku': 'standard_b1ls', + 'location': 'westus', + 'reservedResourceType': 'VirtualMachines', + 'term': 'P1Y', + 'quantity': '2', + 'displayName': 'test', + 'appliedScopes': 'Shared', + 'instanceFlexibility': 'Off', + 'billingPlan': 'Monthly', + 'appliedScopeType': 'Shared' + }) + response = self.cmd('reservations reservation-order calculate --sku {sku} --location {location} --reserved-resource-type {reservedResourceType}' + ' --billing-scope {subid} --term {term} --billing-plan {billingPlan} --display-name {displayName}' + ' --quantity {quantity} --applied-scope-type {appliedScopeType}').get_output_in_json() + self.assertIsNotNone(response) + self.assertIsNotNone(response['properties']['reservationOrderId']) + self.assertEqual('standard_b1ls', response['properties']['skuDescription']) + + @record_only() # This test relies on a subscription with reservation purchase permissions + def test_purchase_reservation_order(self): + self.kwargs.update({ + 'roid': 'd4ef7ec2-941c-4da7-8ec9-2f148255a0dc', + 'subid': 'd3ae48e5-dbb2-4618-afd4-fb1b8559cb80', + 'sku': 'standard_b1ls', + 'location': 'westus', + 'reservedResourceType': 'VirtualMachines', + 'term': 'P1Y', + 'quantity': '2', + 'displayName': 'test', + 'appliedScopes': 'Shared', + 'instanceFlexibility': 'Off', + 'billingPlan': 'Monthly', + 'appliedScopeType': 'Shared' + }) + response = self.cmd('reservations reservation-order purchase --reservation-order-id {roid} --sku {sku} --location {location} --reserved-resource-type {reservedResourceType}' + ' --billing-scope {subid} --term {term} --billing-plan {billingPlan} --display-name {displayName}' + ' --quantity {quantity} --applied-scope-type {appliedScopeType}').get_output_in_json() + self.assertIsNotNone(response) + self.assertGreater(response['etag'], 0) + self.assertIsNotNone(response['term']) + self.assertIsNotNone(response['billingPlan']) + self.assertIsNotNone(response['displayName']) + self.assertEqual(2, response['originalQuantity']) diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/__init__.py b/src/reservation/azext_reservation/vendored_sdks/reservations/__init__.py new file mode 100644 index 00000000000..ce247e52908 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/__init__.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._azure_reservation_api import AzureReservationAPI +from ._version import VERSION + +__version__ = VERSION + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = ["AzureReservationAPI"] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/_azure_reservation_api.py b/src/reservation/azext_reservation/vendored_sdks/reservations/_azure_reservation_api.py new file mode 100644 index 00000000000..e7b1a14823b --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/_azure_reservation_api.py @@ -0,0 +1,128 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, TYPE_CHECKING + +from azure.core.rest import HttpRequest, HttpResponse +from azure.mgmt.core import ARMPipelineClient + +from . import models +from ._configuration import AzureReservationAPIConfiguration +from ._serialization import Deserializer, Serializer +from .operations import ( + AzureReservationAPIOperationsMixin, + CalculateExchangeOperations, + CalculateRefundOperations, + ExchangeOperations, + OperationOperations, + QuotaOperations, + QuotaRequestStatusOperations, + ReservationOperations, + ReservationOrderOperations, + ReturnOperations, +) + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + + +class AzureReservationAPI( + AzureReservationAPIOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes + """This API describe Azure Reservation. + + :ivar reservation: ReservationOperations operations + :vartype reservation: azure.mgmt.reservations.operations.ReservationOperations + :ivar reservation_order: ReservationOrderOperations operations + :vartype reservation_order: azure.mgmt.reservations.operations.ReservationOrderOperations + :ivar operation: OperationOperations operations + :vartype operation: azure.mgmt.reservations.operations.OperationOperations + :ivar calculate_refund: CalculateRefundOperations operations + :vartype calculate_refund: azure.mgmt.reservations.operations.CalculateRefundOperations + :ivar return_operations: ReturnOperations operations + :vartype return_operations: azure.mgmt.reservations.operations.ReturnOperations + :ivar calculate_exchange: CalculateExchangeOperations operations + :vartype calculate_exchange: azure.mgmt.reservations.operations.CalculateExchangeOperations + :ivar exchange: ExchangeOperations operations + :vartype exchange: azure.mgmt.reservations.operations.ExchangeOperations + :ivar quota: QuotaOperations operations + :vartype quota: azure.mgmt.reservations.operations.QuotaOperations + :ivar quota_request_status: QuotaRequestStatusOperations operations + :vartype quota_request_status: azure.mgmt.reservations.operations.QuotaRequestStatusOperations + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.TokenCredential + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, credential: "TokenCredential", base_url: str = "https://management.azure.com", **kwargs: Any + ) -> None: + self._config = AzureReservationAPIConfiguration(credential=credential, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.reservation = ReservationOperations(self._client, self._config, self._serialize, self._deserialize) + self.reservation_order = ReservationOrderOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize) + self.calculate_refund = CalculateRefundOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.return_operations = ReturnOperations(self._client, self._config, self._serialize, self._deserialize) + self.calculate_exchange = CalculateExchangeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.exchange = ExchangeOperations(self._client, self._config, self._serialize, self._deserialize) + self.quota = QuotaOperations(self._client, self._config, self._serialize, self._deserialize) + self.quota_request_status = QuotaRequestStatusOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> AzureReservationAPI + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/_configuration.py b/src/reservation/azext_reservation/vendored_sdks/reservations/_configuration.py new file mode 100644 index 00000000000..b9ce0aa7eef --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/_configuration.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + + +class AzureReservationAPIConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for AzureReservationAPI. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.TokenCredential + """ + + def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: + super(AzureReservationAPIConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-reservations/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = ARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/_metadata.json b/src/reservation/azext_reservation/vendored_sdks/reservations/_metadata.json new file mode 100644 index 00000000000..5b4db5eff99 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/_metadata.json @@ -0,0 +1,126 @@ +{ + "chosen_version": "", + "total_api_version_list": ["2020-10-25", "2022-03-01"], + "client": { + "name": "AzureReservationAPI", + "filename": "_azure_reservation_api", + "description": "This API describe Azure Reservation.", + "host_value": "\"https://management.azure.com\"", + "parameterized_host_template": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AzureReservationAPIConfiguration\"], \"._operations_mixin\": [\"AzureReservationAPIOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AzureReservationAPIConfiguration\"], \"._operations_mixin\": [\"AzureReservationAPIOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + } + }, + "constant": { + }, + "call": "credential", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=\"https://management.azure.com\", # type: str", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: str = \"https://management.azure.com\",", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "reservation": "ReservationOperations", + "reservation_order": "ReservationOrderOperations", + "operation": "OperationOperations", + "calculate_exchange": "CalculateExchangeOperations", + "exchange": "ExchangeOperations", + "quota": "QuotaOperations", + "quota_request_status": "QuotaRequestStatusOperations" + }, + "operation_mixins": { + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"List\", \"Optional\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"List\", \"Optional\"]}}}", + "operations": { + "get_catalog" : { + "sync": { + "signature": "def get_catalog(\n self,\n subscription_id, # type: str\n reserved_resource_type=None, # type: Optional[str]\n location=None, # type: Optional[str]\n publisher_id=None, # type: Optional[str]\n offer_id=None, # type: Optional[str]\n plan_id=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e List[\"_models.Catalog\"]\n", + "doc": "\"\"\"Get the regions and skus that are available for RI purchase for the specified Azure\nsubscription.\n\nGet the regions and skus that are available for RI purchase for the specified Azure\nsubscription.\n\n:param subscription_id: Id of the subscription.\n:type subscription_id: str\n:param reserved_resource_type: The type of the resource for which the skus should be provided.\n Default value is None.\n:type reserved_resource_type: str\n:param location: Filters the skus based on the location specified in this parameter. This can\n be an azure region or global. Default value is None.\n:type location: str\n:param publisher_id: Publisher id used to get the third party products. Default value is None.\n:type publisher_id: str\n:param offer_id: Offer id used to get the third party products. Default value is None.\n:type offer_id: str\n:param plan_id: Plan id used to get the third party products. Default value is None.\n:type plan_id: str\n:keyword api_version: Api Version. Default value is \"2022-03-01\". Note that overriding this\n default value may result in unsupported behavior.\n:paramtype api_version: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: list of Catalog, or the result of cls(response)\n:rtype: list[~azure.mgmt.reservations.models.Catalog]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_catalog(\n self,\n subscription_id: str,\n reserved_resource_type: Optional[str] = None,\n location: Optional[str] = None,\n publisher_id: Optional[str] = None,\n offer_id: Optional[str] = None,\n plan_id: Optional[str] = None,\n **kwargs: Any\n) -\u003e List[\"_models.Catalog\"]:\n", + "doc": "\"\"\"Get the regions and skus that are available for RI purchase for the specified Azure\nsubscription.\n\nGet the regions and skus that are available for RI purchase for the specified Azure\nsubscription.\n\n:param subscription_id: Id of the subscription.\n:type subscription_id: str\n:param reserved_resource_type: The type of the resource for which the skus should be provided.\n Default value is None.\n:type reserved_resource_type: str\n:param location: Filters the skus based on the location specified in this parameter. This can\n be an azure region or global. Default value is None.\n:type location: str\n:param publisher_id: Publisher id used to get the third party products. Default value is None.\n:type publisher_id: str\n:param offer_id: Offer id used to get the third party products. Default value is None.\n:type offer_id: str\n:param plan_id: Plan id used to get the third party products. Default value is None.\n:type plan_id: str\n:keyword api_version: Api Version. Default value is \"2022-03-01\". Note that overriding this\n default value may result in unsupported behavior.\n:paramtype api_version: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: list of Catalog, or the result of cls(response)\n:rtype: list[~azure.mgmt.reservations.models.Catalog]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "subscription_id, reserved_resource_type, location, publisher_id, offer_id, plan_id" + }, + "get_applied_reservation_list" : { + "sync": { + "signature": "def get_applied_reservation_list(\n self,\n subscription_id, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.AppliedReservations\"\n", + "doc": "\"\"\"Get list of applicable ``Reservation``\\ s.\n\nGet applicable ``Reservation``\\ s that are applied to this subscription or a resource group\nunder this subscription.\n\n:param subscription_id: Id of the subscription.\n:type subscription_id: str\n:keyword api_version: Api Version. Default value is \"2022-03-01\". Note that overriding this\n default value may result in unsupported behavior.\n:paramtype api_version: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AppliedReservations, or the result of cls(response)\n:rtype: ~azure.mgmt.reservations.models.AppliedReservations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_applied_reservation_list(\n self,\n subscription_id: str,\n **kwargs: Any\n) -\u003e \"_models.AppliedReservations\":\n", + "doc": "\"\"\"Get list of applicable ``Reservation``\\ s.\n\nGet applicable ``Reservation``\\ s that are applied to this subscription or a resource group\nunder this subscription.\n\n:param subscription_id: Id of the subscription.\n:type subscription_id: str\n:keyword api_version: Api Version. Default value is \"2022-03-01\". Note that overriding this\n default value may result in unsupported behavior.\n:paramtype api_version: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AppliedReservations, or the result of cls(response)\n:rtype: ~azure.mgmt.reservations.models.AppliedReservations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "subscription_id" + } + } + } +} \ No newline at end of file diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/_patch.py b/src/reservation/azext_reservation/vendored_sdks/reservations/_patch.py new file mode 100644 index 00000000000..f99e77fef98 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/_serialization.py b/src/reservation/azext_reservation/vendored_sdks/reservations/_serialization.py new file mode 100644 index 00000000000..7c1dedb5133 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/_serialization.py @@ -0,0 +1,1970 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# pylint: skip-file + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote # type: ignore +import xml.etree.ElementTree as ET + +import isodate + +from typing import Dict, Any, cast, TYPE_CHECKING + +from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +if TYPE_CHECKING: + from typing import Optional, Union, AnyStr, IO, Mapping + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data, content_type=None): + # type: (Optional[Union[AnyStr, IO]], Optional[str]) -> Any + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise_with_traceback(DeserializationError, "XML is invalid") + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes, headers): + # type: (Optional[Union[AnyStr, IO]], Mapping) -> Any + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +try: + basestring # type: ignore + unicode_str = unicode # type: ignore +except NameError: + basestring = str # type: ignore + unicode_str = str # type: ignore + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + + +class UTC(datetime.tzinfo): + """Time Zone info for handling UTC""" + + def utcoffset(self, dt): + """UTF offset for UTC is 0.""" + return datetime.timedelta(0) + + def tzname(self, dt): + """Timestamp representation.""" + return "Z" + + def dst(self, dt): + """No daylight saving for UTC.""" + return datetime.timedelta(hours=1) + + +try: + from datetime import timezone as _FixedOffset +except ImportError: # Python 2.7 + + class _FixedOffset(datetime.tzinfo): # type: ignore + """Fixed offset in minutes east from UTC. + Copy/pasted from Python doc + :param datetime.timedelta offset: offset in timedelta format + """ + + def __init__(self, offset): + self.__offset = offset + + def utcoffset(self, dt): + return self.__offset + + def tzname(self, dt): + return str(self.__offset.total_seconds() / 3600) + + def __repr__(self): + return "".format(self.tzname(None)) + + def dst(self, dt): + return datetime.timedelta(0) + + def __getinitargs__(self): + return (self.__offset,) + + +try: + from datetime import timezone + + TZ_UTC = timezone.utc # type: ignore +except ImportError: + TZ_UTC = UTC() # type: ignore + +_FLATTEN = re.compile(r"(? y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes=None): + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize(self, target_obj, data_type=None, **kwargs): + """Serialize data into a string according to type. + + :param target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises: SerializationError if serialization fails. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() + try: + attributes = target_obj._attribute_map + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized.update(target_obj.additional_properties) + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) + continue + if xml_desc.get("text", False): + serialized.text = new_attr + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = unicode_str(new_attr) + serialized.append(local_node) + else: # JSON + for k in reversed(keys): + unflattened = {k: new_attr} + new_attr = unflattened + + _new_attr = new_attr + _serialized = serialized + for k in keys: + if k not in _serialized: + _serialized.update(_new_attr) + _new_attr = _new_attr[k] + _serialized = _serialized[k] + except ValueError: + continue + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise_with_traceback(SerializationError, msg, err) + else: + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises: SerializationError if serialization fails. + :raises: ValueError if data is None + """ + + # Just in case this is a dict + internal_data_type = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) + except DeserializationError as err: + raise_with_traceback(SerializationError, "Unable to build a model: " + str(err), err) + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] + if not kwargs.get("skip_quote", False): + data = [quote(str(d), safe="") for d in data] + return str(self.serialize_iter(data, internal_data_type, **kwargs)) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :param bool required: Whether it's essential that the data not be + empty or None + :raises: AttributeError if required data is None. + :raises: ValueError if data is None + :raises: SerializationError if serialization fails. + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + elif data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, data.__class__) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise_with_traceback(SerializationError, msg.format(data, data_type), err) + else: + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param data: Object to be serialized. + :param str data_type: Type of object in the iterable. + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + return eval(data_type)(data) # nosec + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param data: Object to be serialized. + :rtype: str + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + else: + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list attr: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param bool required: Whether the objects in the iterable must + not be None or empty. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + :rtype: list, str + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError: + serialized.append(None) + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :param bool required: Whether the objects in the dictionary must + not be None or empty. + :rtype: dict + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is unicode_str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + elif obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) + return result + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) + + @staticmethod + def serialize_bytearray(attr, **kwargs): + """Serialize bytearray into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): + """Serialize str into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): + """Serialize Decimal object to float. + + :param attr: Object to be serialized. + :rtype: float + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): + """Serialize long (Py2) or int (Py3). + + :param attr: Object to be serialized. + :rtype: int/long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: TypeError if format invalid. + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError: + raise TypeError("RFC1123 object must be valid Datetime object.") + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: SerializationError if format invalid. + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise_with_traceback(SerializationError, msg, err) + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise_with_traceback(TypeError, msg, err) + + @staticmethod + def serialize_unix(attr, **kwargs): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises: SerializationError if format invalid + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError: + raise TypeError("Unix time object must be valid Datetime object.") + + +def rest_key_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key.""" + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + else: + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + else: # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer(object): + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes=None): + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, basestring): + return self.deserialize_data(data, response) + elif isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None: + return data + try: + attributes = response._attribute_map + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name + raise_with_traceback(DeserializationError, msg, err) + else: + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deseralize. + """ + if target is None: + return None, None + + if isinstance(target, basestring): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deseralize. + :param str content_type: Swagger "produces" if available. + """ + try: + return self(target_obj, data, content_type=content_type) + except: + _LOGGER.debug( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param raw_data: Data to be processed. + :param content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (basestring, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param response: The response model class. + :param d_attrs: The deserialized response attributes. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [k for k, v in response._validation.items() if v.get("readonly")] + const = [k for k, v in response._validation.items() if v.get("constant")] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) + raise DeserializationError(msg + str(err)) + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) + + def deserialize_data(self, data, data_type): + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise_with_traceback(DeserializationError, msg, err) + else: + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :rtype: dict + :raises: TypeError if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, basestring): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + else: + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :rtype: str, int, float or bool + :raises: TypeError if string format is not valid. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + else: + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + elif isinstance(attr, basestring): + if attr.lower() in ["true", "1"]: + return True + elif attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + return eval(data_type)(attr) # nosec + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): + return data + except NameError: + return str(data) + else: + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + # https://github.com/Azure/azure-rest-api-specs/issues/141 + try: + return list(enum_obj.__members__.values())[data] + except IndexError: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) + attr = attr + padding + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :rtype: Decimal + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(attr) + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise_with_traceback(DeserializationError, msg, err) + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :rtype: long or int + :raises: ValueError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :rtype: TimeDelta + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise_with_traceback(DeserializationError, msg, err) + else: + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :rtype: Date + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :rtype: Datetime + :raises: DeserializationError if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) + try: + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/_vendor.py b/src/reservation/azext_reservation/vendored_sdks/reservations/_vendor.py new file mode 100644 index 00000000000..5c6e3363178 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/_vendor.py @@ -0,0 +1,47 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import TYPE_CHECKING + +from azure.core.pipeline.transport import HttpRequest + +from ._configuration import AzureReservationAPIConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core import PipelineClient + + from ._serialization import Deserializer, Serializer + + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] + template = "/".join(components) + + +class MixinABC(ABC): + """DO NOT use this class. It is for internal typing use only.""" + + _client: "PipelineClient" + _config: AzureReservationAPIConfiguration + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/_version.py b/src/reservation/azext_reservation/vendored_sdks/reservations/_version.py new file mode 100644 index 00000000000..83f24ab5094 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2.1.0" diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/__init__.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/__init__.py new file mode 100644 index 00000000000..8c8db752ac9 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/__init__.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._azure_reservation_api import AzureReservationAPI + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = ["AzureReservationAPI"] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/_azure_reservation_api.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/_azure_reservation_api.py new file mode 100644 index 00000000000..bd8d49121e4 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/_azure_reservation_api.py @@ -0,0 +1,126 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient + +from .. import models +from .._serialization import Deserializer, Serializer +from ._configuration import AzureReservationAPIConfiguration +from .operations import ( + AzureReservationAPIOperationsMixin, + CalculateExchangeOperations, + CalculateRefundOperations, + ExchangeOperations, + OperationOperations, + QuotaOperations, + QuotaRequestStatusOperations, + ReservationOperations, + ReservationOrderOperations, + ReturnOperations, +) + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class AzureReservationAPI( + AzureReservationAPIOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes + """This API describe Azure Reservation. + + :ivar reservation: ReservationOperations operations + :vartype reservation: azure.mgmt.reservations.aio.operations.ReservationOperations + :ivar reservation_order: ReservationOrderOperations operations + :vartype reservation_order: azure.mgmt.reservations.aio.operations.ReservationOrderOperations + :ivar operation: OperationOperations operations + :vartype operation: azure.mgmt.reservations.aio.operations.OperationOperations + :ivar calculate_refund: CalculateRefundOperations operations + :vartype calculate_refund: azure.mgmt.reservations.aio.operations.CalculateRefundOperations + :ivar return_operations: ReturnOperations operations + :vartype return_operations: azure.mgmt.reservations.aio.operations.ReturnOperations + :ivar calculate_exchange: CalculateExchangeOperations operations + :vartype calculate_exchange: azure.mgmt.reservations.aio.operations.CalculateExchangeOperations + :ivar exchange: ExchangeOperations operations + :vartype exchange: azure.mgmt.reservations.aio.operations.ExchangeOperations + :ivar quota: QuotaOperations operations + :vartype quota: azure.mgmt.reservations.aio.operations.QuotaOperations + :ivar quota_request_status: QuotaRequestStatusOperations operations + :vartype quota_request_status: + azure.mgmt.reservations.aio.operations.QuotaRequestStatusOperations + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, credential: "AsyncTokenCredential", base_url: str = "https://management.azure.com", **kwargs: Any + ) -> None: + self._config = AzureReservationAPIConfiguration(credential=credential, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.reservation = ReservationOperations(self._client, self._config, self._serialize, self._deserialize) + self.reservation_order = ReservationOrderOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize) + self.calculate_refund = CalculateRefundOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.return_operations = ReturnOperations(self._client, self._config, self._serialize, self._deserialize) + self.calculate_exchange = CalculateExchangeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.exchange = ExchangeOperations(self._client, self._config, self._serialize, self._deserialize) + self.quota = QuotaOperations(self._client, self._config, self._serialize, self._deserialize) + self.quota_request_status = QuotaRequestStatusOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "AzureReservationAPI": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/_configuration.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/_configuration.py new file mode 100644 index 00000000000..a22504dccc2 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/_configuration.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class AzureReservationAPIConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for AzureReservationAPI. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + """ + + def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: + super(AzureReservationAPIConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-reservations/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/_patch.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/_patch.py new file mode 100644 index 00000000000..f99e77fef98 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/_vendor.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/_vendor.py new file mode 100644 index 00000000000..985979c1d80 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/_vendor.py @@ -0,0 +1,28 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import TYPE_CHECKING + +from azure.core.pipeline.transport import HttpRequest + +from ._configuration import AzureReservationAPIConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core import AsyncPipelineClient + + from .._serialization import Deserializer, Serializer + + +class MixinABC(ABC): + """DO NOT use this class. It is for internal typing use only.""" + + _client: "AsyncPipelineClient" + _config: AzureReservationAPIConfiguration + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/__init__.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/__init__.py new file mode 100644 index 00000000000..7ae269dcb4f --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/__init__.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._reservation_operations import ReservationOperations +from ._azure_reservation_api_operations import AzureReservationAPIOperationsMixin +from ._reservation_order_operations import ReservationOrderOperations +from ._operation_operations import OperationOperations +from ._calculate_refund_operations import CalculateRefundOperations +from ._return_operations_operations import ReturnOperations +from ._calculate_exchange_operations import CalculateExchangeOperations +from ._exchange_operations import ExchangeOperations +from ._quota_operations import QuotaOperations +from ._quota_request_status_operations import QuotaRequestStatusOperations + +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ReservationOperations", + "AzureReservationAPIOperationsMixin", + "ReservationOrderOperations", + "OperationOperations", + "CalculateRefundOperations", + "ReturnOperations", + "CalculateExchangeOperations", + "ExchangeOperations", + "QuotaOperations", + "QuotaRequestStatusOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_azure_reservation_api_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_azure_reservation_api_operations.py new file mode 100644 index 00000000000..07e5d9863f5 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_azure_reservation_api_operations.py @@ -0,0 +1,180 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, List, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._azure_reservation_api_operations import ( + build_get_applied_reservation_list_request, + build_get_catalog_request, +) +from .._vendor import MixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class AzureReservationAPIOperationsMixin(MixinABC): + @distributed_trace_async + async def get_catalog( + self, + subscription_id: str, + reserved_resource_type: Optional[str] = None, + location: Optional[str] = None, + publisher_id: Optional[str] = None, + offer_id: Optional[str] = None, + plan_id: Optional[str] = None, + **kwargs: Any + ) -> List[_models.Catalog]: + """Get the regions and skus that are available for RI purchase for the specified Azure + subscription. + + Get the regions and skus that are available for RI purchase for the specified Azure + subscription. + + :param subscription_id: Id of the subscription. Required. + :type subscription_id: str + :param reserved_resource_type: The type of the resource for which the skus should be provided. + Default value is None. + :type reserved_resource_type: str + :param location: Filters the skus based on the location specified in this parameter. This can + be an azure region or global. Default value is None. + :type location: str + :param publisher_id: Publisher id used to get the third party products. Default value is None. + :type publisher_id: str + :param offer_id: Offer id used to get the third party products. Default value is None. + :type offer_id: str + :param plan_id: Plan id used to get the third party products. Default value is None. + :type plan_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of Catalog or the result of cls(response) + :rtype: list[~azure.mgmt.reservations.models.Catalog] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[List[_models.Catalog]] + + request = build_get_catalog_request( + subscription_id=subscription_id, + reserved_resource_type=reserved_resource_type, + location=location, + publisher_id=publisher_id, + offer_id=offer_id, + plan_id=plan_id, + api_version=api_version, + template_url=self.get_catalog.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("[Catalog]", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_catalog.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/catalogs"} # type: ignore + + @distributed_trace_async + async def get_applied_reservation_list(self, subscription_id: str, **kwargs: Any) -> _models.AppliedReservations: + """Get list of applicable ``Reservation``\ s. + + Get applicable ``Reservation``\ s that are applied to this subscription or a resource group + under this subscription. + + :param subscription_id: Id of the subscription. Required. + :type subscription_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppliedReservations or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.AppliedReservations + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.AppliedReservations] + + request = build_get_applied_reservation_list_request( + subscription_id=subscription_id, + api_version=api_version, + template_url=self.get_applied_reservation_list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AppliedReservations", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_applied_reservation_list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/appliedReservations"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_calculate_exchange_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_calculate_exchange_operations.py new file mode 100644 index 00000000000..295f96007e1 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_calculate_exchange_operations.py @@ -0,0 +1,253 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._calculate_exchange_operations import build_post_request +from .._vendor import MixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class CalculateExchangeOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.aio.AzureReservationAPI`'s + :attr:`calculate_exchange` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _post_initial( + self, body: Union[_models.CalculateExchangeRequest, IO], **kwargs: Any + ) -> Optional[_models.CalculateExchangeOperationResultResponse]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.CalculateExchangeOperationResultResponse]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "CalculateExchangeRequest") + + request = build_post_request( + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._post_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("CalculateExchangeOperationResultResponse", pipeline_response) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _post_initial.metadata = {"url": "/providers/Microsoft.Capacity/calculateExchange"} # type: ignore + + @overload + async def begin_post( + self, body: _models.CalculateExchangeRequest, *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.CalculateExchangeOperationResultResponse]: + """Calculates the refund amounts and price of the new purchases. + + Calculates price for exchanging ``Reservations`` if there are no policy errors. + + :param body: Request containing purchases and refunds that need to be executed. Required. + :type body: ~azure.mgmt.reservations.models.CalculateExchangeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + CalculateExchangeOperationResultResponse or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.CalculateExchangeOperationResultResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_post( + self, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.CalculateExchangeOperationResultResponse]: + """Calculates the refund amounts and price of the new purchases. + + Calculates price for exchanging ``Reservations`` if there are no policy errors. + + :param body: Request containing purchases and refunds that need to be executed. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + CalculateExchangeOperationResultResponse or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.CalculateExchangeOperationResultResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_post( + self, body: Union[_models.CalculateExchangeRequest, IO], **kwargs: Any + ) -> AsyncLROPoller[_models.CalculateExchangeOperationResultResponse]: + """Calculates the refund amounts and price of the new purchases. + + Calculates price for exchanging ``Reservations`` if there are no policy errors. + + :param body: Request containing purchases and refunds that need to be executed. Is either a + model type or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.CalculateExchangeRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + CalculateExchangeOperationResultResponse or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.CalculateExchangeOperationResultResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CalculateExchangeOperationResultResponse] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._post_initial( # type: ignore + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CalculateExchangeOperationResultResponse", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_post.metadata = {"url": "/providers/Microsoft.Capacity/calculateExchange"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_calculate_refund_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_calculate_refund_operations.py new file mode 100644 index 00000000000..841cd9538da --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_calculate_refund_operations.py @@ -0,0 +1,176 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._calculate_refund_operations import build_post_request +from .._vendor import MixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class CalculateRefundOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.aio.AzureReservationAPI`'s + :attr:`calculate_refund` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + async def post( + self, + reservation_order_id: str, + body: _models.CalculateRefundRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CalculateRefundResponse: + """Calculate the refund amount of a reservation order. + + Calculate price for returning ``Reservations`` if there are no policy errors. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for calculating refund of a reservation. Required. + :type body: ~azure.mgmt.reservations.models.CalculateRefundRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CalculateRefundResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CalculateRefundResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def post( + self, reservation_order_id: str, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CalculateRefundResponse: + """Calculate the refund amount of a reservation order. + + Calculate price for returning ``Reservations`` if there are no policy errors. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for calculating refund of a reservation. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CalculateRefundResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CalculateRefundResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def post( + self, reservation_order_id: str, body: Union[_models.CalculateRefundRequest, IO], **kwargs: Any + ) -> _models.CalculateRefundResponse: + """Calculate the refund amount of a reservation order. + + Calculate price for returning ``Reservations`` if there are no policy errors. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for calculating refund of a reservation. Is either a model type + or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.CalculateRefundRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CalculateRefundResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CalculateRefundResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CalculateRefundResponse] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "CalculateRefundRequest") + + request = build_post_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.post.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CalculateRefundResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + post.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/calculateRefund"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_exchange_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_exchange_operations.py new file mode 100644 index 00000000000..e8a37281617 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_exchange_operations.py @@ -0,0 +1,253 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._exchange_operations import build_post_request +from .._vendor import MixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ExchangeOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.aio.AzureReservationAPI`'s + :attr:`exchange` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _post_initial( + self, body: Union[_models.ExchangeRequest, IO], **kwargs: Any + ) -> Optional[_models.ExchangeOperationResultResponse]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ExchangeOperationResultResponse]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "ExchangeRequest") + + request = build_post_request( + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._post_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("ExchangeOperationResultResponse", pipeline_response) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _post_initial.metadata = {"url": "/providers/Microsoft.Capacity/exchange"} # type: ignore + + @overload + async def begin_post( + self, body: _models.ExchangeRequest, *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.ExchangeOperationResultResponse]: + """Exchange Reservation(s). + + Returns one or more ``Reservations`` in exchange for one or more ``Reservation`` purchases. + + :param body: Request containing the refunds and purchases that need to be executed. Required. + :type body: ~azure.mgmt.reservations.models.ExchangeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExchangeOperationResultResponse or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.ExchangeOperationResultResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_post( + self, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.ExchangeOperationResultResponse]: + """Exchange Reservation(s). + + Returns one or more ``Reservations`` in exchange for one or more ``Reservation`` purchases. + + :param body: Request containing the refunds and purchases that need to be executed. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExchangeOperationResultResponse or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.ExchangeOperationResultResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_post( + self, body: Union[_models.ExchangeRequest, IO], **kwargs: Any + ) -> AsyncLROPoller[_models.ExchangeOperationResultResponse]: + """Exchange Reservation(s). + + Returns one or more ``Reservations`` in exchange for one or more ``Reservation`` purchases. + + :param body: Request containing the refunds and purchases that need to be executed. Is either a + model type or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.ExchangeRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExchangeOperationResultResponse or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.ExchangeOperationResultResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ExchangeOperationResultResponse] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._post_initial( # type: ignore + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ExchangeOperationResultResponse", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_post.metadata = {"url": "/providers/Microsoft.Capacity/exchange"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_operation_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_operation_operations.py new file mode 100644 index 00000000000..f8f2e9c0afa --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_operation_operations.py @@ -0,0 +1,124 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._operation_operations import build_list_request +from .._vendor import MixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class OperationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.aio.AzureReservationAPI`'s + :attr:`operation` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncIterable["_models.OperationResponse"]: + """Get operations. + + List all the operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationResponse or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.reservations.models.OperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.OperationList] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("OperationList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/providers/Microsoft.Capacity/operations"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_patch.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_patch.py new file mode 100644 index 00000000000..f7dd3251033 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_quota_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_quota_operations.py new file mode 100644 index 00000000000..72f87266d34 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_quota_operations.py @@ -0,0 +1,776 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._quota_operations import ( + build_create_or_update_request, + build_get_request, + build_list_request, + build_update_request, +) +from .._vendor import MixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class QuotaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.aio.AzureReservationAPI`'s + :attr:`quota` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, subscription_id: str, provider_id: str, location: str, resource_name: str, **kwargs: Any + ) -> _models.CurrentQuotaLimitBase: + """Get the current quota (service limit) and usage of a resource. You can use the response from + the GET operation to submit quota update request. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CurrentQuotaLimitBase or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CurrentQuotaLimitBase + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CurrentQuotaLimitBase] + + request = build_get_request( + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + resource_name=resource_name, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("CurrentQuotaLimitBase", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + get.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}"} # type: ignore + + async def _create_or_update_initial( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: Union[_models.CurrentQuotaLimitBase, IO], + **kwargs: Any + ) -> Union[_models.CurrentQuotaLimitBase, _models.QuotaRequestSubmitResponse201]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop( + "cls", None + ) # type: ClsType[Union[_models.CurrentQuotaLimitBase, _models.QuotaRequestSubmitResponse201]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_quota_request, (IO, bytes)): + _content = create_quota_request + else: + _json = self._serialize.body(create_quota_request, "CurrentQuotaLimitBase") + + request = build_create_or_update_request( + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + resource_name=resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("CurrentQuotaLimitBase", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("QuotaRequestSubmitResponse201", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}"} # type: ignore + + @overload + async def begin_create_or_update( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: _models.CurrentQuotaLimitBase, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Union[AsyncLROPoller[_models.CurrentQuotaLimitBase], AsyncLROPoller[_models.QuotaRequestSubmitResponse201]]: + """Create or update the quota (service limits) of a resource to the requested value. + Steps: + + + #. Make the Get request to get the quota information for specific resource. + #. To increase the quota, update the limit field in the response from Get request to new value. + #. Submit the JSON to the quota request API to update the quota. + The Create quota request may be constructed as follows. The PUT operation can be used to + update the quota. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :param create_quota_request: Quota requests payload. Required. + :type create_quota_request: ~azure.mgmt.reservations.models.CurrentQuotaLimitBase + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CurrentQuotaLimitBase or An instance + of AsyncLROPoller that returns either QuotaRequestSubmitResponse201 or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] or + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.QuotaRequestSubmitResponse201] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Union[AsyncLROPoller[_models.CurrentQuotaLimitBase], AsyncLROPoller[_models.QuotaRequestSubmitResponse201]]: + """Create or update the quota (service limits) of a resource to the requested value. + Steps: + + + #. Make the Get request to get the quota information for specific resource. + #. To increase the quota, update the limit field in the response from Get request to new value. + #. Submit the JSON to the quota request API to update the quota. + The Create quota request may be constructed as follows. The PUT operation can be used to + update the quota. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :param create_quota_request: Quota requests payload. Required. + :type create_quota_request: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CurrentQuotaLimitBase or An instance + of AsyncLROPoller that returns either QuotaRequestSubmitResponse201 or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] or + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.QuotaRequestSubmitResponse201] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: Union[_models.CurrentQuotaLimitBase, IO], + **kwargs: Any + ) -> Union[AsyncLROPoller[_models.CurrentQuotaLimitBase], AsyncLROPoller[_models.QuotaRequestSubmitResponse201]]: + """Create or update the quota (service limits) of a resource to the requested value. + Steps: + + + #. Make the Get request to get the quota information for specific resource. + #. To increase the quota, update the limit field in the response from Get request to new value. + #. Submit the JSON to the quota request API to update the quota. + The Create quota request may be constructed as follows. The PUT operation can be used to + update the quota. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :param create_quota_request: Quota requests payload. Is either a model type or a IO type. + Required. + :type create_quota_request: ~azure.mgmt.reservations.models.CurrentQuotaLimitBase or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CurrentQuotaLimitBase or An instance + of AsyncLROPoller that returns either QuotaRequestSubmitResponse201 or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] or + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.QuotaRequestSubmitResponse201] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CurrentQuotaLimitBase] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( # type: ignore + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + resource_name=resource_name, + create_quota_request=create_quota_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CurrentQuotaLimitBase", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "original-uri"}, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}"} # type: ignore + + async def _update_initial( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: Union[_models.CurrentQuotaLimitBase, IO], + **kwargs: Any + ) -> Union[_models.CurrentQuotaLimitBase, _models.QuotaRequestSubmitResponse201]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop( + "cls", None + ) # type: ClsType[Union[_models.CurrentQuotaLimitBase, _models.QuotaRequestSubmitResponse201]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_quota_request, (IO, bytes)): + _content = create_quota_request + else: + _json = self._serialize.body(create_quota_request, "CurrentQuotaLimitBase") + + request = build_update_request( + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + resource_name=resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("CurrentQuotaLimitBase", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("QuotaRequestSubmitResponse201", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}"} # type: ignore + + @overload + async def begin_update( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: _models.CurrentQuotaLimitBase, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Union[AsyncLROPoller[_models.CurrentQuotaLimitBase], AsyncLROPoller[_models.QuotaRequestSubmitResponse201]]: + """Update the quota (service limits) of this resource to the requested value. + • To get the quota information for specific resource, send a GET request. + • To increase the quota, update the limit field from the GET response to a new value. + • To update the quota value, submit the JSON response to the quota request API to update the + quota. + • To update the quota. use the PATCH operation. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :param create_quota_request: Payload for the quota request. Required. + :type create_quota_request: ~azure.mgmt.reservations.models.CurrentQuotaLimitBase + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CurrentQuotaLimitBase or An instance + of AsyncLROPoller that returns either QuotaRequestSubmitResponse201 or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] or + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.QuotaRequestSubmitResponse201] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Union[AsyncLROPoller[_models.CurrentQuotaLimitBase], AsyncLROPoller[_models.QuotaRequestSubmitResponse201]]: + """Update the quota (service limits) of this resource to the requested value. + • To get the quota information for specific resource, send a GET request. + • To increase the quota, update the limit field from the GET response to a new value. + • To update the quota value, submit the JSON response to the quota request API to update the + quota. + • To update the quota. use the PATCH operation. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :param create_quota_request: Payload for the quota request. Required. + :type create_quota_request: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CurrentQuotaLimitBase or An instance + of AsyncLROPoller that returns either QuotaRequestSubmitResponse201 or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] or + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.QuotaRequestSubmitResponse201] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: Union[_models.CurrentQuotaLimitBase, IO], + **kwargs: Any + ) -> Union[AsyncLROPoller[_models.CurrentQuotaLimitBase], AsyncLROPoller[_models.QuotaRequestSubmitResponse201]]: + """Update the quota (service limits) of this resource to the requested value. + • To get the quota information for specific resource, send a GET request. + • To increase the quota, update the limit field from the GET response to a new value. + • To update the quota value, submit the JSON response to the quota request API to update the + quota. + • To update the quota. use the PATCH operation. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :param create_quota_request: Payload for the quota request. Is either a model type or a IO + type. Required. + :type create_quota_request: ~azure.mgmt.reservations.models.CurrentQuotaLimitBase or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CurrentQuotaLimitBase or An instance + of AsyncLROPoller that returns either QuotaRequestSubmitResponse201 or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] or + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.QuotaRequestSubmitResponse201] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CurrentQuotaLimitBase] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( # type: ignore + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + resource_name=resource_name, + create_quota_request=create_quota_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CurrentQuotaLimitBase", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "original-uri"}, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}"} # type: ignore + + @distributed_trace + def list( + self, subscription_id: str, provider_id: str, location: str, **kwargs: Any + ) -> AsyncIterable["_models.CurrentQuotaLimitBase"]: + """Gets a list of current quotas (service limits) and usage for all resources. The response from + the list quota operation can be leveraged to request quota updates. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CurrentQuotaLimitBase or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.QuotaLimits] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("QuotaLimits", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_quota_request_status_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_quota_request_status_operations.py new file mode 100644 index 00000000000..701425c1261 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_quota_request_status_operations.py @@ -0,0 +1,229 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._quota_request_status_operations import build_get_request, build_list_request +from .._vendor import MixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class QuotaRequestStatusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.aio.AzureReservationAPI`'s + :attr:`quota_request_status` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, subscription_id: str, provider_id: str, location: str, id: str, **kwargs: Any + ) -> _models.QuotaRequestDetails: + """For the specified Azure region (location), get the details and status of the quota request by + the quota request ID for the resources of the resource provider. The PUT request for the quota + (service limit) returns a response with the requestId parameter. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param id: Quota Request ID. Required. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: QuotaRequestDetails or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.QuotaRequestDetails + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.QuotaRequestDetails] + + request = build_get_request( + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + id=id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("QuotaRequestDetails", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests/{id}"} # type: ignore + + @distributed_trace + def list( + self, + subscription_id: str, + provider_id: str, + location: str, + filter: Optional[str] = None, + top: Optional[int] = None, + skiptoken: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.QuotaRequestDetails"]: + """For the specified Azure region (location), subscription, and resource provider, get the history + of the quota requests for the past year. To select specific quota requests, use the oData + filter. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param filter: .. list-table:: + :header-rows: 1 + + * - Field + - Supported operators + * - requestSubmitTime + - ge, le, eq, gt, lt. Default value is None. + :type filter: str + :param top: Number of records to return. Default value is None. + :type top: int + :param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element includes a + skiptoken parameter that specifies a starting point to use for subsequent calls. Default value + is None. + :type skiptoken: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either QuotaRequestDetails or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.reservations.models.QuotaRequestDetails] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.QuotaRequestDetailsList] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + filter=filter, + top=top, + skiptoken=skiptoken, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("QuotaRequestDetailsList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_reservation_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_reservation_operations.py new file mode 100644 index 00000000000..4c50740f94b --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_reservation_operations.py @@ -0,0 +1,1348 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._reservation_operations import ( + build_archive_request, + build_available_scopes_request, + build_get_request, + build_list_all_request, + build_list_request, + build_list_revisions_request, + build_merge_request, + build_split_request, + build_unarchive_request, + build_update_request, +) +from .._vendor import MixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ReservationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.aio.AzureReservationAPI`'s + :attr:`reservation` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _available_scopes_initial( + self, + reservation_order_id: str, + reservation_id: str, + body: Union[_models.AvailableScopeRequest, IO], + **kwargs: Any + ) -> _models.AvailableScopeProperties: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AvailableScopeProperties] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "AvailableScopeRequest") + + request = build_available_scopes_request( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._available_scopes_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AvailableScopeProperties", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _available_scopes_initial.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes"} # type: ignore + + @overload + async def begin_available_scopes( + self, + reservation_order_id: str, + reservation_id: str, + body: _models.AvailableScopeRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AvailableScopeProperties]: + """Get Available Scopes for ``Reservation``. + + Get Available Scopes for ``Reservation``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param body: Required. + :type body: ~azure.mgmt.reservations.models.AvailableScopeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AvailableScopeProperties or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.AvailableScopeProperties] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_available_scopes( + self, + reservation_order_id: str, + reservation_id: str, + body: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AvailableScopeProperties]: + """Get Available Scopes for ``Reservation``. + + Get Available Scopes for ``Reservation``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param body: Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AvailableScopeProperties or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.AvailableScopeProperties] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_available_scopes( + self, + reservation_order_id: str, + reservation_id: str, + body: Union[_models.AvailableScopeRequest, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.AvailableScopeProperties]: + """Get Available Scopes for ``Reservation``. + + Get Available Scopes for ``Reservation``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param body: Is either a model type or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.AvailableScopeRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AvailableScopeProperties or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.AvailableScopeProperties] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AvailableScopeProperties] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._available_scopes_initial( # type: ignore + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("AvailableScopeProperties", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_available_scopes.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes"} # type: ignore + + async def _split_initial( + self, reservation_order_id: str, body: Union[_models.SplitRequest, IO], **kwargs: Any + ) -> Optional[List[_models.ReservationResponse]]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[List[_models.ReservationResponse]]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "SplitRequest") + + request = build_split_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._split_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("[ReservationResponse]", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _split_initial.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split"} # type: ignore + + @overload + async def begin_split( + self, + reservation_order_id: str, + body: _models.SplitRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[List[_models.ReservationResponse]]: + """Split the ``Reservation``. + + Split a ``Reservation`` into two ``Reservation``\ s with specified quantity distribution. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed to Split a reservation item. Required. + :type body: ~azure.mgmt.reservations.models.SplitRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either list of ReservationResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.reservations.models.ReservationResponse]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_split( + self, reservation_order_id: str, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[List[_models.ReservationResponse]]: + """Split the ``Reservation``. + + Split a ``Reservation`` into two ``Reservation``\ s with specified quantity distribution. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed to Split a reservation item. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either list of ReservationResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.reservations.models.ReservationResponse]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_split( + self, reservation_order_id: str, body: Union[_models.SplitRequest, IO], **kwargs: Any + ) -> AsyncLROPoller[List[_models.ReservationResponse]]: + """Split the ``Reservation``. + + Split a ``Reservation`` into two ``Reservation``\ s with specified quantity distribution. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed to Split a reservation item. Is either a model type or a IO + type. Required. + :type body: ~azure.mgmt.reservations.models.SplitRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either list of ReservationResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.reservations.models.ReservationResponse]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[List[_models.ReservationResponse]] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._split_initial( # type: ignore + reservation_order_id=reservation_order_id, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("[ReservationResponse]", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_split.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split"} # type: ignore + + async def _merge_initial( + self, reservation_order_id: str, body: Union[_models.MergeRequest, IO], **kwargs: Any + ) -> Optional[List[_models.ReservationResponse]]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[List[_models.ReservationResponse]]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "MergeRequest") + + request = build_merge_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._merge_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("[ReservationResponse]", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _merge_initial.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge"} # type: ignore + + @overload + async def begin_merge( + self, + reservation_order_id: str, + body: _models.MergeRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[List[_models.ReservationResponse]]: + """Merges two ``Reservation``\ s. + + Merge the specified ``Reservation``\ s into a new ``Reservation``. The two ``Reservation``\ s + being merged must have same properties. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for commercial request for a reservation. Required. + :type body: ~azure.mgmt.reservations.models.MergeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either list of ReservationResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.reservations.models.ReservationResponse]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_merge( + self, reservation_order_id: str, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[List[_models.ReservationResponse]]: + """Merges two ``Reservation``\ s. + + Merge the specified ``Reservation``\ s into a new ``Reservation``. The two ``Reservation``\ s + being merged must have same properties. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for commercial request for a reservation. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either list of ReservationResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.reservations.models.ReservationResponse]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_merge( + self, reservation_order_id: str, body: Union[_models.MergeRequest, IO], **kwargs: Any + ) -> AsyncLROPoller[List[_models.ReservationResponse]]: + """Merges two ``Reservation``\ s. + + Merge the specified ``Reservation``\ s into a new ``Reservation``. The two ``Reservation``\ s + being merged must have same properties. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for commercial request for a reservation. Is either a model + type or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.MergeRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either list of ReservationResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.reservations.models.ReservationResponse]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[List[_models.ReservationResponse]] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._merge_initial( # type: ignore + reservation_order_id=reservation_order_id, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("[ReservationResponse]", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_merge.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge"} # type: ignore + + @distributed_trace + def list(self, reservation_order_id: str, **kwargs: Any) -> AsyncIterable["_models.ReservationResponse"]: + """Get ``Reservation``\ s in a given reservation Order. + + List ``Reservation``\ s within a single ``ReservationOrder``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ReservationResponse or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.reservations.models.ReservationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationList] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ReservationList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations"} # type: ignore + + @distributed_trace_async + async def get( + self, reservation_id: str, reservation_order_id: str, expand: Optional[str] = None, **kwargs: Any + ) -> _models.ReservationResponse: + """Get ``Reservation`` details. + + Get specific ``Reservation`` details. + + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param expand: Supported value of this query is renewProperties. Default value is None. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ReservationResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.ReservationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationResponse] + + request = build_get_request( + reservation_id=reservation_id, + reservation_order_id=reservation_order_id, + expand=expand, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ReservationResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}"} # type: ignore + + async def _update_initial( + self, reservation_order_id: str, reservation_id: str, parameters: Union[_models.Patch, IO], **kwargs: Any + ) -> Optional[_models.ReservationResponse]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ReservationResponse]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "Patch") + + request = build_update_request( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("ReservationResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}"} # type: ignore + + @overload + async def begin_update( + self, + reservation_order_id: str, + reservation_id: str, + parameters: _models.Patch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ReservationResponse]: + """Updates a ``Reservation``. + + Updates the applied scopes of the ``Reservation``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param parameters: Information needed to patch a reservation item. Required. + :type parameters: ~azure.mgmt.reservations.models.Patch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ReservationResponse or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.ReservationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + reservation_order_id: str, + reservation_id: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ReservationResponse]: + """Updates a ``Reservation``. + + Updates the applied scopes of the ``Reservation``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param parameters: Information needed to patch a reservation item. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ReservationResponse or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.ReservationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, reservation_order_id: str, reservation_id: str, parameters: Union[_models.Patch, IO], **kwargs: Any + ) -> AsyncLROPoller[_models.ReservationResponse]: + """Updates a ``Reservation``. + + Updates the applied scopes of the ``Reservation``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param parameters: Information needed to patch a reservation item. Is either a model type or a + IO type. Required. + :type parameters: ~azure.mgmt.reservations.models.Patch or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ReservationResponse or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.ReservationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationResponse] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( # type: ignore + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ReservationResponse", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}"} # type: ignore + + @distributed_trace_async + async def archive( # pylint: disable=inconsistent-return-statements + self, reservation_order_id: str, reservation_id: str, **kwargs: Any + ) -> None: + """Archive a ``Reservation``. + + Archiving a ``Reservation`` moves it to ``Archived`` state. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_archive_request( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + api_version=api_version, + template_url=self.archive.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + archive.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/archive"} # type: ignore + + @distributed_trace_async + async def unarchive( # pylint: disable=inconsistent-return-statements + self, reservation_order_id: str, reservation_id: str, **kwargs: Any + ) -> None: + """Unarchive a ``Reservation``. + + Unarchiving a ``Reservation`` moves it to the state it was before archiving. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_unarchive_request( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + api_version=api_version, + template_url=self.unarchive.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + unarchive.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive"} # type: ignore + + @distributed_trace + def list_revisions( + self, reservation_id: str, reservation_order_id: str, **kwargs: Any + ) -> AsyncIterable["_models.ReservationResponse"]: + """Get ``Reservation`` revisions. + + List of all the revisions for the ``Reservation``. + + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ReservationResponse or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.reservations.models.ReservationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationList] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_revisions_request( + reservation_id=reservation_id, + reservation_order_id=reservation_order_id, + api_version=api_version, + template_url=self.list_revisions.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ReservationList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_revisions.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/revisions"} # type: ignore + + @distributed_trace + def list_all( + self, + filter: Optional[str] = None, + orderby: Optional[str] = None, + refresh_summary: Optional[str] = None, + skiptoken: Optional[float] = None, + selected_state: Optional[str] = None, + take: Optional[float] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ReservationResponse"]: + """List the reservations and the roll up counts of reservations group by provisioning states that + the user has access to in the current tenant. + + :param filter: May be used to filter by reservation properties. The filter supports 'eq', 'or', + and 'and'. It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'. Reservation + properties include sku/name, properties/{appliedScopeType, archived, displayName, + displayProvisioningState, effectiveDateTime, expiryDate, provisioningState, quantity, renew, + reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState}. Default + value is None. + :type filter: str + :param orderby: May be used to sort order by reservation properties. Default value is None. + :type orderby: str + :param refresh_summary: To indicate whether to refresh the roll up counts of the reservations + group by provisioning states. Default value is None. + :type refresh_summary: str + :param skiptoken: The number of reservations to skip from the list before returning results. + Default value is None. + :type skiptoken: float + :param selected_state: The selected provisioning state. Default value is None. + :type selected_state: str + :param take: To number of reservations to return. Default value is None. + :type take: float + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ReservationResponse or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.reservations.models.ReservationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationsListResult] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_all_request( + filter=filter, + orderby=orderby, + refresh_summary=refresh_summary, + skiptoken=skiptoken, + selected_state=selected_state, + take=take, + api_version=api_version, + template_url=self.list_all.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ReservationsListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_all.metadata = {"url": "/providers/Microsoft.Capacity/reservations"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_reservation_order_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_reservation_order_operations.py new file mode 100644 index 00000000000..90a99a115ed --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_reservation_order_operations.py @@ -0,0 +1,640 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._reservation_order_operations import ( + build_calculate_request, + build_change_directory_request, + build_get_request, + build_list_request, + build_purchase_request, +) +from .._vendor import MixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ReservationOrderOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.aio.AzureReservationAPI`'s + :attr:`reservation_order` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + async def calculate( + self, body: _models.PurchaseRequest, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CalculatePriceResponse: + """Calculate price for a ``ReservationOrder``. + + Calculate price for placing a ``ReservationOrder``. + + :param body: Information needed for calculate or purchase reservation. Required. + :type body: ~azure.mgmt.reservations.models.PurchaseRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CalculatePriceResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CalculatePriceResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def calculate( + self, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CalculatePriceResponse: + """Calculate price for a ``ReservationOrder``. + + Calculate price for placing a ``ReservationOrder``. + + :param body: Information needed for calculate or purchase reservation. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CalculatePriceResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CalculatePriceResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def calculate( + self, body: Union[_models.PurchaseRequest, IO], **kwargs: Any + ) -> _models.CalculatePriceResponse: + """Calculate price for a ``ReservationOrder``. + + Calculate price for placing a ``ReservationOrder``. + + :param body: Information needed for calculate or purchase reservation. Is either a model type + or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.PurchaseRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CalculatePriceResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CalculatePriceResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CalculatePriceResponse] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "PurchaseRequest") + + request = build_calculate_request( + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.calculate.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CalculatePriceResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + calculate.metadata = {"url": "/providers/Microsoft.Capacity/calculatePrice"} # type: ignore + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncIterable["_models.ReservationOrderResponse"]: + """Get all ``ReservationOrder``\ s. + + List of all the ``ReservationOrder``\ s that the user has access to in the current tenant. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ReservationOrderResponse or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.reservations.models.ReservationOrderResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationOrderList] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ReservationOrderList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders"} # type: ignore + + async def _purchase_initial( + self, reservation_order_id: str, body: Union[_models.PurchaseRequest, IO], **kwargs: Any + ) -> _models.ReservationOrderResponse: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationOrderResponse] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "PurchaseRequest") + + request = build_purchase_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._purchase_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("ReservationOrderResponse", pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize("ReservationOrderResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _purchase_initial.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}"} # type: ignore + + @overload + async def begin_purchase( + self, + reservation_order_id: str, + body: _models.PurchaseRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ReservationOrderResponse]: + """Purchase ``ReservationOrder``. + + Purchase ``ReservationOrder`` and create resource under the specified URI. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for calculate or purchase reservation. Required. + :type body: ~azure.mgmt.reservations.models.PurchaseRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ReservationOrderResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.ReservationOrderResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_purchase( + self, reservation_order_id: str, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.ReservationOrderResponse]: + """Purchase ``ReservationOrder``. + + Purchase ``ReservationOrder`` and create resource under the specified URI. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for calculate or purchase reservation. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ReservationOrderResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.ReservationOrderResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_purchase( + self, reservation_order_id: str, body: Union[_models.PurchaseRequest, IO], **kwargs: Any + ) -> AsyncLROPoller[_models.ReservationOrderResponse]: + """Purchase ``ReservationOrder``. + + Purchase ``ReservationOrder`` and create resource under the specified URI. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for calculate or purchase reservation. Is either a model type + or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.PurchaseRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ReservationOrderResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.reservations.models.ReservationOrderResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationOrderResponse] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = await self._purchase_initial( # type: ignore + reservation_order_id=reservation_order_id, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ReservationOrderResponse", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_purchase.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}"} # type: ignore + + @distributed_trace_async + async def get( + self, reservation_order_id: str, expand: Optional[str] = None, **kwargs: Any + ) -> _models.ReservationOrderResponse: + """Get a specific ``ReservationOrder``. + + Get the details of the ``ReservationOrder``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param expand: May be used to expand the planInformation. Default value is None. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ReservationOrderResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.ReservationOrderResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationOrderResponse] + + request = build_get_request( + reservation_order_id=reservation_order_id, + expand=expand, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ReservationOrderResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}"} # type: ignore + + @overload + async def change_directory( + self, + reservation_order_id: str, + body: _models.ChangeDirectoryRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ChangeDirectoryResponse: + """Change directory of ``ReservationOrder``. + + Change directory (tenant) of ``ReservationOrder`` and all ``Reservation`` under it to specified + tenant id. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed to change directory of reservation order. Required. + :type body: ~azure.mgmt.reservations.models.ChangeDirectoryRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ChangeDirectoryResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.ChangeDirectoryResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def change_directory( + self, reservation_order_id: str, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ChangeDirectoryResponse: + """Change directory of ``ReservationOrder``. + + Change directory (tenant) of ``ReservationOrder`` and all ``Reservation`` under it to specified + tenant id. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed to change directory of reservation order. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ChangeDirectoryResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.ChangeDirectoryResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def change_directory( + self, reservation_order_id: str, body: Union[_models.ChangeDirectoryRequest, IO], **kwargs: Any + ) -> _models.ChangeDirectoryResponse: + """Change directory of ``ReservationOrder``. + + Change directory (tenant) of ``ReservationOrder`` and all ``Reservation`` under it to specified + tenant id. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed to change directory of reservation order. Is either a model + type or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.ChangeDirectoryRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ChangeDirectoryResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.ChangeDirectoryResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ChangeDirectoryResponse] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "ChangeDirectoryRequest") + + request = build_change_directory_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.change_directory.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ChangeDirectoryResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + change_directory.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/changeDirectory"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_return_operations_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_return_operations_operations.py new file mode 100644 index 00000000000..d9eba33015f --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/aio/operations/_return_operations_operations.py @@ -0,0 +1,179 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._return_operations_operations import build_post_request +from .._vendor import MixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ReturnOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.aio.AzureReservationAPI`'s + :attr:`return_operations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + async def post( + self, + reservation_order_id: str, + body: _models.RefundRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.RefundResponse: + """Return a reservation. + + Return a reservation. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for returning reservation. Required. + :type body: ~azure.mgmt.reservations.models.RefundRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RefundResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.RefundResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def post( + self, reservation_order_id: str, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.RefundResponse: + """Return a reservation. + + Return a reservation. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for returning reservation. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RefundResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.RefundResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def post( + self, reservation_order_id: str, body: Union[_models.RefundRequest, IO], **kwargs: Any + ) -> _models.RefundResponse: + """Return a reservation. + + Return a reservation. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for returning reservation. Is either a model type or a IO type. + Required. + :type body: ~azure.mgmt.reservations.models.RefundRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RefundResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.RefundResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.RefundResponse] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "RefundRequest") + + request = build_post_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.post.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = self._deserialize("RefundResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + post.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/return"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/models/__init__.py b/src/reservation/azext_reservation/vendored_sdks/reservations/models/__init__.py new file mode 100644 index 00000000000..ac1cc9edac3 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/models/__init__.py @@ -0,0 +1,249 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._models_py3 import AppliedReservationList +from ._models_py3 import AppliedReservations +from ._models_py3 import AvailableScopeProperties +from ._models_py3 import AvailableScopeRequest +from ._models_py3 import AvailableScopeRequestProperties +from ._models_py3 import BillingInformation +from ._models_py3 import CalculateExchangeOperationResultResponse +from ._models_py3 import CalculateExchangeRequest +from ._models_py3 import CalculateExchangeRequestProperties +from ._models_py3 import CalculateExchangeResponseProperties +from ._models_py3 import CalculatePriceResponse +from ._models_py3 import CalculatePriceResponseProperties +from ._models_py3 import CalculatePriceResponsePropertiesBillingCurrencyTotal +from ._models_py3 import CalculatePriceResponsePropertiesPricingCurrencyTotal +from ._models_py3 import CalculateRefundRequest +from ._models_py3 import CalculateRefundRequestProperties +from ._models_py3 import CalculateRefundResponse +from ._models_py3 import Catalog +from ._models_py3 import CatalogMsrp +from ._models_py3 import ChangeDirectoryRequest +from ._models_py3 import ChangeDirectoryResponse +from ._models_py3 import ChangeDirectoryResult +from ._models_py3 import CreateGenericQuotaRequestParameters +from ._models_py3 import CurrentQuotaLimit +from ._models_py3 import CurrentQuotaLimitBase +from ._models_py3 import Error +from ._models_py3 import ErrorDetails +from ._models_py3 import ErrorResponse +from ._models_py3 import ExceptionResponse +from ._models_py3 import ExchangeOperationResultResponse +from ._models_py3 import ExchangePolicyError +from ._models_py3 import ExchangePolicyErrors +from ._models_py3 import ExchangeRequest +from ._models_py3 import ExchangeRequestProperties +from ._models_py3 import ExchangeResponseProperties +from ._models_py3 import ExtendedErrorInfo +from ._models_py3 import ExtendedStatusInfo +from ._models_py3 import MergeRequest +from ._models_py3 import OperationDisplay +from ._models_py3 import OperationList +from ._models_py3 import OperationResponse +from ._models_py3 import OperationResultError +from ._models_py3 import Patch +from ._models_py3 import PatchPropertiesRenewProperties +from ._models_py3 import PaymentDetail +from ._models_py3 import Price +from ._models_py3 import PurchaseRequest +from ._models_py3 import PurchaseRequestPropertiesReservedResourceProperties +from ._models_py3 import QuotaLimits +from ._models_py3 import QuotaLimitsResponse +from ._models_py3 import QuotaProperties +from ._models_py3 import QuotaRequestDetails +from ._models_py3 import QuotaRequestDetailsList +from ._models_py3 import QuotaRequestOneResourceSubmitResponse +from ._models_py3 import QuotaRequestProperties +from ._models_py3 import QuotaRequestSubmitResponse +from ._models_py3 import QuotaRequestSubmitResponse201 +from ._models_py3 import RefundBillingInformation +from ._models_py3 import RefundPolicyError +from ._models_py3 import RefundPolicyResult +from ._models_py3 import RefundPolicyResultProperty +from ._models_py3 import RefundRequest +from ._models_py3 import RefundRequestProperties +from ._models_py3 import RefundResponse +from ._models_py3 import RefundResponseProperties +from ._models_py3 import RenewPropertiesResponse +from ._models_py3 import RenewPropertiesResponseBillingCurrencyTotal +from ._models_py3 import RenewPropertiesResponsePricingCurrencyTotal +from ._models_py3 import ReservationList +from ._models_py3 import ReservationMergeProperties +from ._models_py3 import ReservationOrderBillingPlanInformation +from ._models_py3 import ReservationOrderList +from ._models_py3 import ReservationOrderResponse +from ._models_py3 import ReservationResponse +from ._models_py3 import ReservationSplitProperties +from ._models_py3 import ReservationSummary +from ._models_py3 import ReservationToExchange +from ._models_py3 import ReservationToPurchaseCalculateExchange +from ._models_py3 import ReservationToPurchaseExchange +from ._models_py3 import ReservationToReturn +from ._models_py3 import ReservationToReturnForExchange +from ._models_py3 import ReservationUtilizationAggregates +from ._models_py3 import ReservationsListResult +from ._models_py3 import ReservationsProperties +from ._models_py3 import ReservationsPropertiesUtilization +from ._models_py3 import ResourceName +from ._models_py3 import ScopeProperties +from ._models_py3 import ServiceError +from ._models_py3 import ServiceErrorDetail +from ._models_py3 import SkuCapability +from ._models_py3 import SkuName +from ._models_py3 import SkuProperty +from ._models_py3 import SkuRestriction +from ._models_py3 import SplitRequest +from ._models_py3 import SubRequest +from ._models_py3 import SubscriptionScopeProperties +from ._models_py3 import SystemData + +from ._azure_reservation_api_enums import AppliedScopeType +from ._azure_reservation_api_enums import CalculateExchangeOperationResultStatus +from ._azure_reservation_api_enums import CreatedByType +from ._azure_reservation_api_enums import DisplayProvisioningState +from ._azure_reservation_api_enums import ErrorResponseCode +from ._azure_reservation_api_enums import ExchangeOperationResultStatus +from ._azure_reservation_api_enums import InstanceFlexibility +from ._azure_reservation_api_enums import Location +from ._azure_reservation_api_enums import OperationStatus +from ._azure_reservation_api_enums import PaymentStatus +from ._azure_reservation_api_enums import ProvisioningState +from ._azure_reservation_api_enums import QuotaRequestState +from ._azure_reservation_api_enums import ReservationBillingPlan +from ._azure_reservation_api_enums import ReservationStatusCode +from ._azure_reservation_api_enums import ReservationTerm +from ._azure_reservation_api_enums import ReservedResourceType +from ._azure_reservation_api_enums import ResourceType +from ._azure_reservation_api_enums import UserFriendlyAppliedScopeType +from ._azure_reservation_api_enums import UserFriendlyRenewState +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "AppliedReservationList", + "AppliedReservations", + "AvailableScopeProperties", + "AvailableScopeRequest", + "AvailableScopeRequestProperties", + "BillingInformation", + "CalculateExchangeOperationResultResponse", + "CalculateExchangeRequest", + "CalculateExchangeRequestProperties", + "CalculateExchangeResponseProperties", + "CalculatePriceResponse", + "CalculatePriceResponseProperties", + "CalculatePriceResponsePropertiesBillingCurrencyTotal", + "CalculatePriceResponsePropertiesPricingCurrencyTotal", + "CalculateRefundRequest", + "CalculateRefundRequestProperties", + "CalculateRefundResponse", + "Catalog", + "CatalogMsrp", + "ChangeDirectoryRequest", + "ChangeDirectoryResponse", + "ChangeDirectoryResult", + "CreateGenericQuotaRequestParameters", + "CurrentQuotaLimit", + "CurrentQuotaLimitBase", + "Error", + "ErrorDetails", + "ErrorResponse", + "ExceptionResponse", + "ExchangeOperationResultResponse", + "ExchangePolicyError", + "ExchangePolicyErrors", + "ExchangeRequest", + "ExchangeRequestProperties", + "ExchangeResponseProperties", + "ExtendedErrorInfo", + "ExtendedStatusInfo", + "MergeRequest", + "OperationDisplay", + "OperationList", + "OperationResponse", + "OperationResultError", + "Patch", + "PatchPropertiesRenewProperties", + "PaymentDetail", + "Price", + "PurchaseRequest", + "PurchaseRequestPropertiesReservedResourceProperties", + "QuotaLimits", + "QuotaLimitsResponse", + "QuotaProperties", + "QuotaRequestDetails", + "QuotaRequestDetailsList", + "QuotaRequestOneResourceSubmitResponse", + "QuotaRequestProperties", + "QuotaRequestSubmitResponse", + "QuotaRequestSubmitResponse201", + "RefundBillingInformation", + "RefundPolicyError", + "RefundPolicyResult", + "RefundPolicyResultProperty", + "RefundRequest", + "RefundRequestProperties", + "RefundResponse", + "RefundResponseProperties", + "RenewPropertiesResponse", + "RenewPropertiesResponseBillingCurrencyTotal", + "RenewPropertiesResponsePricingCurrencyTotal", + "ReservationList", + "ReservationMergeProperties", + "ReservationOrderBillingPlanInformation", + "ReservationOrderList", + "ReservationOrderResponse", + "ReservationResponse", + "ReservationSplitProperties", + "ReservationSummary", + "ReservationToExchange", + "ReservationToPurchaseCalculateExchange", + "ReservationToPurchaseExchange", + "ReservationToReturn", + "ReservationToReturnForExchange", + "ReservationUtilizationAggregates", + "ReservationsListResult", + "ReservationsProperties", + "ReservationsPropertiesUtilization", + "ResourceName", + "ScopeProperties", + "ServiceError", + "ServiceErrorDetail", + "SkuCapability", + "SkuName", + "SkuProperty", + "SkuRestriction", + "SplitRequest", + "SubRequest", + "SubscriptionScopeProperties", + "SystemData", + "AppliedScopeType", + "CalculateExchangeOperationResultStatus", + "CreatedByType", + "DisplayProvisioningState", + "ErrorResponseCode", + "ExchangeOperationResultStatus", + "InstanceFlexibility", + "Location", + "OperationStatus", + "PaymentStatus", + "ProvisioningState", + "QuotaRequestState", + "ReservationBillingPlan", + "ReservationStatusCode", + "ReservationTerm", + "ReservedResourceType", + "ResourceType", + "UserFriendlyAppliedScopeType", + "UserFriendlyRenewState", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/models/_azure_reservation_api_enums.py b/src/reservation/azext_reservation/vendored_sdks/reservations/models/_azure_reservation_api_enums.py new file mode 100644 index 00000000000..839cd4d2708 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/models/_azure_reservation_api_enums.py @@ -0,0 +1,297 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class AppliedScopeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of the Applied Scope.""" + + SINGLE = "Single" + SHARED = "Shared" + + +class CalculateExchangeOperationResultStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Status of the operation.""" + + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELLED = "Cancelled" + PENDING = "Pending" + + +class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of identity that created the resource.""" + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + + +class DisplayProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Represent the current display state of the Reservation.""" + + SUCCEEDED = "Succeeded" + EXPIRING = "Expiring" + EXPIRED = "Expired" + PENDING = "Pending" + PROCESSING = "Processing" + CANCELLED = "Cancelled" + FAILED = "Failed" + + +class ErrorResponseCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """ErrorResponseCode.""" + + NOT_SPECIFIED = "NotSpecified" + INTERNAL_SERVER_ERROR = "InternalServerError" + SERVER_TIMEOUT = "ServerTimeout" + AUTHORIZATION_FAILED = "AuthorizationFailed" + BAD_REQUEST = "BadRequest" + CLIENT_CERTIFICATE_THUMBPRINT_NOT_SET = "ClientCertificateThumbprintNotSet" + INVALID_REQUEST_CONTENT = "InvalidRequestContent" + OPERATION_FAILED = "OperationFailed" + HTTP_METHOD_NOT_SUPPORTED = "HttpMethodNotSupported" + INVALID_REQUEST_URI = "InvalidRequestUri" + MISSING_TENANT_ID = "MissingTenantId" + INVALID_TENANT_ID = "InvalidTenantId" + INVALID_RESERVATION_ORDER_ID = "InvalidReservationOrderId" + INVALID_RESERVATION_ID = "InvalidReservationId" + RESERVATION_ID_NOT_IN_RESERVATION_ORDER = "ReservationIdNotInReservationOrder" + RESERVATION_ORDER_NOT_FOUND = "ReservationOrderNotFound" + INVALID_SUBSCRIPTION_ID = "InvalidSubscriptionId" + INVALID_ACCESS_TOKEN = "InvalidAccessToken" + INVALID_LOCATION_ID = "InvalidLocationId" + UNAUTHENTICATED_REQUESTS_THROTTLED = "UnauthenticatedRequestsThrottled" + INVALID_HEALTH_CHECK_TYPE = "InvalidHealthCheckType" + FORBIDDEN = "Forbidden" + BILLING_SCOPE_ID_CANNOT_BE_CHANGED = "BillingScopeIdCannotBeChanged" + APPLIED_SCOPES_NOT_ASSOCIATED_WITH_COMMERCE_ACCOUNT = "AppliedScopesNotAssociatedWithCommerceAccount" + PATCH_VALUES_SAME_AS_EXISTING = "PatchValuesSameAsExisting" + ROLE_ASSIGNMENT_CREATION_FAILED = "RoleAssignmentCreationFailed" + RESERVATION_ORDER_CREATION_FAILED = "ReservationOrderCreationFailed" + RESERVATION_ORDER_NOT_ENABLED = "ReservationOrderNotEnabled" + CAPACITY_UPDATE_SCOPES_FAILED = "CapacityUpdateScopesFailed" + UNSUPPORTED_RESERVATION_TERM = "UnsupportedReservationTerm" + RESERVATION_ORDER_ID_ALREADY_EXISTS = "ReservationOrderIdAlreadyExists" + RISK_CHECK_FAILED = "RiskCheckFailed" + CREATE_QUOTE_FAILED = "CreateQuoteFailed" + ACTIVATE_QUOTE_FAILED = "ActivateQuoteFailed" + NONSUPPORTED_ACCOUNT_ID = "NonsupportedAccountId" + PAYMENT_INSTRUMENT_NOT_FOUND = "PaymentInstrumentNotFound" + MISSING_APPLIED_SCOPES_FOR_SINGLE = "MissingAppliedScopesForSingle" + NO_VALID_RESERVATIONS_TO_RE_RATE = "NoValidReservationsToReRate" + RE_RATE_ONLY_ALLOWED_FOR_EA = "ReRateOnlyAllowedForEA" + OPERATION_CANNOT_BE_PERFORMED_IN_CURRENT_STATE = "OperationCannotBePerformedInCurrentState" + INVALID_SINGLE_APPLIED_SCOPES_COUNT = "InvalidSingleAppliedScopesCount" + INVALID_FULFILLMENT_REQUEST_PARAMETERS = "InvalidFulfillmentRequestParameters" + NOT_SUPPORTED_COUNTRY = "NotSupportedCountry" + INVALID_REFUND_QUANTITY = "InvalidRefundQuantity" + PURCHASE_ERROR = "PurchaseError" + BILLING_CUSTOMER_INPUT_ERROR = "BillingCustomerInputError" + BILLING_PAYMENT_INSTRUMENT_SOFT_ERROR = "BillingPaymentInstrumentSoftError" + BILLING_PAYMENT_INSTRUMENT_HARD_ERROR = "BillingPaymentInstrumentHardError" + BILLING_TRANSIENT_ERROR = "BillingTransientError" + BILLING_ERROR = "BillingError" + FULFILLMENT_CONFIGURATION_ERROR = "FulfillmentConfigurationError" + FULFILLMENT_OUT_OF_STOCK_ERROR = "FulfillmentOutOfStockError" + FULFILLMENT_TRANSIENT_ERROR = "FulfillmentTransientError" + FULFILLMENT_ERROR = "FulfillmentError" + CALCULATE_PRICE_FAILED = "CalculatePriceFailed" + APPLIED_SCOPES_SAME_AS_EXISTING = "AppliedScopesSameAsExisting" + SELF_SERVICE_REFUND_NOT_SUPPORTED = "SelfServiceRefundNotSupported" + REFUND_LIMIT_EXCEEDED = "RefundLimitExceeded" + + +class ExchangeOperationResultStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Status of the operation.""" + + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELLED = "Cancelled" + PENDING_REFUNDS = "PendingRefunds" + PENDING_PURCHASES = "PendingPurchases" + + +class InstanceFlexibility(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Turning this on will apply the reservation discount to other VMs in the same VM size group. + Only specify for VirtualMachines reserved resource type. + """ + + ON = "On" + OFF = "Off" + + +class Location(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Location in which the Resources needs to be reserved. It cannot be changed after the resource + has been created. + """ + + WESTUS = "westus" + EASTUS = "eastus" + EASTUS2 = "eastus2" + NORTHCENTRALUS = "northcentralus" + WESTUS2 = "westus2" + SOUTHCENTRALUS = "southcentralus" + CENTRALUS = "centralus" + WESTEUROPE = "westeurope" + NORTHEUROPE = "northeurope" + EASTASIA = "eastasia" + SOUTHEASTASIA = "southeastasia" + JAPANEAST = "japaneast" + JAPANWEST = "japanwest" + BRAZILSOUTH = "brazilsouth" + AUSTRALIAEAST = "australiaeast" + AUSTRALIASOUTHEAST = "australiasoutheast" + SOUTHINDIA = "southindia" + WESTINDIA = "westindia" + CENTRALINDIA = "centralindia" + CANADACENTRAL = "canadacentral" + CANADAEAST = "canadaeast" + UKSOUTH = "uksouth" + WESTCENTRALUS = "westcentralus" + UKWEST = "ukwest" + + +class OperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Status of the individual operation.""" + + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELLED = "Cancelled" + PENDING = "Pending" + + +class PaymentStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Describes whether the payment is completed, failed, cancelled or scheduled in the future.""" + + SUCCEEDED = "Succeeded" + FAILED = "Failed" + SCHEDULED = "Scheduled" + CANCELLED = "Cancelled" + + +class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Represent the current state of the Reservation.""" + + CREATING = "Creating" + PENDING_RESOURCE_HOLD = "PendingResourceHold" + CONFIRMED_RESOURCE_HOLD = "ConfirmedResourceHold" + PENDING_BILLING = "PendingBilling" + CONFIRMED_BILLING = "ConfirmedBilling" + CREATED = "Created" + SUCCEEDED = "Succeeded" + CANCELLED = "Cancelled" + EXPIRED = "Expired" + BILLING_FAILED = "BillingFailed" + FAILED = "Failed" + SPLIT = "Split" + MERGED = "Merged" + + +class QuotaRequestState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The quota request status.""" + + ACCEPTED = "Accepted" + INVALID = "Invalid" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + IN_PROGRESS = "InProgress" + + +class ReservationBillingPlan(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Represent the billing plans.""" + + UPFRONT = "Upfront" + MONTHLY = "Monthly" + + +class ReservationStatusCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """ReservationStatusCode.""" + + NONE = "None" + PENDING = "Pending" + PROCESSING = "Processing" + ACTIVE = "Active" + PURCHASE_ERROR = "PurchaseError" + PAYMENT_INSTRUMENT_ERROR = "PaymentInstrumentError" + SPLIT = "Split" + MERGED = "Merged" + EXPIRED = "Expired" + SUCCEEDED = "Succeeded" + + +class ReservationTerm(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Represent the term of Reservation.""" + + P1_Y = "P1Y" + P3_Y = "P3Y" + P5_Y = "P5Y" + + +class ReservedResourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the resource that is being reserved.""" + + VIRTUAL_MACHINES = "VirtualMachines" + SQL_DATABASES = "SqlDatabases" + SUSE_LINUX = "SuseLinux" + COSMOS_DB = "CosmosDb" + RED_HAT = "RedHat" + SQL_DATA_WAREHOUSE = "SqlDataWarehouse" + V_MWARE_CLOUD_SIMPLE = "VMwareCloudSimple" + RED_HAT_OSA = "RedHatOsa" + DATABRICKS = "Databricks" + APP_SERVICE = "AppService" + MANAGED_DISK = "ManagedDisk" + BLOCK_BLOB = "BlockBlob" + REDIS_CACHE = "RedisCache" + AZURE_DATA_EXPLORER = "AzureDataExplorer" + MY_SQL = "MySql" + MARIA_DB = "MariaDb" + POSTGRE_SQL = "PostgreSql" + DEDICATED_HOST = "DedicatedHost" + SAP_HANA = "SapHana" + SQL_AZURE_HYBRID_BENEFIT = "SqlAzureHybridBenefit" + AVS = "AVS" + DATA_FACTORY = "DataFactory" + NET_APP_STORAGE = "NetAppStorage" + AZURE_FILES = "AzureFiles" + SQL_EDGE = "SqlEdge" + VIRTUAL_MACHINE_SOFTWARE = "VirtualMachineSoftware" + + +class ResourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The resource types.""" + + STANDARD = "standard" + DEDICATED = "dedicated" + LOW_PRIORITY = "lowPriority" + SHARED = "shared" + SERVICE_SPECIFIC = "serviceSpecific" + + +class UserFriendlyAppliedScopeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The applied scope type.""" + + NONE = "None" + SHARED = "Shared" + SINGLE = "Single" + RESOURCE_GROUP = "ResourceGroup" + MANAGEMENT_GROUP = "ManagementGroup" + + +class UserFriendlyRenewState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The renew state of the reservation.""" + + ON = "On" + OFF = "Off" + RENEWED = "Renewed" + NOT_RENEWED = "NotRenewed" + NOT_APPLICABLE = "NotApplicable" diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/models/_models_py3.py b/src/reservation/azext_reservation/vendored_sdks/reservations/models/_models_py3.py new file mode 100644 index 00000000000..90725a0fddf --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/models/_models_py3.py @@ -0,0 +1,4229 @@ +# coding=utf-8 +# pylint: disable=too-many-lines +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +import sys +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union + +from .. import _serialization + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from .. import models as _models +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object + + +class AppliedReservationList(_serialization.Model): + """AppliedReservationList. + + :ivar value: + :vartype value: list[str] + :ivar next_link: Url to get the next page of reservations. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[str]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[List[str]] = None, next_link: Optional[str] = None, **kwargs): + """ + :keyword value: + :paramtype value: list[str] + :keyword next_link: Url to get the next page of reservations. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AppliedReservations(_serialization.Model): + """AppliedReservations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Identifier of the applied reservations. + :vartype id: str + :ivar name: Name of resource. + :vartype name: str + :ivar type: Type of resource. "Microsoft.Capacity/AppliedReservations". + :vartype type: str + :ivar reservation_order_ids: + :vartype reservation_order_ids: ~azure.mgmt.reservations.models.AppliedReservationList + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "reservation_order_ids": {"key": "properties.reservationOrderIds", "type": "AppliedReservationList"}, + } + + def __init__(self, *, reservation_order_ids: Optional["_models.AppliedReservationList"] = None, **kwargs): + """ + :keyword reservation_order_ids: + :paramtype reservation_order_ids: ~azure.mgmt.reservations.models.AppliedReservationList + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.reservation_order_ids = reservation_order_ids + + +class AvailableScopeProperties(_serialization.Model): + """AvailableScopeProperties. + + :ivar properties: + :vartype properties: ~azure.mgmt.reservations.models.SubscriptionScopeProperties + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "SubscriptionScopeProperties"}, + } + + def __init__(self, *, properties: Optional["_models.SubscriptionScopeProperties"] = None, **kwargs): + """ + :keyword properties: + :paramtype properties: ~azure.mgmt.reservations.models.SubscriptionScopeProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class AvailableScopeRequest(_serialization.Model): + """Available scope. + + :ivar properties: Available scope request properties. + :vartype properties: ~azure.mgmt.reservations.models.AvailableScopeRequestProperties + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "AvailableScopeRequestProperties"}, + } + + def __init__(self, *, properties: Optional["_models.AvailableScopeRequestProperties"] = None, **kwargs): + """ + :keyword properties: Available scope request properties. + :paramtype properties: ~azure.mgmt.reservations.models.AvailableScopeRequestProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class AvailableScopeRequestProperties(_serialization.Model): + """Available scope request properties. + + :ivar scopes: + :vartype scopes: list[str] + """ + + _attribute_map = { + "scopes": {"key": "scopes", "type": "[str]"}, + } + + def __init__(self, *, scopes: Optional[List[str]] = None, **kwargs): + """ + :keyword scopes: + :paramtype scopes: list[str] + """ + super().__init__(**kwargs) + self.scopes = scopes + + +class BillingInformation(_serialization.Model): + """billing information. + + :ivar billing_currency_total_paid_amount: + :vartype billing_currency_total_paid_amount: ~azure.mgmt.reservations.models.Price + :ivar billing_currency_prorated_amount: + :vartype billing_currency_prorated_amount: ~azure.mgmt.reservations.models.Price + :ivar billing_currency_remaining_commitment_amount: + :vartype billing_currency_remaining_commitment_amount: ~azure.mgmt.reservations.models.Price + """ + + _attribute_map = { + "billing_currency_total_paid_amount": {"key": "billingCurrencyTotalPaidAmount", "type": "Price"}, + "billing_currency_prorated_amount": {"key": "billingCurrencyProratedAmount", "type": "Price"}, + "billing_currency_remaining_commitment_amount": { + "key": "billingCurrencyRemainingCommitmentAmount", + "type": "Price", + }, + } + + def __init__( + self, + *, + billing_currency_total_paid_amount: Optional["_models.Price"] = None, + billing_currency_prorated_amount: Optional["_models.Price"] = None, + billing_currency_remaining_commitment_amount: Optional["_models.Price"] = None, + **kwargs + ): + """ + :keyword billing_currency_total_paid_amount: + :paramtype billing_currency_total_paid_amount: ~azure.mgmt.reservations.models.Price + :keyword billing_currency_prorated_amount: + :paramtype billing_currency_prorated_amount: ~azure.mgmt.reservations.models.Price + :keyword billing_currency_remaining_commitment_amount: + :paramtype billing_currency_remaining_commitment_amount: ~azure.mgmt.reservations.models.Price + """ + super().__init__(**kwargs) + self.billing_currency_total_paid_amount = billing_currency_total_paid_amount + self.billing_currency_prorated_amount = billing_currency_prorated_amount + self.billing_currency_remaining_commitment_amount = billing_currency_remaining_commitment_amount + + +class CalculateExchangeOperationResultResponse(_serialization.Model): + """CalculateExchange operation result. + + :ivar id: It should match what is used to GET the operation result. + :vartype id: str + :ivar name: It must match the last segment of the id field, and will typically be a GUID / + system generated value. + :vartype name: str + :ivar status: Status of the operation. Known values are: "Succeeded", "Failed", "Cancelled", + and "Pending". + :vartype status: str or ~azure.mgmt.reservations.models.CalculateExchangeOperationResultStatus + :ivar properties: CalculateExchange response properties. + :vartype properties: ~azure.mgmt.reservations.models.CalculateExchangeResponseProperties + :ivar error: Required if status == failed or status == canceled. + :vartype error: ~azure.mgmt.reservations.models.OperationResultError + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "properties": {"key": "properties", "type": "CalculateExchangeResponseProperties"}, + "error": {"key": "error", "type": "OperationResultError"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + status: Optional[Union[str, "_models.CalculateExchangeOperationResultStatus"]] = None, + properties: Optional["_models.CalculateExchangeResponseProperties"] = None, + error: Optional["_models.OperationResultError"] = None, + **kwargs + ): + """ + :keyword id: It should match what is used to GET the operation result. + :paramtype id: str + :keyword name: It must match the last segment of the id field, and will typically be a GUID / + system generated value. + :paramtype name: str + :keyword status: Status of the operation. Known values are: "Succeeded", "Failed", "Cancelled", + and "Pending". + :paramtype status: str or + ~azure.mgmt.reservations.models.CalculateExchangeOperationResultStatus + :keyword properties: CalculateExchange response properties. + :paramtype properties: ~azure.mgmt.reservations.models.CalculateExchangeResponseProperties + :keyword error: Required if status == failed or status == canceled. + :paramtype error: ~azure.mgmt.reservations.models.OperationResultError + """ + super().__init__(**kwargs) + self.id = id + self.name = name + self.status = status + self.properties = properties + self.error = error + + +class CalculateExchangeRequest(_serialization.Model): + """Calculate exchange request. + + :ivar properties: Calculate exchange request properties. + :vartype properties: ~azure.mgmt.reservations.models.CalculateExchangeRequestProperties + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "CalculateExchangeRequestProperties"}, + } + + def __init__(self, *, properties: Optional["_models.CalculateExchangeRequestProperties"] = None, **kwargs): + """ + :keyword properties: Calculate exchange request properties. + :paramtype properties: ~azure.mgmt.reservations.models.CalculateExchangeRequestProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class CalculateExchangeRequestProperties(_serialization.Model): + """Calculate exchange request properties. + + :ivar reservations_to_purchase: List of reservations that are being purchased in this exchange. + :vartype reservations_to_purchase: list[~azure.mgmt.reservations.models.PurchaseRequest] + :ivar reservations_to_exchange: List of reservations that are being returned in this exchange. + :vartype reservations_to_exchange: list[~azure.mgmt.reservations.models.ReservationToReturn] + """ + + _attribute_map = { + "reservations_to_purchase": {"key": "reservationsToPurchase", "type": "[PurchaseRequest]"}, + "reservations_to_exchange": {"key": "reservationsToExchange", "type": "[ReservationToReturn]"}, + } + + def __init__( + self, + *, + reservations_to_purchase: Optional[List["_models.PurchaseRequest"]] = None, + reservations_to_exchange: Optional[List["_models.ReservationToReturn"]] = None, + **kwargs + ): + """ + :keyword reservations_to_purchase: List of reservations that are being purchased in this + exchange. + :paramtype reservations_to_purchase: list[~azure.mgmt.reservations.models.PurchaseRequest] + :keyword reservations_to_exchange: List of reservations that are being returned in this + exchange. + :paramtype reservations_to_exchange: list[~azure.mgmt.reservations.models.ReservationToReturn] + """ + super().__init__(**kwargs) + self.reservations_to_purchase = reservations_to_purchase + self.reservations_to_exchange = reservations_to_exchange + + +class CalculateExchangeResponseProperties(_serialization.Model): + """CalculateExchange response properties. + + :ivar session_id: Exchange session identifier. + :vartype session_id: str + :ivar net_payable: + :vartype net_payable: ~azure.mgmt.reservations.models.Price + :ivar refunds_total: + :vartype refunds_total: ~azure.mgmt.reservations.models.Price + :ivar purchases_total: + :vartype purchases_total: ~azure.mgmt.reservations.models.Price + :ivar reservations_to_purchase: Details of the reservations being purchased. + :vartype reservations_to_purchase: + list[~azure.mgmt.reservations.models.ReservationToPurchaseCalculateExchange] + :ivar reservations_to_exchange: Details of the reservations being returned. + :vartype reservations_to_exchange: list[~azure.mgmt.reservations.models.ReservationToExchange] + :ivar policy_result: Exchange policy errors. + :vartype policy_result: ~azure.mgmt.reservations.models.ExchangePolicyErrors + """ + + _attribute_map = { + "session_id": {"key": "sessionId", "type": "str"}, + "net_payable": {"key": "netPayable", "type": "Price"}, + "refunds_total": {"key": "refundsTotal", "type": "Price"}, + "purchases_total": {"key": "purchasesTotal", "type": "Price"}, + "reservations_to_purchase": { + "key": "reservationsToPurchase", + "type": "[ReservationToPurchaseCalculateExchange]", + }, + "reservations_to_exchange": {"key": "reservationsToExchange", "type": "[ReservationToExchange]"}, + "policy_result": {"key": "policyResult", "type": "ExchangePolicyErrors"}, + } + + def __init__( + self, + *, + session_id: Optional[str] = None, + net_payable: Optional["_models.Price"] = None, + refunds_total: Optional["_models.Price"] = None, + purchases_total: Optional["_models.Price"] = None, + reservations_to_purchase: Optional[List["_models.ReservationToPurchaseCalculateExchange"]] = None, + reservations_to_exchange: Optional[List["_models.ReservationToExchange"]] = None, + policy_result: Optional["_models.ExchangePolicyErrors"] = None, + **kwargs + ): + """ + :keyword session_id: Exchange session identifier. + :paramtype session_id: str + :keyword net_payable: + :paramtype net_payable: ~azure.mgmt.reservations.models.Price + :keyword refunds_total: + :paramtype refunds_total: ~azure.mgmt.reservations.models.Price + :keyword purchases_total: + :paramtype purchases_total: ~azure.mgmt.reservations.models.Price + :keyword reservations_to_purchase: Details of the reservations being purchased. + :paramtype reservations_to_purchase: + list[~azure.mgmt.reservations.models.ReservationToPurchaseCalculateExchange] + :keyword reservations_to_exchange: Details of the reservations being returned. + :paramtype reservations_to_exchange: + list[~azure.mgmt.reservations.models.ReservationToExchange] + :keyword policy_result: Exchange policy errors. + :paramtype policy_result: ~azure.mgmt.reservations.models.ExchangePolicyErrors + """ + super().__init__(**kwargs) + self.session_id = session_id + self.net_payable = net_payable + self.refunds_total = refunds_total + self.purchases_total = purchases_total + self.reservations_to_purchase = reservations_to_purchase + self.reservations_to_exchange = reservations_to_exchange + self.policy_result = policy_result + + +class CalculatePriceResponse(_serialization.Model): + """CalculatePriceResponse. + + :ivar properties: + :vartype properties: ~azure.mgmt.reservations.models.CalculatePriceResponseProperties + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "CalculatePriceResponseProperties"}, + } + + def __init__(self, *, properties: Optional["_models.CalculatePriceResponseProperties"] = None, **kwargs): + """ + :keyword properties: + :paramtype properties: ~azure.mgmt.reservations.models.CalculatePriceResponseProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class CalculatePriceResponseProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes + """CalculatePriceResponseProperties. + + :ivar billing_currency_total: Currency and amount that customer will be charged in customer's + local currency. Tax is not included. + :vartype billing_currency_total: + ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesBillingCurrencyTotal + :ivar net_total: Net total amount in pricing currency. + :vartype net_total: float + :ivar tax_total: Tax amount in pricing currency. + :vartype tax_total: float + :ivar grand_total: Total amount in pricing currency. + :vartype grand_total: float + :ivar is_tax_included: Whether or not tax is included in grand total. + :vartype is_tax_included: bool + :ivar is_billing_partner_managed: True if billing is managed by Microsoft Partner. Used only + for CSP accounts. + :vartype is_billing_partner_managed: bool + :ivar reservation_order_id: GUID that represents reservation order that can be placed after + calculating price. + :vartype reservation_order_id: str + :ivar sku_title: Title of SKU that is being purchased. + :vartype sku_title: str + :ivar sku_description: Description of SKU that is being purchased. + :vartype sku_description: str + :ivar pricing_currency_total: Amount that Microsoft uses for record. Used during refund for + calculating refund limit. Tax is not included. + :vartype pricing_currency_total: + ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesPricingCurrencyTotal + :ivar payment_schedule: + :vartype payment_schedule: list[~azure.mgmt.reservations.models.PaymentDetail] + """ + + _attribute_map = { + "billing_currency_total": { + "key": "billingCurrencyTotal", + "type": "CalculatePriceResponsePropertiesBillingCurrencyTotal", + }, + "net_total": {"key": "netTotal", "type": "float"}, + "tax_total": {"key": "taxTotal", "type": "float"}, + "grand_total": {"key": "grandTotal", "type": "float"}, + "is_tax_included": {"key": "isTaxIncluded", "type": "bool"}, + "is_billing_partner_managed": {"key": "isBillingPartnerManaged", "type": "bool"}, + "reservation_order_id": {"key": "reservationOrderId", "type": "str"}, + "sku_title": {"key": "skuTitle", "type": "str"}, + "sku_description": {"key": "skuDescription", "type": "str"}, + "pricing_currency_total": { + "key": "pricingCurrencyTotal", + "type": "CalculatePriceResponsePropertiesPricingCurrencyTotal", + }, + "payment_schedule": {"key": "paymentSchedule", "type": "[PaymentDetail]"}, + } + + def __init__( + self, + *, + billing_currency_total: Optional["_models.CalculatePriceResponsePropertiesBillingCurrencyTotal"] = None, + net_total: Optional[float] = None, + tax_total: Optional[float] = None, + grand_total: Optional[float] = None, + is_tax_included: Optional[bool] = None, + is_billing_partner_managed: Optional[bool] = None, + reservation_order_id: Optional[str] = None, + sku_title: Optional[str] = None, + sku_description: Optional[str] = None, + pricing_currency_total: Optional["_models.CalculatePriceResponsePropertiesPricingCurrencyTotal"] = None, + payment_schedule: Optional[List["_models.PaymentDetail"]] = None, + **kwargs + ): + """ + :keyword billing_currency_total: Currency and amount that customer will be charged in + customer's local currency. Tax is not included. + :paramtype billing_currency_total: + ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesBillingCurrencyTotal + :keyword net_total: Net total amount in pricing currency. + :paramtype net_total: float + :keyword tax_total: Tax amount in pricing currency. + :paramtype tax_total: float + :keyword grand_total: Total amount in pricing currency. + :paramtype grand_total: float + :keyword is_tax_included: Whether or not tax is included in grand total. + :paramtype is_tax_included: bool + :keyword is_billing_partner_managed: True if billing is managed by Microsoft Partner. Used only + for CSP accounts. + :paramtype is_billing_partner_managed: bool + :keyword reservation_order_id: GUID that represents reservation order that can be placed after + calculating price. + :paramtype reservation_order_id: str + :keyword sku_title: Title of SKU that is being purchased. + :paramtype sku_title: str + :keyword sku_description: Description of SKU that is being purchased. + :paramtype sku_description: str + :keyword pricing_currency_total: Amount that Microsoft uses for record. Used during refund for + calculating refund limit. Tax is not included. + :paramtype pricing_currency_total: + ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesPricingCurrencyTotal + :keyword payment_schedule: + :paramtype payment_schedule: list[~azure.mgmt.reservations.models.PaymentDetail] + """ + super().__init__(**kwargs) + self.billing_currency_total = billing_currency_total + self.net_total = net_total + self.tax_total = tax_total + self.grand_total = grand_total + self.is_tax_included = is_tax_included + self.is_billing_partner_managed = is_billing_partner_managed + self.reservation_order_id = reservation_order_id + self.sku_title = sku_title + self.sku_description = sku_description + self.pricing_currency_total = pricing_currency_total + self.payment_schedule = payment_schedule + + +class CalculatePriceResponsePropertiesBillingCurrencyTotal(_serialization.Model): + """Currency and amount that customer will be charged in customer's local currency. Tax is not included. + + :ivar currency_code: The ISO 4217 3-letter currency code for the currency used by this purchase + record. + :vartype currency_code: str + :ivar amount: Amount in pricing currency. Tax is not included. + :vartype amount: float + """ + + _attribute_map = { + "currency_code": {"key": "currencyCode", "type": "str"}, + "amount": {"key": "amount", "type": "float"}, + } + + def __init__(self, *, currency_code: Optional[str] = None, amount: Optional[float] = None, **kwargs): + """ + :keyword currency_code: The ISO 4217 3-letter currency code for the currency used by this + purchase record. + :paramtype currency_code: str + :keyword amount: Amount in pricing currency. Tax is not included. + :paramtype amount: float + """ + super().__init__(**kwargs) + self.currency_code = currency_code + self.amount = amount + + +class CalculatePriceResponsePropertiesPricingCurrencyTotal(_serialization.Model): + """Amount that Microsoft uses for record. Used during refund for calculating refund limit. Tax is not included. + + :ivar currency_code: The ISO 4217 3-letter currency code for the currency used by this purchase + record. + :vartype currency_code: str + :ivar amount: + :vartype amount: float + """ + + _attribute_map = { + "currency_code": {"key": "currencyCode", "type": "str"}, + "amount": {"key": "amount", "type": "float"}, + } + + def __init__(self, *, currency_code: Optional[str] = None, amount: Optional[float] = None, **kwargs): + """ + :keyword currency_code: The ISO 4217 3-letter currency code for the currency used by this + purchase record. + :paramtype currency_code: str + :keyword amount: + :paramtype amount: float + """ + super().__init__(**kwargs) + self.currency_code = currency_code + self.amount = amount + + +class CalculateRefundRequest(_serialization.Model): + """CalculateRefundRequest. + + :ivar id: Fully qualified identifier of the reservation order being returned. + :vartype id: str + :ivar properties: + :vartype properties: ~azure.mgmt.reservations.models.CalculateRefundRequestProperties + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "properties": {"key": "properties", "type": "CalculateRefundRequestProperties"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + properties: Optional["_models.CalculateRefundRequestProperties"] = None, + **kwargs + ): + """ + :keyword id: Fully qualified identifier of the reservation order being returned. + :paramtype id: str + :keyword properties: + :paramtype properties: ~azure.mgmt.reservations.models.CalculateRefundRequestProperties + """ + super().__init__(**kwargs) + self.id = id + self.properties = properties + + +class CalculateRefundRequestProperties(_serialization.Model): + """CalculateRefundRequestProperties. + + :ivar scope: The scope of the refund, e.g. Reservation. + :vartype scope: str + :ivar reservation_to_return: Reservation to return. + :vartype reservation_to_return: ~azure.mgmt.reservations.models.ReservationToReturn + """ + + _attribute_map = { + "scope": {"key": "scope", "type": "str"}, + "reservation_to_return": {"key": "reservationToReturn", "type": "ReservationToReturn"}, + } + + def __init__( + self, + *, + scope: Optional[str] = None, + reservation_to_return: Optional["_models.ReservationToReturn"] = None, + **kwargs + ): + """ + :keyword scope: The scope of the refund, e.g. Reservation. + :paramtype scope: str + :keyword reservation_to_return: Reservation to return. + :paramtype reservation_to_return: ~azure.mgmt.reservations.models.ReservationToReturn + """ + super().__init__(**kwargs) + self.scope = scope + self.reservation_to_return = reservation_to_return + + +class CalculateRefundResponse(_serialization.Model): + """CalculateRefundResponse. + + :ivar id: Fully qualified identifier of the reservation being returned. + :vartype id: str + :ivar properties: + :vartype properties: ~azure.mgmt.reservations.models.RefundResponseProperties + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "properties": {"key": "properties", "type": "RefundResponseProperties"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + properties: Optional["_models.RefundResponseProperties"] = None, + **kwargs + ): + """ + :keyword id: Fully qualified identifier of the reservation being returned. + :paramtype id: str + :keyword properties: + :paramtype properties: ~azure.mgmt.reservations.models.RefundResponseProperties + """ + super().__init__(**kwargs) + self.id = id + self.properties = properties + + +class Catalog(_serialization.Model): # pylint: disable=too-many-instance-attributes + """Catalog. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar billing_plans: The billing plan options available for this SKU. + :vartype billing_plans: dict[str, list[str or + ~azure.mgmt.reservations.models.ReservationBillingPlan]] + :ivar terms: Available reservation terms for this resource. + :vartype terms: list[str or ~azure.mgmt.reservations.models.ReservationTerm] + :ivar locations: + :vartype locations: list[str] + :ivar sku_properties: + :vartype sku_properties: list[~azure.mgmt.reservations.models.SkuProperty] + :ivar msrp: Pricing information about the SKU. + :vartype msrp: ~azure.mgmt.reservations.models.CatalogMsrp + :ivar restrictions: + :vartype restrictions: list[~azure.mgmt.reservations.models.SkuRestriction] + :ivar tier: The tier of this SKU. + :vartype tier: str + :ivar size: The size of this SKU. + :vartype size: str + :ivar capabilities: + :vartype capabilities: list[~azure.mgmt.reservations.models.SkuCapability] + """ + + _validation = { + "resource_type": {"readonly": True}, + "name": {"readonly": True}, + "terms": {"readonly": True}, + "locations": {"readonly": True}, + "sku_properties": {"readonly": True}, + "msrp": {"readonly": True}, + "restrictions": {"readonly": True}, + "tier": {"readonly": True}, + "size": {"readonly": True}, + "capabilities": {"readonly": True}, + } + + _attribute_map = { + "resource_type": {"key": "resourceType", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "billing_plans": {"key": "billingPlans", "type": "{[str]}"}, + "terms": {"key": "terms", "type": "[str]"}, + "locations": {"key": "locations", "type": "[str]"}, + "sku_properties": {"key": "skuProperties", "type": "[SkuProperty]"}, + "msrp": {"key": "msrp", "type": "CatalogMsrp"}, + "restrictions": {"key": "restrictions", "type": "[SkuRestriction]"}, + "tier": {"key": "tier", "type": "str"}, + "size": {"key": "size", "type": "str"}, + "capabilities": {"key": "capabilities", "type": "[SkuCapability]"}, + } + + def __init__( + self, *, billing_plans: Optional[Dict[str, List[Union[str, "_models.ReservationBillingPlan"]]]] = None, **kwargs + ): + """ + :keyword billing_plans: The billing plan options available for this SKU. + :paramtype billing_plans: dict[str, list[str or + ~azure.mgmt.reservations.models.ReservationBillingPlan]] + """ + super().__init__(**kwargs) + self.resource_type = None + self.name = None + self.billing_plans = billing_plans + self.terms = None + self.locations = None + self.sku_properties = None + self.msrp = None + self.restrictions = None + self.tier = None + self.size = None + self.capabilities = None + + +class CatalogMsrp(_serialization.Model): + """Pricing information about the SKU. + + :ivar p1_y: Amount in pricing currency. Tax not included. + :vartype p1_y: ~azure.mgmt.reservations.models.Price + """ + + _attribute_map = { + "p1_y": {"key": "p1Y", "type": "Price"}, + } + + def __init__(self, *, p1_y: Optional["_models.Price"] = None, **kwargs): + """ + :keyword p1_y: Amount in pricing currency. Tax not included. + :paramtype p1_y: ~azure.mgmt.reservations.models.Price + """ + super().__init__(**kwargs) + self.p1_y = p1_y + + +class ChangeDirectoryRequest(_serialization.Model): + """ChangeDirectoryRequest. + + :ivar destination_tenant_id: Tenant id GUID that reservation order is to be transferred to. + :vartype destination_tenant_id: str + """ + + _attribute_map = { + "destination_tenant_id": {"key": "destinationTenantId", "type": "str"}, + } + + def __init__(self, *, destination_tenant_id: Optional[str] = None, **kwargs): + """ + :keyword destination_tenant_id: Tenant id GUID that reservation order is to be transferred to. + :paramtype destination_tenant_id: str + """ + super().__init__(**kwargs) + self.destination_tenant_id = destination_tenant_id + + +class ChangeDirectoryResponse(_serialization.Model): + """Change directory response. + + :ivar reservation_order: Change directory result for reservation order or reservation. + :vartype reservation_order: ~azure.mgmt.reservations.models.ChangeDirectoryResult + :ivar reservations: + :vartype reservations: list[~azure.mgmt.reservations.models.ChangeDirectoryResult] + """ + + _attribute_map = { + "reservation_order": {"key": "reservationOrder", "type": "ChangeDirectoryResult"}, + "reservations": {"key": "reservations", "type": "[ChangeDirectoryResult]"}, + } + + def __init__( + self, + *, + reservation_order: Optional["_models.ChangeDirectoryResult"] = None, + reservations: Optional[List["_models.ChangeDirectoryResult"]] = None, + **kwargs + ): + """ + :keyword reservation_order: Change directory result for reservation order or reservation. + :paramtype reservation_order: ~azure.mgmt.reservations.models.ChangeDirectoryResult + :keyword reservations: + :paramtype reservations: list[~azure.mgmt.reservations.models.ChangeDirectoryResult] + """ + super().__init__(**kwargs) + self.reservation_order = reservation_order + self.reservations = reservations + + +class ChangeDirectoryResult(_serialization.Model): + """Change directory result for reservation order or reservation. + + :ivar id: Identifier of the reservation order or reservation. + :vartype id: str + :ivar name: Name of the reservation order or reservation. + :vartype name: str + :ivar is_succeeded: True if change directory operation succeeded on this reservation order or + reservation. + :vartype is_succeeded: bool + :ivar error: Error reason if operation failed. Null otherwise. + :vartype error: str + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "is_succeeded": {"key": "isSucceeded", "type": "bool"}, + "error": {"key": "error", "type": "str"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + is_succeeded: Optional[bool] = None, + error: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Identifier of the reservation order or reservation. + :paramtype id: str + :keyword name: Name of the reservation order or reservation. + :paramtype name: str + :keyword is_succeeded: True if change directory operation succeeded on this reservation order + or reservation. + :paramtype is_succeeded: bool + :keyword error: Error reason if operation failed. Null otherwise. + :paramtype error: str + """ + super().__init__(**kwargs) + self.id = id + self.name = name + self.is_succeeded = is_succeeded + self.error = error + + +class CreateGenericQuotaRequestParameters(_serialization.Model): + """Quota change requests information. + + :ivar value: Quota change requests. + :vartype value: list[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] + """ + + _attribute_map = { + "value": {"key": "value", "type": "[CurrentQuotaLimitBase]"}, + } + + def __init__(self, *, value: Optional[List["_models.CurrentQuotaLimitBase"]] = None, **kwargs): + """ + :keyword value: Quota change requests. + :paramtype value: list[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] + """ + super().__init__(**kwargs) + self.value = value + + +class CurrentQuotaLimit(_serialization.Model): + """Current quota limits. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: The details of the quota request status. Known values are: + "Accepted", "Invalid", "Succeeded", "Failed", and "InProgress". + :vartype provisioning_state: str or ~azure.mgmt.reservations.models.QuotaRequestState + :ivar message: A user friendly message. + :vartype message: str + :ivar id: The quota request ID. + :vartype id: str + :ivar name: The name of the quota request. + :vartype name: str + :ivar type: Type of resource. "Microsoft.Capacity/ServiceLimits". + :vartype type: str + :ivar properties: Quota properties for the resource. + :vartype properties: ~azure.mgmt.reservations.models.QuotaProperties + """ + + _validation = { + "provisioning_state": {"readonly": True}, + "message": {"readonly": True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "message": {"key": "properties.message", "type": "str"}, + "id": {"key": "quotaInformation.id", "type": "str"}, + "name": {"key": "quotaInformation.name", "type": "str"}, + "type": {"key": "quotaInformation.type", "type": "str"}, + "properties": {"key": "quotaInformation.properties", "type": "QuotaProperties"}, + } + + def __init__(self, *, properties: Optional["_models.QuotaProperties"] = None, **kwargs): + """ + :keyword properties: Quota properties for the resource. + :paramtype properties: ~azure.mgmt.reservations.models.QuotaProperties + """ + super().__init__(**kwargs) + self.provisioning_state = None + self.message = None + self.id = None + self.name = None + self.type = None + self.properties = properties + + +class CurrentQuotaLimitBase(_serialization.Model): + """Quota properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The quota request ID. + :vartype id: str + :ivar name: The name of the quota request. + :vartype name: str + :ivar type: Type of resource. "Microsoft.Capacity/ServiceLimits". + :vartype type: str + :ivar properties: Quota properties for the resource. + :vartype properties: ~azure.mgmt.reservations.models.QuotaProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "QuotaProperties"}, + } + + def __init__(self, *, properties: Optional["_models.QuotaProperties"] = None, **kwargs): + """ + :keyword properties: Quota properties for the resource. + :paramtype properties: ~azure.mgmt.reservations.models.QuotaProperties + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = properties + + +class Error(_serialization.Model): + """Error. + + :ivar error: + :vartype error: ~azure.mgmt.reservations.models.ExtendedErrorInfo + """ + + _attribute_map = { + "error": {"key": "error", "type": "ExtendedErrorInfo"}, + } + + def __init__(self, *, error: Optional["_models.ExtendedErrorInfo"] = None, **kwargs): + """ + :keyword error: + :paramtype error: ~azure.mgmt.reservations.models.ExtendedErrorInfo + """ + super().__init__(**kwargs) + self.error = error + + +class ErrorDetails(_serialization.Model): + """The details of the error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + :ivar target: The target of the particular error. + :vartype target: str + """ + + _validation = { + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + } + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + } + + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.code = None + self.message = None + self.target = None + + +class ErrorResponse(_serialization.Model): + """Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. + + :ivar error: The details of the error. + :vartype error: ~azure.mgmt.reservations.models.ErrorDetails + """ + + _attribute_map = { + "error": {"key": "error", "type": "ErrorDetails"}, + } + + def __init__(self, *, error: Optional["_models.ErrorDetails"] = None, **kwargs): + """ + :keyword error: The details of the error. + :paramtype error: ~azure.mgmt.reservations.models.ErrorDetails + """ + super().__init__(**kwargs) + self.error = error + + +class ExceptionResponse(_serialization.Model): + """The API error. + + :ivar error: The API error details. + :vartype error: ~azure.mgmt.reservations.models.ServiceError + """ + + _attribute_map = { + "error": {"key": "error", "type": "ServiceError"}, + } + + def __init__(self, *, error: Optional["_models.ServiceError"] = None, **kwargs): + """ + :keyword error: The API error details. + :paramtype error: ~azure.mgmt.reservations.models.ServiceError + """ + super().__init__(**kwargs) + self.error = error + + +class ExchangeOperationResultResponse(_serialization.Model): + """Exchange operation result. + + :ivar id: It should match what is used to GET the operation result. + :vartype id: str + :ivar name: It must match the last segment of the id field, and will typically be a GUID / + system generated value. + :vartype name: str + :ivar status: Status of the operation. Known values are: "Succeeded", "Failed", "Cancelled", + "PendingRefunds", and "PendingPurchases". + :vartype status: str or ~azure.mgmt.reservations.models.ExchangeOperationResultStatus + :ivar properties: Exchange response properties. + :vartype properties: ~azure.mgmt.reservations.models.ExchangeResponseProperties + :ivar error: Required if status == failed or status == canceled. + :vartype error: ~azure.mgmt.reservations.models.OperationResultError + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "properties": {"key": "properties", "type": "ExchangeResponseProperties"}, + "error": {"key": "error", "type": "OperationResultError"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + status: Optional[Union[str, "_models.ExchangeOperationResultStatus"]] = None, + properties: Optional["_models.ExchangeResponseProperties"] = None, + error: Optional["_models.OperationResultError"] = None, + **kwargs + ): + """ + :keyword id: It should match what is used to GET the operation result. + :paramtype id: str + :keyword name: It must match the last segment of the id field, and will typically be a GUID / + system generated value. + :paramtype name: str + :keyword status: Status of the operation. Known values are: "Succeeded", "Failed", "Cancelled", + "PendingRefunds", and "PendingPurchases". + :paramtype status: str or ~azure.mgmt.reservations.models.ExchangeOperationResultStatus + :keyword properties: Exchange response properties. + :paramtype properties: ~azure.mgmt.reservations.models.ExchangeResponseProperties + :keyword error: Required if status == failed or status == canceled. + :paramtype error: ~azure.mgmt.reservations.models.OperationResultError + """ + super().__init__(**kwargs) + self.id = id + self.name = name + self.status = status + self.properties = properties + self.error = error + + +class ExchangePolicyError(_serialization.Model): + """error details. + + :ivar code: + :vartype code: str + :ivar message: + :vartype message: str + """ + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + } + + def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs): + """ + :keyword code: + :paramtype code: str + :keyword message: + :paramtype message: str + """ + super().__init__(**kwargs) + self.code = code + self.message = message + + +class ExchangePolicyErrors(_serialization.Model): + """Exchange policy errors. + + :ivar policy_errors: Exchange Policy errors. + :vartype policy_errors: list[~azure.mgmt.reservations.models.ExchangePolicyError] + """ + + _attribute_map = { + "policy_errors": {"key": "policyErrors", "type": "[ExchangePolicyError]"}, + } + + def __init__(self, *, policy_errors: Optional[List["_models.ExchangePolicyError"]] = None, **kwargs): + """ + :keyword policy_errors: Exchange Policy errors. + :paramtype policy_errors: list[~azure.mgmt.reservations.models.ExchangePolicyError] + """ + super().__init__(**kwargs) + self.policy_errors = policy_errors + + +class ExchangeRequest(_serialization.Model): + """Exchange request. + + :ivar properties: Exchange request properties. + :vartype properties: ~azure.mgmt.reservations.models.ExchangeRequestProperties + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "ExchangeRequestProperties"}, + } + + def __init__(self, *, properties: Optional["_models.ExchangeRequestProperties"] = None, **kwargs): + """ + :keyword properties: Exchange request properties. + :paramtype properties: ~azure.mgmt.reservations.models.ExchangeRequestProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class ExchangeRequestProperties(_serialization.Model): + """Exchange request properties. + + :ivar session_id: SessionId that was returned by CalculateExchange API. + :vartype session_id: str + """ + + _attribute_map = { + "session_id": {"key": "sessionId", "type": "str"}, + } + + def __init__(self, *, session_id: Optional[str] = None, **kwargs): + """ + :keyword session_id: SessionId that was returned by CalculateExchange API. + :paramtype session_id: str + """ + super().__init__(**kwargs) + self.session_id = session_id + + +class ExchangeResponseProperties(_serialization.Model): + """Exchange response properties. + + :ivar session_id: Exchange session identifier. + :vartype session_id: str + :ivar net_payable: + :vartype net_payable: ~azure.mgmt.reservations.models.Price + :ivar refunds_total: + :vartype refunds_total: ~azure.mgmt.reservations.models.Price + :ivar purchases_total: + :vartype purchases_total: ~azure.mgmt.reservations.models.Price + :ivar reservations_to_purchase: Details of the reservations being purchased. + :vartype reservations_to_purchase: + list[~azure.mgmt.reservations.models.ReservationToPurchaseExchange] + :ivar reservations_to_exchange: Details of the reservations being returned. + :vartype reservations_to_exchange: + list[~azure.mgmt.reservations.models.ReservationToReturnForExchange] + :ivar policy_result: Exchange policy errors. + :vartype policy_result: ~azure.mgmt.reservations.models.ExchangePolicyErrors + """ + + _attribute_map = { + "session_id": {"key": "sessionId", "type": "str"}, + "net_payable": {"key": "netPayable", "type": "Price"}, + "refunds_total": {"key": "refundsTotal", "type": "Price"}, + "purchases_total": {"key": "purchasesTotal", "type": "Price"}, + "reservations_to_purchase": {"key": "reservationsToPurchase", "type": "[ReservationToPurchaseExchange]"}, + "reservations_to_exchange": {"key": "reservationsToExchange", "type": "[ReservationToReturnForExchange]"}, + "policy_result": {"key": "policyResult", "type": "ExchangePolicyErrors"}, + } + + def __init__( + self, + *, + session_id: Optional[str] = None, + net_payable: Optional["_models.Price"] = None, + refunds_total: Optional["_models.Price"] = None, + purchases_total: Optional["_models.Price"] = None, + reservations_to_purchase: Optional[List["_models.ReservationToPurchaseExchange"]] = None, + reservations_to_exchange: Optional[List["_models.ReservationToReturnForExchange"]] = None, + policy_result: Optional["_models.ExchangePolicyErrors"] = None, + **kwargs + ): + """ + :keyword session_id: Exchange session identifier. + :paramtype session_id: str + :keyword net_payable: + :paramtype net_payable: ~azure.mgmt.reservations.models.Price + :keyword refunds_total: + :paramtype refunds_total: ~azure.mgmt.reservations.models.Price + :keyword purchases_total: + :paramtype purchases_total: ~azure.mgmt.reservations.models.Price + :keyword reservations_to_purchase: Details of the reservations being purchased. + :paramtype reservations_to_purchase: + list[~azure.mgmt.reservations.models.ReservationToPurchaseExchange] + :keyword reservations_to_exchange: Details of the reservations being returned. + :paramtype reservations_to_exchange: + list[~azure.mgmt.reservations.models.ReservationToReturnForExchange] + :keyword policy_result: Exchange policy errors. + :paramtype policy_result: ~azure.mgmt.reservations.models.ExchangePolicyErrors + """ + super().__init__(**kwargs) + self.session_id = session_id + self.net_payable = net_payable + self.refunds_total = refunds_total + self.purchases_total = purchases_total + self.reservations_to_purchase = reservations_to_purchase + self.reservations_to_exchange = reservations_to_exchange + self.policy_result = policy_result + + +class ExtendedErrorInfo(_serialization.Model): + """ExtendedErrorInfo. + + :ivar code: Known values are: "NotSpecified", "InternalServerError", "ServerTimeout", + "AuthorizationFailed", "BadRequest", "ClientCertificateThumbprintNotSet", + "InvalidRequestContent", "OperationFailed", "HttpMethodNotSupported", "InvalidRequestUri", + "MissingTenantId", "InvalidTenantId", "InvalidReservationOrderId", "InvalidReservationId", + "ReservationIdNotInReservationOrder", "ReservationOrderNotFound", "InvalidSubscriptionId", + "InvalidAccessToken", "InvalidLocationId", "UnauthenticatedRequestsThrottled", + "InvalidHealthCheckType", "Forbidden", "BillingScopeIdCannotBeChanged", + "AppliedScopesNotAssociatedWithCommerceAccount", "PatchValuesSameAsExisting", + "RoleAssignmentCreationFailed", "ReservationOrderCreationFailed", "ReservationOrderNotEnabled", + "CapacityUpdateScopesFailed", "UnsupportedReservationTerm", "ReservationOrderIdAlreadyExists", + "RiskCheckFailed", "CreateQuoteFailed", "ActivateQuoteFailed", "NonsupportedAccountId", + "PaymentInstrumentNotFound", "MissingAppliedScopesForSingle", "NoValidReservationsToReRate", + "ReRateOnlyAllowedForEA", "OperationCannotBePerformedInCurrentState", + "InvalidSingleAppliedScopesCount", "InvalidFulfillmentRequestParameters", + "NotSupportedCountry", "InvalidRefundQuantity", "PurchaseError", "BillingCustomerInputError", + "BillingPaymentInstrumentSoftError", "BillingPaymentInstrumentHardError", + "BillingTransientError", "BillingError", "FulfillmentConfigurationError", + "FulfillmentOutOfStockError", "FulfillmentTransientError", "FulfillmentError", + "CalculatePriceFailed", "AppliedScopesSameAsExisting", "SelfServiceRefundNotSupported", and + "RefundLimitExceeded". + :vartype code: str or ~azure.mgmt.reservations.models.ErrorResponseCode + :ivar message: + :vartype message: str + """ + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + } + + def __init__( + self, *, code: Optional[Union[str, "_models.ErrorResponseCode"]] = None, message: Optional[str] = None, **kwargs + ): + """ + :keyword code: Known values are: "NotSpecified", "InternalServerError", "ServerTimeout", + "AuthorizationFailed", "BadRequest", "ClientCertificateThumbprintNotSet", + "InvalidRequestContent", "OperationFailed", "HttpMethodNotSupported", "InvalidRequestUri", + "MissingTenantId", "InvalidTenantId", "InvalidReservationOrderId", "InvalidReservationId", + "ReservationIdNotInReservationOrder", "ReservationOrderNotFound", "InvalidSubscriptionId", + "InvalidAccessToken", "InvalidLocationId", "UnauthenticatedRequestsThrottled", + "InvalidHealthCheckType", "Forbidden", "BillingScopeIdCannotBeChanged", + "AppliedScopesNotAssociatedWithCommerceAccount", "PatchValuesSameAsExisting", + "RoleAssignmentCreationFailed", "ReservationOrderCreationFailed", "ReservationOrderNotEnabled", + "CapacityUpdateScopesFailed", "UnsupportedReservationTerm", "ReservationOrderIdAlreadyExists", + "RiskCheckFailed", "CreateQuoteFailed", "ActivateQuoteFailed", "NonsupportedAccountId", + "PaymentInstrumentNotFound", "MissingAppliedScopesForSingle", "NoValidReservationsToReRate", + "ReRateOnlyAllowedForEA", "OperationCannotBePerformedInCurrentState", + "InvalidSingleAppliedScopesCount", "InvalidFulfillmentRequestParameters", + "NotSupportedCountry", "InvalidRefundQuantity", "PurchaseError", "BillingCustomerInputError", + "BillingPaymentInstrumentSoftError", "BillingPaymentInstrumentHardError", + "BillingTransientError", "BillingError", "FulfillmentConfigurationError", + "FulfillmentOutOfStockError", "FulfillmentTransientError", "FulfillmentError", + "CalculatePriceFailed", "AppliedScopesSameAsExisting", "SelfServiceRefundNotSupported", and + "RefundLimitExceeded". + :paramtype code: str or ~azure.mgmt.reservations.models.ErrorResponseCode + :keyword message: + :paramtype message: str + """ + super().__init__(**kwargs) + self.code = code + self.message = message + + +class ExtendedStatusInfo(_serialization.Model): + """ExtendedStatusInfo. + + :ivar status_code: Known values are: "None", "Pending", "Processing", "Active", + "PurchaseError", "PaymentInstrumentError", "Split", "Merged", "Expired", and "Succeeded". + :vartype status_code: str or ~azure.mgmt.reservations.models.ReservationStatusCode + :ivar message: The message giving detailed information about the status code. + :vartype message: str + """ + + _attribute_map = { + "status_code": {"key": "statusCode", "type": "str"}, + "message": {"key": "message", "type": "str"}, + } + + def __init__( + self, + *, + status_code: Optional[Union[str, "_models.ReservationStatusCode"]] = None, + message: Optional[str] = None, + **kwargs + ): + """ + :keyword status_code: Known values are: "None", "Pending", "Processing", "Active", + "PurchaseError", "PaymentInstrumentError", "Split", "Merged", "Expired", and "Succeeded". + :paramtype status_code: str or ~azure.mgmt.reservations.models.ReservationStatusCode + :keyword message: The message giving detailed information about the status code. + :paramtype message: str + """ + super().__init__(**kwargs) + self.status_code = status_code + self.message = message + + +class MergeRequest(_serialization.Model): + """MergeRequest. + + :ivar sources: Format of the resource id should be + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :vartype sources: list[str] + """ + + _attribute_map = { + "sources": {"key": "properties.sources", "type": "[str]"}, + } + + def __init__(self, *, sources: Optional[List[str]] = None, **kwargs): + """ + :keyword sources: Format of the resource id should be + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :paramtype sources: list[str] + """ + super().__init__(**kwargs) + self.sources = sources + + +class OperationDisplay(_serialization.Model): + """OperationDisplay. + + :ivar provider: + :vartype provider: str + :ivar resource: + :vartype resource: str + :ivar operation: + :vartype operation: str + :ivar description: + :vartype description: str + """ + + _attribute_map = { + "provider": {"key": "provider", "type": "str"}, + "resource": {"key": "resource", "type": "str"}, + "operation": {"key": "operation", "type": "str"}, + "description": {"key": "description", "type": "str"}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword provider: + :paramtype provider: str + :keyword resource: + :paramtype resource: str + :keyword operation: + :paramtype operation: str + :keyword description: + :paramtype description: str + """ + super().__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationList(_serialization.Model): + """OperationList. + + :ivar value: + :vartype value: list[~azure.mgmt.reservations.models.OperationResponse] + :ivar next_link: Url to get the next page of items. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[OperationResponse]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[List["_models.OperationResponse"]] = None, next_link: Optional[str] = None, **kwargs + ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.reservations.models.OperationResponse] + :keyword next_link: Url to get the next page of items. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class OperationResponse(_serialization.Model): + """OperationResponse. + + :ivar name: Name of the operation. + :vartype name: str + :ivar is_data_action: Indicates whether the operation is a data action. + :vartype is_data_action: bool + :ivar display: Display of the operation. + :vartype display: ~azure.mgmt.reservations.models.OperationDisplay + :ivar origin: Origin of the operation. + :vartype origin: str + :ivar properties: Properties of the operation. + :vartype properties: JSON + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "is_data_action": {"key": "isDataAction", "type": "bool"}, + "display": {"key": "display", "type": "OperationDisplay"}, + "origin": {"key": "origin", "type": "str"}, + "properties": {"key": "properties", "type": "object"}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + is_data_action: Optional[bool] = None, + display: Optional["_models.OperationDisplay"] = None, + origin: Optional[str] = None, + properties: Optional[JSON] = None, + **kwargs + ): + """ + :keyword name: Name of the operation. + :paramtype name: str + :keyword is_data_action: Indicates whether the operation is a data action. + :paramtype is_data_action: bool + :keyword display: Display of the operation. + :paramtype display: ~azure.mgmt.reservations.models.OperationDisplay + :keyword origin: Origin of the operation. + :paramtype origin: str + :keyword properties: Properties of the operation. + :paramtype properties: JSON + """ + super().__init__(**kwargs) + self.name = name + self.is_data_action = is_data_action + self.display = display + self.origin = origin + self.properties = properties + + +class OperationResultError(_serialization.Model): + """Required if status == failed or status == canceled. + + :ivar code: Required if status == failed or status == cancelled. If status == failed, provide + an invariant error code used for error troubleshooting, aggregation, and analysis. + :vartype code: str + :ivar message: Required if status == failed. Localized. If status == failed, provide an + actionable error message indicating what error occurred, and what the user can do to address + the issue. + :vartype message: str + """ + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + } + + def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs): + """ + :keyword code: Required if status == failed or status == cancelled. If status == failed, + provide an invariant error code used for error troubleshooting, aggregation, and analysis. + :paramtype code: str + :keyword message: Required if status == failed. Localized. If status == failed, provide an + actionable error message indicating what error occurred, and what the user can do to address + the issue. + :paramtype message: str + """ + super().__init__(**kwargs) + self.code = code + self.message = message + + +class Patch(_serialization.Model): + """Patch. + + :ivar applied_scope_type: Type of the Applied Scope. Known values are: "Single" and "Shared". + :vartype applied_scope_type: str or ~azure.mgmt.reservations.models.AppliedScopeType + :ivar applied_scopes: List of the subscriptions that the benefit will be applied. Do not + specify if AppliedScopeType is Shared. + :vartype applied_scopes: list[str] + :ivar instance_flexibility: Turning this on will apply the reservation discount to other VMs in + the same VM size group. Only specify for VirtualMachines reserved resource type. Known values + are: "On" and "Off". + :vartype instance_flexibility: str or ~azure.mgmt.reservations.models.InstanceFlexibility + :ivar name: Name of the Reservation. + :vartype name: str + :ivar renew: Setting this to true will automatically purchase a new reservation on the + expiration date time. + :vartype renew: bool + :ivar renew_properties: + :vartype renew_properties: ~azure.mgmt.reservations.models.PatchPropertiesRenewProperties + """ + + _attribute_map = { + "applied_scope_type": {"key": "properties.appliedScopeType", "type": "str"}, + "applied_scopes": {"key": "properties.appliedScopes", "type": "[str]"}, + "instance_flexibility": {"key": "properties.instanceFlexibility", "type": "str"}, + "name": {"key": "properties.name", "type": "str"}, + "renew": {"key": "properties.renew", "type": "bool"}, + "renew_properties": {"key": "properties.renewProperties", "type": "PatchPropertiesRenewProperties"}, + } + + def __init__( + self, + *, + applied_scope_type: Optional[Union[str, "_models.AppliedScopeType"]] = None, + applied_scopes: Optional[List[str]] = None, + instance_flexibility: Optional[Union[str, "_models.InstanceFlexibility"]] = None, + name: Optional[str] = None, + renew: bool = False, + renew_properties: Optional["_models.PatchPropertiesRenewProperties"] = None, + **kwargs + ): + """ + :keyword applied_scope_type: Type of the Applied Scope. Known values are: "Single" and + "Shared". + :paramtype applied_scope_type: str or ~azure.mgmt.reservations.models.AppliedScopeType + :keyword applied_scopes: List of the subscriptions that the benefit will be applied. Do not + specify if AppliedScopeType is Shared. + :paramtype applied_scopes: list[str] + :keyword instance_flexibility: Turning this on will apply the reservation discount to other VMs + in the same VM size group. Only specify for VirtualMachines reserved resource type. Known + values are: "On" and "Off". + :paramtype instance_flexibility: str or ~azure.mgmt.reservations.models.InstanceFlexibility + :keyword name: Name of the Reservation. + :paramtype name: str + :keyword renew: Setting this to true will automatically purchase a new reservation on the + expiration date time. + :paramtype renew: bool + :keyword renew_properties: + :paramtype renew_properties: ~azure.mgmt.reservations.models.PatchPropertiesRenewProperties + """ + super().__init__(**kwargs) + self.applied_scope_type = applied_scope_type + self.applied_scopes = applied_scopes + self.instance_flexibility = instance_flexibility + self.name = name + self.renew = renew + self.renew_properties = renew_properties + + +class PatchPropertiesRenewProperties(_serialization.Model): + """PatchPropertiesRenewProperties. + + :ivar purchase_properties: + :vartype purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest + """ + + _attribute_map = { + "purchase_properties": {"key": "purchaseProperties", "type": "PurchaseRequest"}, + } + + def __init__(self, *, purchase_properties: Optional["_models.PurchaseRequest"] = None, **kwargs): + """ + :keyword purchase_properties: + :paramtype purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest + """ + super().__init__(**kwargs) + self.purchase_properties = purchase_properties + + +class PaymentDetail(_serialization.Model): + """Information about payment related to a reservation order. + + :ivar due_date: Date when the payment needs to be done. + :vartype due_date: ~datetime.date + :ivar payment_date: Date when the transaction is completed. Is null when it is scheduled. + :vartype payment_date: ~datetime.date + :ivar pricing_currency_total: Amount in pricing currency. Tax not included. + :vartype pricing_currency_total: ~azure.mgmt.reservations.models.Price + :ivar billing_currency_total: Amount charged in Billing currency. Tax not included. Is null for + future payments. + :vartype billing_currency_total: ~azure.mgmt.reservations.models.Price + :ivar billing_account: Shows the Account that is charged for this payment. + :vartype billing_account: str + :ivar status: Describes whether the payment is completed, failed, cancelled or scheduled in the + future. Known values are: "Succeeded", "Failed", "Scheduled", and "Cancelled". + :vartype status: str or ~azure.mgmt.reservations.models.PaymentStatus + :ivar extended_status_info: + :vartype extended_status_info: ~azure.mgmt.reservations.models.ExtendedStatusInfo + """ + + _attribute_map = { + "due_date": {"key": "dueDate", "type": "date"}, + "payment_date": {"key": "paymentDate", "type": "date"}, + "pricing_currency_total": {"key": "pricingCurrencyTotal", "type": "Price"}, + "billing_currency_total": {"key": "billingCurrencyTotal", "type": "Price"}, + "billing_account": {"key": "billingAccount", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "extended_status_info": {"key": "extendedStatusInfo", "type": "ExtendedStatusInfo"}, + } + + def __init__( + self, + *, + due_date: Optional[datetime.date] = None, + payment_date: Optional[datetime.date] = None, + pricing_currency_total: Optional["_models.Price"] = None, + billing_currency_total: Optional["_models.Price"] = None, + billing_account: Optional[str] = None, + status: Optional[Union[str, "_models.PaymentStatus"]] = None, + extended_status_info: Optional["_models.ExtendedStatusInfo"] = None, + **kwargs + ): + """ + :keyword due_date: Date when the payment needs to be done. + :paramtype due_date: ~datetime.date + :keyword payment_date: Date when the transaction is completed. Is null when it is scheduled. + :paramtype payment_date: ~datetime.date + :keyword pricing_currency_total: Amount in pricing currency. Tax not included. + :paramtype pricing_currency_total: ~azure.mgmt.reservations.models.Price + :keyword billing_currency_total: Amount charged in Billing currency. Tax not included. Is null + for future payments. + :paramtype billing_currency_total: ~azure.mgmt.reservations.models.Price + :keyword billing_account: Shows the Account that is charged for this payment. + :paramtype billing_account: str + :keyword status: Describes whether the payment is completed, failed, cancelled or scheduled in + the future. Known values are: "Succeeded", "Failed", "Scheduled", and "Cancelled". + :paramtype status: str or ~azure.mgmt.reservations.models.PaymentStatus + :keyword extended_status_info: + :paramtype extended_status_info: ~azure.mgmt.reservations.models.ExtendedStatusInfo + """ + super().__init__(**kwargs) + self.due_date = due_date + self.payment_date = payment_date + self.pricing_currency_total = pricing_currency_total + self.billing_currency_total = billing_currency_total + self.billing_account = billing_account + self.status = status + self.extended_status_info = extended_status_info + + +class Price(_serialization.Model): + """Price. + + :ivar currency_code: The ISO 4217 3-letter currency code for the currency used by this purchase + record. + :vartype currency_code: str + :ivar amount: + :vartype amount: float + """ + + _attribute_map = { + "currency_code": {"key": "currencyCode", "type": "str"}, + "amount": {"key": "amount", "type": "float"}, + } + + def __init__(self, *, currency_code: Optional[str] = None, amount: Optional[float] = None, **kwargs): + """ + :keyword currency_code: The ISO 4217 3-letter currency code for the currency used by this + purchase record. + :paramtype currency_code: str + :keyword amount: + :paramtype amount: float + """ + super().__init__(**kwargs) + self.currency_code = currency_code + self.amount = amount + + +class PurchaseRequest(_serialization.Model): # pylint: disable=too-many-instance-attributes + """PurchaseRequest. + + :ivar sku: + :vartype sku: ~azure.mgmt.reservations.models.SkuName + :ivar location: The Azure Region where the reserved resource lives. + :vartype location: str + :ivar reserved_resource_type: The type of the resource that is being reserved. Known values + are: "VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", + "VMwareCloudSimple", "RedHatOsa", "Databricks", "AppService", "ManagedDisk", "BlockBlob", + "RedisCache", "AzureDataExplorer", "MySql", "MariaDb", "PostgreSql", "DedicatedHost", + "SapHana", "SqlAzureHybridBenefit", "AVS", "DataFactory", "NetAppStorage", "AzureFiles", + "SqlEdge", and "VirtualMachineSoftware". + :vartype reserved_resource_type: str or ~azure.mgmt.reservations.models.ReservedResourceType + :ivar billing_scope_id: Subscription that will be charged for purchasing Reservation. + :vartype billing_scope_id: str + :ivar term: Represent the term of Reservation. Known values are: "P1Y", "P3Y", and "P5Y". + :vartype term: str or ~azure.mgmt.reservations.models.ReservationTerm + :ivar billing_plan: Represent the billing plans. Known values are: "Upfront" and "Monthly". + :vartype billing_plan: str or ~azure.mgmt.reservations.models.ReservationBillingPlan + :ivar quantity: Quantity of the SKUs that are part of the Reservation. + :vartype quantity: int + :ivar display_name: Friendly name of the Reservation. + :vartype display_name: str + :ivar applied_scope_type: Type of the Applied Scope. Known values are: "Single" and "Shared". + :vartype applied_scope_type: str or ~azure.mgmt.reservations.models.AppliedScopeType + :ivar applied_scopes: List of the subscriptions that the benefit will be applied. Do not + specify if AppliedScopeType is Shared. + :vartype applied_scopes: list[str] + :ivar renew: Setting this to true will automatically purchase a new reservation on the + expiration date time. + :vartype renew: bool + :ivar reserved_resource_properties: Properties specific to each reserved resource type. Not + required if not applicable. + :vartype reserved_resource_properties: + ~azure.mgmt.reservations.models.PurchaseRequestPropertiesReservedResourceProperties + """ + + _attribute_map = { + "sku": {"key": "sku", "type": "SkuName"}, + "location": {"key": "location", "type": "str"}, + "reserved_resource_type": {"key": "properties.reservedResourceType", "type": "str"}, + "billing_scope_id": {"key": "properties.billingScopeId", "type": "str"}, + "term": {"key": "properties.term", "type": "str"}, + "billing_plan": {"key": "properties.billingPlan", "type": "str"}, + "quantity": {"key": "properties.quantity", "type": "int"}, + "display_name": {"key": "properties.displayName", "type": "str"}, + "applied_scope_type": {"key": "properties.appliedScopeType", "type": "str"}, + "applied_scopes": {"key": "properties.appliedScopes", "type": "[str]"}, + "renew": {"key": "properties.renew", "type": "bool"}, + "reserved_resource_properties": { + "key": "properties.reservedResourceProperties", + "type": "PurchaseRequestPropertiesReservedResourceProperties", + }, + } + + def __init__( + self, + *, + sku: Optional["_models.SkuName"] = None, + location: Optional[str] = None, + reserved_resource_type: Optional[Union[str, "_models.ReservedResourceType"]] = None, + billing_scope_id: Optional[str] = None, + term: Optional[Union[str, "_models.ReservationTerm"]] = None, + billing_plan: Optional[Union[str, "_models.ReservationBillingPlan"]] = None, + quantity: Optional[int] = None, + display_name: Optional[str] = None, + applied_scope_type: Optional[Union[str, "_models.AppliedScopeType"]] = None, + applied_scopes: Optional[List[str]] = None, + renew: bool = False, + reserved_resource_properties: Optional["_models.PurchaseRequestPropertiesReservedResourceProperties"] = None, + **kwargs + ): + """ + :keyword sku: + :paramtype sku: ~azure.mgmt.reservations.models.SkuName + :keyword location: The Azure Region where the reserved resource lives. + :paramtype location: str + :keyword reserved_resource_type: The type of the resource that is being reserved. Known values + are: "VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", + "VMwareCloudSimple", "RedHatOsa", "Databricks", "AppService", "ManagedDisk", "BlockBlob", + "RedisCache", "AzureDataExplorer", "MySql", "MariaDb", "PostgreSql", "DedicatedHost", + "SapHana", "SqlAzureHybridBenefit", "AVS", "DataFactory", "NetAppStorage", "AzureFiles", + "SqlEdge", and "VirtualMachineSoftware". + :paramtype reserved_resource_type: str or ~azure.mgmt.reservations.models.ReservedResourceType + :keyword billing_scope_id: Subscription that will be charged for purchasing Reservation. + :paramtype billing_scope_id: str + :keyword term: Represent the term of Reservation. Known values are: "P1Y", "P3Y", and "P5Y". + :paramtype term: str or ~azure.mgmt.reservations.models.ReservationTerm + :keyword billing_plan: Represent the billing plans. Known values are: "Upfront" and "Monthly". + :paramtype billing_plan: str or ~azure.mgmt.reservations.models.ReservationBillingPlan + :keyword quantity: Quantity of the SKUs that are part of the Reservation. + :paramtype quantity: int + :keyword display_name: Friendly name of the Reservation. + :paramtype display_name: str + :keyword applied_scope_type: Type of the Applied Scope. Known values are: "Single" and + "Shared". + :paramtype applied_scope_type: str or ~azure.mgmt.reservations.models.AppliedScopeType + :keyword applied_scopes: List of the subscriptions that the benefit will be applied. Do not + specify if AppliedScopeType is Shared. + :paramtype applied_scopes: list[str] + :keyword renew: Setting this to true will automatically purchase a new reservation on the + expiration date time. + :paramtype renew: bool + :keyword reserved_resource_properties: Properties specific to each reserved resource type. Not + required if not applicable. + :paramtype reserved_resource_properties: + ~azure.mgmt.reservations.models.PurchaseRequestPropertiesReservedResourceProperties + """ + super().__init__(**kwargs) + self.sku = sku + self.location = location + self.reserved_resource_type = reserved_resource_type + self.billing_scope_id = billing_scope_id + self.term = term + self.billing_plan = billing_plan + self.quantity = quantity + self.display_name = display_name + self.applied_scope_type = applied_scope_type + self.applied_scopes = applied_scopes + self.renew = renew + self.reserved_resource_properties = reserved_resource_properties + + +class PurchaseRequestPropertiesReservedResourceProperties(_serialization.Model): + """Properties specific to each reserved resource type. Not required if not applicable. + + :ivar instance_flexibility: Turning this on will apply the reservation discount to other VMs in + the same VM size group. Only specify for VirtualMachines reserved resource type. Known values + are: "On" and "Off". + :vartype instance_flexibility: str or ~azure.mgmt.reservations.models.InstanceFlexibility + """ + + _attribute_map = { + "instance_flexibility": {"key": "instanceFlexibility", "type": "str"}, + } + + def __init__(self, *, instance_flexibility: Optional[Union[str, "_models.InstanceFlexibility"]] = None, **kwargs): + """ + :keyword instance_flexibility: Turning this on will apply the reservation discount to other VMs + in the same VM size group. Only specify for VirtualMachines reserved resource type. Known + values are: "On" and "Off". + :paramtype instance_flexibility: str or ~azure.mgmt.reservations.models.InstanceFlexibility + """ + super().__init__(**kwargs) + self.instance_flexibility = instance_flexibility + + +class QuotaLimits(_serialization.Model): + """Quota limits. + + :ivar value: List of quotas (service limits). + :vartype value: list[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] + :ivar next_link: The URI for fetching the next page of quotas (service limits). When no more + pages exist, the value is null. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[CurrentQuotaLimitBase]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, + *, + value: Optional[List["_models.CurrentQuotaLimitBase"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of quotas (service limits). + :paramtype value: list[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] + :keyword next_link: The URI for fetching the next page of quotas (service limits). When no more + pages exist, the value is null. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class QuotaLimitsResponse(_serialization.Model): + """Quotas (service limits) in the request response. + + :ivar value: List of quotas with the quota request status. + :vartype value: list[~azure.mgmt.reservations.models.CurrentQuotaLimit] + :ivar next_link: The URI for fetching the next page of quota limits. When no more pages exist, + the value is null. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[CurrentQuotaLimit]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[List["_models.CurrentQuotaLimit"]] = None, next_link: Optional[str] = None, **kwargs + ): + """ + :keyword value: List of quotas with the quota request status. + :paramtype value: list[~azure.mgmt.reservations.models.CurrentQuotaLimit] + :keyword next_link: The URI for fetching the next page of quota limits. When no more pages + exist, the value is null. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class QuotaProperties(_serialization.Model): + """Quota properties for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar limit: Quota properties. + :vartype limit: int + :ivar current_value: Current usage value for the resource. + :vartype current_value: int + :ivar unit: The limit units, such as **count** and **bytes**. Use the unit field provided in + the response of the GET quota operation. + :vartype unit: str + :ivar name: Name of the resource provide by the resource provider. Use this property for + quotaRequests resource operations. + :vartype name: ~azure.mgmt.reservations.models.ResourceName + :ivar resource_type: The name of the resource type. Known values are: "standard", "dedicated", + "lowPriority", "shared", and "serviceSpecific". + :vartype resource_type: str or ~azure.mgmt.reservations.models.ResourceType + :ivar quota_period: The time period over which the quota usage values are summarized. For + example, P1D (per one day), PT1M (per one minute), and PT1S (per one second). This parameter is + optional because, for some resources such as compute, the time period is irrelevant. + :vartype quota_period: str + :ivar properties: Additional properties for the specified resource provider. + :vartype properties: JSON + """ + + _validation = { + "current_value": {"readonly": True}, + "quota_period": {"readonly": True}, + } + + _attribute_map = { + "limit": {"key": "limit", "type": "int"}, + "current_value": {"key": "currentValue", "type": "int"}, + "unit": {"key": "unit", "type": "str"}, + "name": {"key": "name", "type": "ResourceName"}, + "resource_type": {"key": "resourceType", "type": "str"}, + "quota_period": {"key": "quotaPeriod", "type": "str"}, + "properties": {"key": "properties", "type": "object"}, + } + + def __init__( + self, + *, + limit: Optional[int] = None, + unit: Optional[str] = None, + name: Optional["_models.ResourceName"] = None, + resource_type: Optional[Union[str, "_models.ResourceType"]] = None, + properties: Optional[JSON] = None, + **kwargs + ): + """ + :keyword limit: Quota properties. + :paramtype limit: int + :keyword unit: The limit units, such as **count** and **bytes**. Use the unit field provided in + the response of the GET quota operation. + :paramtype unit: str + :keyword name: Name of the resource provide by the resource provider. Use this property for + quotaRequests resource operations. + :paramtype name: ~azure.mgmt.reservations.models.ResourceName + :keyword resource_type: The name of the resource type. Known values are: "standard", + "dedicated", "lowPriority", "shared", and "serviceSpecific". + :paramtype resource_type: str or ~azure.mgmt.reservations.models.ResourceType + :keyword properties: Additional properties for the specified resource provider. + :paramtype properties: JSON + """ + super().__init__(**kwargs) + self.limit = limit + self.current_value = None + self.unit = unit + self.name = name + self.resource_type = resource_type + self.quota_period = None + self.properties = properties + + +class QuotaRequestDetails(_serialization.Model): + """Quota request details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Quota request ID. + :vartype id: str + :ivar name: Quota request name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar provisioning_state: The quota request status. Known values are: "Accepted", "Invalid", + "Succeeded", "Failed", and "InProgress". + :vartype provisioning_state: str or ~azure.mgmt.reservations.models.QuotaRequestState + :ivar message: User friendly status message. + :vartype message: str + :ivar request_submit_time: The time when the quota request was submitted using format: + yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + :vartype request_submit_time: ~datetime.datetime + :ivar value: The quotaRequests. + :vartype value: list[~azure.mgmt.reservations.models.SubRequest] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "message": {"readonly": True}, + "request_submit_time": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "message": {"key": "properties.message", "type": "str"}, + "request_submit_time": {"key": "properties.requestSubmitTime", "type": "iso-8601"}, + "value": {"key": "properties.value", "type": "[SubRequest]"}, + } + + def __init__( + self, + *, + provisioning_state: Optional[Union[str, "_models.QuotaRequestState"]] = None, + value: Optional[List["_models.SubRequest"]] = None, + **kwargs + ): + """ + :keyword provisioning_state: The quota request status. Known values are: "Accepted", "Invalid", + "Succeeded", "Failed", and "InProgress". + :paramtype provisioning_state: str or ~azure.mgmt.reservations.models.QuotaRequestState + :keyword value: The quotaRequests. + :paramtype value: list[~azure.mgmt.reservations.models.SubRequest] + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.provisioning_state = provisioning_state + self.message = None + self.request_submit_time = None + self.value = value + + +class QuotaRequestDetailsList(_serialization.Model): + """Quota request details. + + :ivar value: The quota requests. + :vartype value: list[~azure.mgmt.reservations.models.QuotaRequestDetails] + :ivar next_link: The URI to fetch the next page of quota limits. When there are no more pages, + this is null. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[QuotaRequestDetails]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[List["_models.QuotaRequestDetails"]] = None, next_link: Optional[str] = None, **kwargs + ): + """ + :keyword value: The quota requests. + :paramtype value: list[~azure.mgmt.reservations.models.QuotaRequestDetails] + :keyword next_link: The URI to fetch the next page of quota limits. When there are no more + pages, this is null. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class QuotaRequestOneResourceSubmitResponse(_serialization.Model): + """Response for the quota submission request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The quota request ID. + :vartype id: str + :ivar name: The name of the quota request. + :vartype name: str + :ivar type: Type of resource. "Microsoft.Capacity/ServiceLimits". + :vartype type: str + :ivar provisioning_state: The quota request status. Known values are: "Accepted", "Invalid", + "Succeeded", "Failed", and "InProgress". + :vartype provisioning_state: str or ~azure.mgmt.reservations.models.QuotaRequestState + :ivar message: User friendly status message. + :vartype message: str + :ivar request_submit_time: The time when the quota request was submitted using format: + yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + :vartype request_submit_time: ~datetime.datetime + :ivar id_properties_id: The quota request ID. + :vartype id_properties_id: str + :ivar name_properties_name: The name of the quota request. + :vartype name_properties_name: str + :ivar type_properties_type: Type of resource. "Microsoft.Capacity/ServiceLimits". + :vartype type_properties_type: str + :ivar properties: Quota properties for the resource. + :vartype properties: ~azure.mgmt.reservations.models.QuotaProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "message": {"readonly": True}, + "request_submit_time": {"readonly": True}, + "id_properties_id": {"readonly": True}, + "name_properties_name": {"readonly": True}, + "type_properties_type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "message": {"key": "properties.message", "type": "str"}, + "request_submit_time": {"key": "properties.requestSubmitTime", "type": "iso-8601"}, + "id_properties_id": {"key": "properties.properties.id", "type": "str"}, + "name_properties_name": {"key": "properties.properties.name", "type": "str"}, + "type_properties_type": {"key": "properties.properties.type", "type": "str"}, + "properties": {"key": "properties.properties.properties", "type": "QuotaProperties"}, + } + + def __init__(self, *, properties: Optional["_models.QuotaProperties"] = None, **kwargs): + """ + :keyword properties: Quota properties for the resource. + :paramtype properties: ~azure.mgmt.reservations.models.QuotaProperties + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.provisioning_state = None + self.message = None + self.request_submit_time = None + self.id_properties_id = None + self.name_properties_name = None + self.type_properties_type = None + self.properties = properties + + +class QuotaRequestProperties(_serialization.Model): + """The details of quota request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: The quota request status. Known values are: "Accepted", "Invalid", + "Succeeded", "Failed", and "InProgress". + :vartype provisioning_state: str or ~azure.mgmt.reservations.models.QuotaRequestState + :ivar message: User friendly status message. + :vartype message: str + :ivar request_submit_time: The time when the quota request was submitted using format: + yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + :vartype request_submit_time: ~datetime.datetime + :ivar value: The quotaRequests. + :vartype value: list[~azure.mgmt.reservations.models.SubRequest] + """ + + _validation = { + "message": {"readonly": True}, + "request_submit_time": {"readonly": True}, + } + + _attribute_map = { + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "request_submit_time": {"key": "requestSubmitTime", "type": "iso-8601"}, + "value": {"key": "value", "type": "[SubRequest]"}, + } + + def __init__( + self, + *, + provisioning_state: Optional[Union[str, "_models.QuotaRequestState"]] = None, + value: Optional[List["_models.SubRequest"]] = None, + **kwargs + ): + """ + :keyword provisioning_state: The quota request status. Known values are: "Accepted", "Invalid", + "Succeeded", "Failed", and "InProgress". + :paramtype provisioning_state: str or ~azure.mgmt.reservations.models.QuotaRequestState + :keyword value: The quotaRequests. + :paramtype value: list[~azure.mgmt.reservations.models.SubRequest] + """ + super().__init__(**kwargs) + self.provisioning_state = provisioning_state + self.message = None + self.request_submit_time = None + self.value = value + + +class QuotaRequestSubmitResponse(_serialization.Model): + """Response for the quota submission request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The quota request ID. + :vartype id: str + :ivar name: The name of the quota request. + :vartype name: str + :ivar properties: The quota request details. + :vartype properties: ~azure.mgmt.reservations.models.QuotaRequestProperties + :ivar type: Type of resource. "Microsoft.Capacity/serviceLimits". + :vartype type: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "properties": {"key": "properties", "type": "QuotaRequestProperties"}, + "type": {"key": "type", "type": "str"}, + } + + def __init__(self, *, properties: Optional["_models.QuotaRequestProperties"] = None, **kwargs): + """ + :keyword properties: The quota request details. + :paramtype properties: ~azure.mgmt.reservations.models.QuotaRequestProperties + """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.properties = properties + self.type = None + + +class QuotaRequestSubmitResponse201(_serialization.Model): + """Response with request ID that the quota request was accepted. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The quota request ID. Use the requestId parameter to check the request status. + :vartype id: str + :ivar name: Operation ID. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar provisioning_state: The details of the quota request status. Known values are: + "Accepted", "Invalid", "Succeeded", "Failed", and "InProgress". + :vartype provisioning_state: str or ~azure.mgmt.reservations.models.QuotaRequestState + :ivar message: A user friendly message. + :vartype message: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "message": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "message": {"key": "properties.message", "type": "str"}, + } + + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.provisioning_state = None + self.message = None + + +class RefundBillingInformation(_serialization.Model): + """billing information. + + :ivar billing_plan: Represent the billing plans. Known values are: "Upfront" and "Monthly". + :vartype billing_plan: str or ~azure.mgmt.reservations.models.ReservationBillingPlan + :ivar completed_transactions: The number of completed transactions in this reservation's + payment. + :vartype completed_transactions: int + :ivar total_transactions: The number of total transactions in this reservation's payment. + :vartype total_transactions: int + :ivar billing_currency_total_paid_amount: + :vartype billing_currency_total_paid_amount: ~azure.mgmt.reservations.models.Price + :ivar billing_currency_prorated_amount: + :vartype billing_currency_prorated_amount: ~azure.mgmt.reservations.models.Price + :ivar billing_currency_remaining_commitment_amount: + :vartype billing_currency_remaining_commitment_amount: ~azure.mgmt.reservations.models.Price + """ + + _attribute_map = { + "billing_plan": {"key": "billingPlan", "type": "str"}, + "completed_transactions": {"key": "completedTransactions", "type": "int"}, + "total_transactions": {"key": "totalTransactions", "type": "int"}, + "billing_currency_total_paid_amount": {"key": "billingCurrencyTotalPaidAmount", "type": "Price"}, + "billing_currency_prorated_amount": {"key": "billingCurrencyProratedAmount", "type": "Price"}, + "billing_currency_remaining_commitment_amount": { + "key": "billingCurrencyRemainingCommitmentAmount", + "type": "Price", + }, + } + + def __init__( + self, + *, + billing_plan: Optional[Union[str, "_models.ReservationBillingPlan"]] = None, + completed_transactions: Optional[int] = None, + total_transactions: Optional[int] = None, + billing_currency_total_paid_amount: Optional["_models.Price"] = None, + billing_currency_prorated_amount: Optional["_models.Price"] = None, + billing_currency_remaining_commitment_amount: Optional["_models.Price"] = None, + **kwargs + ): + """ + :keyword billing_plan: Represent the billing plans. Known values are: "Upfront" and "Monthly". + :paramtype billing_plan: str or ~azure.mgmt.reservations.models.ReservationBillingPlan + :keyword completed_transactions: The number of completed transactions in this reservation's + payment. + :paramtype completed_transactions: int + :keyword total_transactions: The number of total transactions in this reservation's payment. + :paramtype total_transactions: int + :keyword billing_currency_total_paid_amount: + :paramtype billing_currency_total_paid_amount: ~azure.mgmt.reservations.models.Price + :keyword billing_currency_prorated_amount: + :paramtype billing_currency_prorated_amount: ~azure.mgmt.reservations.models.Price + :keyword billing_currency_remaining_commitment_amount: + :paramtype billing_currency_remaining_commitment_amount: ~azure.mgmt.reservations.models.Price + """ + super().__init__(**kwargs) + self.billing_plan = billing_plan + self.completed_transactions = completed_transactions + self.total_transactions = total_transactions + self.billing_currency_total_paid_amount = billing_currency_total_paid_amount + self.billing_currency_prorated_amount = billing_currency_prorated_amount + self.billing_currency_remaining_commitment_amount = billing_currency_remaining_commitment_amount + + +class RefundPolicyError(_serialization.Model): + """error details. + + :ivar code: Known values are: "NotSpecified", "InternalServerError", "ServerTimeout", + "AuthorizationFailed", "BadRequest", "ClientCertificateThumbprintNotSet", + "InvalidRequestContent", "OperationFailed", "HttpMethodNotSupported", "InvalidRequestUri", + "MissingTenantId", "InvalidTenantId", "InvalidReservationOrderId", "InvalidReservationId", + "ReservationIdNotInReservationOrder", "ReservationOrderNotFound", "InvalidSubscriptionId", + "InvalidAccessToken", "InvalidLocationId", "UnauthenticatedRequestsThrottled", + "InvalidHealthCheckType", "Forbidden", "BillingScopeIdCannotBeChanged", + "AppliedScopesNotAssociatedWithCommerceAccount", "PatchValuesSameAsExisting", + "RoleAssignmentCreationFailed", "ReservationOrderCreationFailed", "ReservationOrderNotEnabled", + "CapacityUpdateScopesFailed", "UnsupportedReservationTerm", "ReservationOrderIdAlreadyExists", + "RiskCheckFailed", "CreateQuoteFailed", "ActivateQuoteFailed", "NonsupportedAccountId", + "PaymentInstrumentNotFound", "MissingAppliedScopesForSingle", "NoValidReservationsToReRate", + "ReRateOnlyAllowedForEA", "OperationCannotBePerformedInCurrentState", + "InvalidSingleAppliedScopesCount", "InvalidFulfillmentRequestParameters", + "NotSupportedCountry", "InvalidRefundQuantity", "PurchaseError", "BillingCustomerInputError", + "BillingPaymentInstrumentSoftError", "BillingPaymentInstrumentHardError", + "BillingTransientError", "BillingError", "FulfillmentConfigurationError", + "FulfillmentOutOfStockError", "FulfillmentTransientError", "FulfillmentError", + "CalculatePriceFailed", "AppliedScopesSameAsExisting", "SelfServiceRefundNotSupported", and + "RefundLimitExceeded". + :vartype code: str or ~azure.mgmt.reservations.models.ErrorResponseCode + :ivar message: + :vartype message: str + """ + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + } + + def __init__( + self, *, code: Optional[Union[str, "_models.ErrorResponseCode"]] = None, message: Optional[str] = None, **kwargs + ): + """ + :keyword code: Known values are: "NotSpecified", "InternalServerError", "ServerTimeout", + "AuthorizationFailed", "BadRequest", "ClientCertificateThumbprintNotSet", + "InvalidRequestContent", "OperationFailed", "HttpMethodNotSupported", "InvalidRequestUri", + "MissingTenantId", "InvalidTenantId", "InvalidReservationOrderId", "InvalidReservationId", + "ReservationIdNotInReservationOrder", "ReservationOrderNotFound", "InvalidSubscriptionId", + "InvalidAccessToken", "InvalidLocationId", "UnauthenticatedRequestsThrottled", + "InvalidHealthCheckType", "Forbidden", "BillingScopeIdCannotBeChanged", + "AppliedScopesNotAssociatedWithCommerceAccount", "PatchValuesSameAsExisting", + "RoleAssignmentCreationFailed", "ReservationOrderCreationFailed", "ReservationOrderNotEnabled", + "CapacityUpdateScopesFailed", "UnsupportedReservationTerm", "ReservationOrderIdAlreadyExists", + "RiskCheckFailed", "CreateQuoteFailed", "ActivateQuoteFailed", "NonsupportedAccountId", + "PaymentInstrumentNotFound", "MissingAppliedScopesForSingle", "NoValidReservationsToReRate", + "ReRateOnlyAllowedForEA", "OperationCannotBePerformedInCurrentState", + "InvalidSingleAppliedScopesCount", "InvalidFulfillmentRequestParameters", + "NotSupportedCountry", "InvalidRefundQuantity", "PurchaseError", "BillingCustomerInputError", + "BillingPaymentInstrumentSoftError", "BillingPaymentInstrumentHardError", + "BillingTransientError", "BillingError", "FulfillmentConfigurationError", + "FulfillmentOutOfStockError", "FulfillmentTransientError", "FulfillmentError", + "CalculatePriceFailed", "AppliedScopesSameAsExisting", "SelfServiceRefundNotSupported", and + "RefundLimitExceeded". + :paramtype code: str or ~azure.mgmt.reservations.models.ErrorResponseCode + :keyword message: + :paramtype message: str + """ + super().__init__(**kwargs) + self.code = code + self.message = message + + +class RefundPolicyResult(_serialization.Model): + """Refund policy result. + + :ivar properties: Refund policy result property. + :vartype properties: ~azure.mgmt.reservations.models.RefundPolicyResultProperty + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "RefundPolicyResultProperty"}, + } + + def __init__(self, *, properties: Optional["_models.RefundPolicyResultProperty"] = None, **kwargs): + """ + :keyword properties: Refund policy result property. + :paramtype properties: ~azure.mgmt.reservations.models.RefundPolicyResultProperty + """ + super().__init__(**kwargs) + self.properties = properties + + +class RefundPolicyResultProperty(_serialization.Model): + """Refund policy result property. + + :ivar consumed_refunds_total: + :vartype consumed_refunds_total: ~azure.mgmt.reservations.models.Price + :ivar max_refund_limit: + :vartype max_refund_limit: ~azure.mgmt.reservations.models.Price + :ivar policy_errors: Refund Policy errors. + :vartype policy_errors: list[~azure.mgmt.reservations.models.RefundPolicyError] + """ + + _attribute_map = { + "consumed_refunds_total": {"key": "consumedRefundsTotal", "type": "Price"}, + "max_refund_limit": {"key": "maxRefundLimit", "type": "Price"}, + "policy_errors": {"key": "policyErrors", "type": "[RefundPolicyError]"}, + } + + def __init__( + self, + *, + consumed_refunds_total: Optional["_models.Price"] = None, + max_refund_limit: Optional["_models.Price"] = None, + policy_errors: Optional[List["_models.RefundPolicyError"]] = None, + **kwargs + ): + """ + :keyword consumed_refunds_total: + :paramtype consumed_refunds_total: ~azure.mgmt.reservations.models.Price + :keyword max_refund_limit: + :paramtype max_refund_limit: ~azure.mgmt.reservations.models.Price + :keyword policy_errors: Refund Policy errors. + :paramtype policy_errors: list[~azure.mgmt.reservations.models.RefundPolicyError] + """ + super().__init__(**kwargs) + self.consumed_refunds_total = consumed_refunds_total + self.max_refund_limit = max_refund_limit + self.policy_errors = policy_errors + + +class RefundRequest(_serialization.Model): + """RefundRequest. + + :ivar properties: + :vartype properties: ~azure.mgmt.reservations.models.RefundRequestProperties + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "RefundRequestProperties"}, + } + + def __init__(self, *, properties: Optional["_models.RefundRequestProperties"] = None, **kwargs): + """ + :keyword properties: + :paramtype properties: ~azure.mgmt.reservations.models.RefundRequestProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class RefundRequestProperties(_serialization.Model): + """RefundRequestProperties. + + :ivar session_id: SessionId that was returned by CalculateRefund API. + :vartype session_id: str + :ivar scope: The scope of the refund, e.g. Reservation. + :vartype scope: str + :ivar reservation_to_return: Reservation to return. + :vartype reservation_to_return: ~azure.mgmt.reservations.models.ReservationToReturn + :ivar return_reason: The reason of returning the reservation. + :vartype return_reason: str + """ + + _attribute_map = { + "session_id": {"key": "sessionId", "type": "str"}, + "scope": {"key": "scope", "type": "str"}, + "reservation_to_return": {"key": "reservationToReturn", "type": "ReservationToReturn"}, + "return_reason": {"key": "returnReason", "type": "str"}, + } + + def __init__( + self, + *, + session_id: Optional[str] = None, + scope: Optional[str] = None, + reservation_to_return: Optional["_models.ReservationToReturn"] = None, + return_reason: Optional[str] = None, + **kwargs + ): + """ + :keyword session_id: SessionId that was returned by CalculateRefund API. + :paramtype session_id: str + :keyword scope: The scope of the refund, e.g. Reservation. + :paramtype scope: str + :keyword reservation_to_return: Reservation to return. + :paramtype reservation_to_return: ~azure.mgmt.reservations.models.ReservationToReturn + :keyword return_reason: The reason of returning the reservation. + :paramtype return_reason: str + """ + super().__init__(**kwargs) + self.session_id = session_id + self.scope = scope + self.reservation_to_return = reservation_to_return + self.return_reason = return_reason + + +class RefundResponse(_serialization.Model): + """RefundResponse. + + :ivar id: Fully qualified identifier of the reservation being returned. + :vartype id: str + :ivar properties: + :vartype properties: ~azure.mgmt.reservations.models.RefundResponseProperties + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "properties": {"key": "properties", "type": "RefundResponseProperties"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + properties: Optional["_models.RefundResponseProperties"] = None, + **kwargs + ): + """ + :keyword id: Fully qualified identifier of the reservation being returned. + :paramtype id: str + :keyword properties: + :paramtype properties: ~azure.mgmt.reservations.models.RefundResponseProperties + """ + super().__init__(**kwargs) + self.id = id + self.properties = properties + + +class RefundResponseProperties(_serialization.Model): + """RefundResponseProperties. + + :ivar session_id: Refund session identifier. + :vartype session_id: str + :ivar quantity: Quantity to be returned. + :vartype quantity: int + :ivar billing_refund_amount: + :vartype billing_refund_amount: ~azure.mgmt.reservations.models.Price + :ivar pricing_refund_amount: + :vartype pricing_refund_amount: ~azure.mgmt.reservations.models.Price + :ivar policy_result: Refund policy result. + :vartype policy_result: ~azure.mgmt.reservations.models.RefundPolicyResult + :ivar billing_information: billing information. + :vartype billing_information: ~azure.mgmt.reservations.models.RefundBillingInformation + """ + + _attribute_map = { + "session_id": {"key": "sessionId", "type": "str"}, + "quantity": {"key": "quantity", "type": "int"}, + "billing_refund_amount": {"key": "billingRefundAmount", "type": "Price"}, + "pricing_refund_amount": {"key": "pricingRefundAmount", "type": "Price"}, + "policy_result": {"key": "policyResult", "type": "RefundPolicyResult"}, + "billing_information": {"key": "billingInformation", "type": "RefundBillingInformation"}, + } + + def __init__( + self, + *, + session_id: Optional[str] = None, + quantity: Optional[int] = None, + billing_refund_amount: Optional["_models.Price"] = None, + pricing_refund_amount: Optional["_models.Price"] = None, + policy_result: Optional["_models.RefundPolicyResult"] = None, + billing_information: Optional["_models.RefundBillingInformation"] = None, + **kwargs + ): + """ + :keyword session_id: Refund session identifier. + :paramtype session_id: str + :keyword quantity: Quantity to be returned. + :paramtype quantity: int + :keyword billing_refund_amount: + :paramtype billing_refund_amount: ~azure.mgmt.reservations.models.Price + :keyword pricing_refund_amount: + :paramtype pricing_refund_amount: ~azure.mgmt.reservations.models.Price + :keyword policy_result: Refund policy result. + :paramtype policy_result: ~azure.mgmt.reservations.models.RefundPolicyResult + :keyword billing_information: billing information. + :paramtype billing_information: ~azure.mgmt.reservations.models.RefundBillingInformation + """ + super().__init__(**kwargs) + self.session_id = session_id + self.quantity = quantity + self.billing_refund_amount = billing_refund_amount + self.pricing_refund_amount = pricing_refund_amount + self.policy_result = policy_result + self.billing_information = billing_information + + +class RenewPropertiesResponse(_serialization.Model): + """RenewPropertiesResponse. + + :ivar purchase_properties: + :vartype purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest + :ivar pricing_currency_total: Amount that Microsoft uses for record. Used during refund for + calculating refund limit. Tax is not included. This is locked price 30 days before expiry. + :vartype pricing_currency_total: + ~azure.mgmt.reservations.models.RenewPropertiesResponsePricingCurrencyTotal + :ivar billing_currency_total: Currency and amount that customer will be charged in customer's + local currency for renewal purchase. Tax is not included. + :vartype billing_currency_total: + ~azure.mgmt.reservations.models.RenewPropertiesResponseBillingCurrencyTotal + """ + + _attribute_map = { + "purchase_properties": {"key": "purchaseProperties", "type": "PurchaseRequest"}, + "pricing_currency_total": { + "key": "pricingCurrencyTotal", + "type": "RenewPropertiesResponsePricingCurrencyTotal", + }, + "billing_currency_total": { + "key": "billingCurrencyTotal", + "type": "RenewPropertiesResponseBillingCurrencyTotal", + }, + } + + def __init__( + self, + *, + purchase_properties: Optional["_models.PurchaseRequest"] = None, + pricing_currency_total: Optional["_models.RenewPropertiesResponsePricingCurrencyTotal"] = None, + billing_currency_total: Optional["_models.RenewPropertiesResponseBillingCurrencyTotal"] = None, + **kwargs + ): + """ + :keyword purchase_properties: + :paramtype purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest + :keyword pricing_currency_total: Amount that Microsoft uses for record. Used during refund for + calculating refund limit. Tax is not included. This is locked price 30 days before expiry. + :paramtype pricing_currency_total: + ~azure.mgmt.reservations.models.RenewPropertiesResponsePricingCurrencyTotal + :keyword billing_currency_total: Currency and amount that customer will be charged in + customer's local currency for renewal purchase. Tax is not included. + :paramtype billing_currency_total: + ~azure.mgmt.reservations.models.RenewPropertiesResponseBillingCurrencyTotal + """ + super().__init__(**kwargs) + self.purchase_properties = purchase_properties + self.pricing_currency_total = pricing_currency_total + self.billing_currency_total = billing_currency_total + + +class RenewPropertiesResponseBillingCurrencyTotal(_serialization.Model): + """Currency and amount that customer will be charged in customer's local currency for renewal purchase. Tax is not included. + + :ivar currency_code: The ISO 4217 3-letter currency code for the currency used by this purchase + record. + :vartype currency_code: str + :ivar amount: + :vartype amount: float + """ + + _attribute_map = { + "currency_code": {"key": "currencyCode", "type": "str"}, + "amount": {"key": "amount", "type": "float"}, + } + + def __init__(self, *, currency_code: Optional[str] = None, amount: Optional[float] = None, **kwargs): + """ + :keyword currency_code: The ISO 4217 3-letter currency code for the currency used by this + purchase record. + :paramtype currency_code: str + :keyword amount: + :paramtype amount: float + """ + super().__init__(**kwargs) + self.currency_code = currency_code + self.amount = amount + + +class RenewPropertiesResponsePricingCurrencyTotal(_serialization.Model): + """Amount that Microsoft uses for record. Used during refund for calculating refund limit. Tax is not included. This is locked price 30 days before expiry. + + :ivar currency_code: The ISO 4217 3-letter currency code for the currency used by this purchase + record. + :vartype currency_code: str + :ivar amount: + :vartype amount: float + """ + + _attribute_map = { + "currency_code": {"key": "currencyCode", "type": "str"}, + "amount": {"key": "amount", "type": "float"}, + } + + def __init__(self, *, currency_code: Optional[str] = None, amount: Optional[float] = None, **kwargs): + """ + :keyword currency_code: The ISO 4217 3-letter currency code for the currency used by this + purchase record. + :paramtype currency_code: str + :keyword amount: + :paramtype amount: float + """ + super().__init__(**kwargs) + self.currency_code = currency_code + self.amount = amount + + +class ReservationList(_serialization.Model): + """ReservationList. + + :ivar value: + :vartype value: list[~azure.mgmt.reservations.models.ReservationResponse] + :ivar next_link: Url to get the next page of reservations. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[ReservationResponse]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[List["_models.ReservationResponse"]] = None, next_link: Optional[str] = None, **kwargs + ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.reservations.models.ReservationResponse] + :keyword next_link: Url to get the next page of reservations. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ReservationMergeProperties(_serialization.Model): + """ReservationMergeProperties. + + :ivar merge_destination: Reservation Resource Id Created due to the merge. Format of the + resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :vartype merge_destination: str + :ivar merge_sources: Resource Ids of the Source Reservation's merged to form this Reservation. + Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :vartype merge_sources: list[str] + """ + + _attribute_map = { + "merge_destination": {"key": "mergeDestination", "type": "str"}, + "merge_sources": {"key": "mergeSources", "type": "[str]"}, + } + + def __init__(self, *, merge_destination: Optional[str] = None, merge_sources: Optional[List[str]] = None, **kwargs): + """ + :keyword merge_destination: Reservation Resource Id Created due to the merge. Format of the + resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :paramtype merge_destination: str + :keyword merge_sources: Resource Ids of the Source Reservation's merged to form this + Reservation. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :paramtype merge_sources: list[str] + """ + super().__init__(**kwargs) + self.merge_destination = merge_destination + self.merge_sources = merge_sources + + +class ReservationOrderBillingPlanInformation(_serialization.Model): + """Information describing the type of billing plan for this reservation. + + :ivar pricing_currency_total: Amount of money to be paid for the Order. Tax is not included. + :vartype pricing_currency_total: ~azure.mgmt.reservations.models.Price + :ivar start_date: Date when the billing plan has started. + :vartype start_date: ~datetime.date + :ivar next_payment_due_date: For recurring billing plans, indicates the date when next payment + will be processed. Null when total is paid off. + :vartype next_payment_due_date: ~datetime.date + :ivar transactions: + :vartype transactions: list[~azure.mgmt.reservations.models.PaymentDetail] + """ + + _attribute_map = { + "pricing_currency_total": {"key": "pricingCurrencyTotal", "type": "Price"}, + "start_date": {"key": "startDate", "type": "date"}, + "next_payment_due_date": {"key": "nextPaymentDueDate", "type": "date"}, + "transactions": {"key": "transactions", "type": "[PaymentDetail]"}, + } + + def __init__( + self, + *, + pricing_currency_total: Optional["_models.Price"] = None, + start_date: Optional[datetime.date] = None, + next_payment_due_date: Optional[datetime.date] = None, + transactions: Optional[List["_models.PaymentDetail"]] = None, + **kwargs + ): + """ + :keyword pricing_currency_total: Amount of money to be paid for the Order. Tax is not included. + :paramtype pricing_currency_total: ~azure.mgmt.reservations.models.Price + :keyword start_date: Date when the billing plan has started. + :paramtype start_date: ~datetime.date + :keyword next_payment_due_date: For recurring billing plans, indicates the date when next + payment will be processed. Null when total is paid off. + :paramtype next_payment_due_date: ~datetime.date + :keyword transactions: + :paramtype transactions: list[~azure.mgmt.reservations.models.PaymentDetail] + """ + super().__init__(**kwargs) + self.pricing_currency_total = pricing_currency_total + self.start_date = start_date + self.next_payment_due_date = next_payment_due_date + self.transactions = transactions + + +class ReservationOrderList(_serialization.Model): + """ReservationOrderList. + + :ivar value: + :vartype value: list[~azure.mgmt.reservations.models.ReservationOrderResponse] + :ivar next_link: Url to get the next page of reservationOrders. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[ReservationOrderResponse]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, + *, + value: Optional[List["_models.ReservationOrderResponse"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.reservations.models.ReservationOrderResponse] + :keyword next_link: Url to get the next page of reservationOrders. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ReservationOrderResponse(_serialization.Model): # pylint: disable=too-many-instance-attributes + """ReservationOrderResponse. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar etag: + :vartype etag: int + :ivar id: Identifier of the reservation. + :vartype id: str + :ivar name: Name of the reservation. + :vartype name: str + :ivar type: Type of resource. "Microsoft.Capacity/reservations". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.reservations.models.SystemData + :ivar display_name: Friendly name for user to easily identified the reservation. + :vartype display_name: str + :ivar request_date_time: This is the DateTime when the reservation was initially requested for + purchase. + :vartype request_date_time: ~datetime.datetime + :ivar created_date_time: This is the DateTime when the reservation was created. + :vartype created_date_time: ~datetime.datetime + :ivar expiry_date: This is the date when the Reservation will expire. + :vartype expiry_date: ~datetime.date + :ivar benefit_start_time: This is the DateTime when the reservation benefit started. + :vartype benefit_start_time: ~datetime.datetime + :ivar original_quantity: Total Quantity of the SKUs purchased in the Reservation. + :vartype original_quantity: int + :ivar term: Represent the term of Reservation. Known values are: "P1Y", "P3Y", and "P5Y". + :vartype term: str or ~azure.mgmt.reservations.models.ReservationTerm + :ivar provisioning_state: Current state of the reservation. Known values are: "Creating", + "PendingResourceHold", "ConfirmedResourceHold", "PendingBilling", "ConfirmedBilling", + "Created", "Succeeded", "Cancelled", "Expired", "BillingFailed", "Failed", "Split", and + "Merged". + :vartype provisioning_state: str or ~azure.mgmt.reservations.models.ProvisioningState + :ivar billing_plan: Represent the billing plans. Known values are: "Upfront" and "Monthly". + :vartype billing_plan: str or ~azure.mgmt.reservations.models.ReservationBillingPlan + :ivar plan_information: Information describing the type of billing plan for this reservation. + :vartype plan_information: + ~azure.mgmt.reservations.models.ReservationOrderBillingPlanInformation + :ivar reservations: + :vartype reservations: list[~azure.mgmt.reservations.models.ReservationResponse] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "etag": {"key": "etag", "type": "int"}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "display_name": {"key": "properties.displayName", "type": "str"}, + "request_date_time": {"key": "properties.requestDateTime", "type": "iso-8601"}, + "created_date_time": {"key": "properties.createdDateTime", "type": "iso-8601"}, + "expiry_date": {"key": "properties.expiryDate", "type": "date"}, + "benefit_start_time": {"key": "properties.benefitStartTime", "type": "iso-8601"}, + "original_quantity": {"key": "properties.originalQuantity", "type": "int"}, + "term": {"key": "properties.term", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "billing_plan": {"key": "properties.billingPlan", "type": "str"}, + "plan_information": {"key": "properties.planInformation", "type": "ReservationOrderBillingPlanInformation"}, + "reservations": {"key": "properties.reservations", "type": "[ReservationResponse]"}, + } + + def __init__( + self, + *, + etag: Optional[int] = None, + display_name: Optional[str] = None, + request_date_time: Optional[datetime.datetime] = None, + created_date_time: Optional[datetime.datetime] = None, + expiry_date: Optional[datetime.date] = None, + benefit_start_time: Optional[datetime.datetime] = None, + original_quantity: Optional[int] = None, + term: Optional[Union[str, "_models.ReservationTerm"]] = None, + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None, + billing_plan: Optional[Union[str, "_models.ReservationBillingPlan"]] = None, + plan_information: Optional["_models.ReservationOrderBillingPlanInformation"] = None, + reservations: Optional[List["_models.ReservationResponse"]] = None, + **kwargs + ): + """ + :keyword etag: + :paramtype etag: int + :keyword display_name: Friendly name for user to easily identified the reservation. + :paramtype display_name: str + :keyword request_date_time: This is the DateTime when the reservation was initially requested + for purchase. + :paramtype request_date_time: ~datetime.datetime + :keyword created_date_time: This is the DateTime when the reservation was created. + :paramtype created_date_time: ~datetime.datetime + :keyword expiry_date: This is the date when the Reservation will expire. + :paramtype expiry_date: ~datetime.date + :keyword benefit_start_time: This is the DateTime when the reservation benefit started. + :paramtype benefit_start_time: ~datetime.datetime + :keyword original_quantity: Total Quantity of the SKUs purchased in the Reservation. + :paramtype original_quantity: int + :keyword term: Represent the term of Reservation. Known values are: "P1Y", "P3Y", and "P5Y". + :paramtype term: str or ~azure.mgmt.reservations.models.ReservationTerm + :keyword provisioning_state: Current state of the reservation. Known values are: "Creating", + "PendingResourceHold", "ConfirmedResourceHold", "PendingBilling", "ConfirmedBilling", + "Created", "Succeeded", "Cancelled", "Expired", "BillingFailed", "Failed", "Split", and + "Merged". + :paramtype provisioning_state: str or ~azure.mgmt.reservations.models.ProvisioningState + :keyword billing_plan: Represent the billing plans. Known values are: "Upfront" and "Monthly". + :paramtype billing_plan: str or ~azure.mgmt.reservations.models.ReservationBillingPlan + :keyword plan_information: Information describing the type of billing plan for this + reservation. + :paramtype plan_information: + ~azure.mgmt.reservations.models.ReservationOrderBillingPlanInformation + :keyword reservations: + :paramtype reservations: list[~azure.mgmt.reservations.models.ReservationResponse] + """ + super().__init__(**kwargs) + self.etag = etag + self.id = None + self.name = None + self.type = None + self.system_data = None + self.display_name = display_name + self.request_date_time = request_date_time + self.created_date_time = created_date_time + self.expiry_date = expiry_date + self.benefit_start_time = benefit_start_time + self.original_quantity = original_quantity + self.term = term + self.provisioning_state = provisioning_state + self.billing_plan = billing_plan + self.plan_information = plan_information + self.reservations = reservations + + +class ReservationResponse(_serialization.Model): + """The definition of the reservation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar location: The Azure Region where the reserved resource lives. + :vartype location: str + :ivar etag: + :vartype etag: int + :ivar id: Identifier of the reservation. + :vartype id: str + :ivar name: Name of the reservation. + :vartype name: str + :ivar sku: The sku information associated to this reservation. + :vartype sku: ~azure.mgmt.reservations.models.SkuName + :ivar properties: The properties associated to this reservation. + :vartype properties: ~azure.mgmt.reservations.models.ReservationsProperties + :ivar type: Type of resource. "Microsoft.Capacity/reservationOrders/reservations". + :vartype type: str + :ivar kind: Resource Provider type to be reserved. Default value is "Microsoft.Compute". + :vartype kind: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.reservations.models.SystemData + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "location": {"key": "location", "type": "str"}, + "etag": {"key": "etag", "type": "int"}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "sku": {"key": "sku", "type": "SkuName"}, + "properties": {"key": "properties", "type": "ReservationsProperties"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + etag: Optional[int] = None, + sku: Optional["_models.SkuName"] = None, + properties: Optional["_models.ReservationsProperties"] = None, + kind: Optional[str] = None, + **kwargs + ): + """ + :keyword location: The Azure Region where the reserved resource lives. + :paramtype location: str + :keyword etag: + :paramtype etag: int + :keyword sku: The sku information associated to this reservation. + :paramtype sku: ~azure.mgmt.reservations.models.SkuName + :keyword properties: The properties associated to this reservation. + :paramtype properties: ~azure.mgmt.reservations.models.ReservationsProperties + :keyword kind: Resource Provider type to be reserved. Default value is "Microsoft.Compute". + :paramtype kind: str + """ + super().__init__(**kwargs) + self.location = location + self.etag = etag + self.id = None + self.name = None + self.sku = sku + self.properties = properties + self.type = None + self.kind = kind + self.system_data = None + + +class ReservationsListResult(_serialization.Model): + """The list of reservations and summary of roll out count of reservations in each state. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of reservations. + :vartype value: list[~azure.mgmt.reservations.models.ReservationResponse] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + :ivar summary: The roll out count summary of the reservations. + :vartype summary: ~azure.mgmt.reservations.models.ReservationSummary + """ + + _validation = { + "value": {"readonly": True}, + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[ReservationResponse]"}, + "next_link": {"key": "nextLink", "type": "str"}, + "summary": {"key": "summary", "type": "ReservationSummary"}, + } + + def __init__(self, *, summary: Optional["_models.ReservationSummary"] = None, **kwargs): + """ + :keyword summary: The roll out count summary of the reservations. + :paramtype summary: ~azure.mgmt.reservations.models.ReservationSummary + """ + super().__init__(**kwargs) + self.value = None + self.next_link = None + self.summary = summary + + +class ReservationSplitProperties(_serialization.Model): + """ReservationSplitProperties. + + :ivar split_destinations: List of destination Resource Id that are created due to split. Format + of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :vartype split_destinations: list[str] + :ivar split_source: Resource Id of the Reservation from which this is split. Format of the + resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :vartype split_source: str + """ + + _attribute_map = { + "split_destinations": {"key": "splitDestinations", "type": "[str]"}, + "split_source": {"key": "splitSource", "type": "str"}, + } + + def __init__(self, *, split_destinations: Optional[List[str]] = None, split_source: Optional[str] = None, **kwargs): + """ + :keyword split_destinations: List of destination Resource Id that are created due to split. + Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :paramtype split_destinations: list[str] + :keyword split_source: Resource Id of the Reservation from which this is split. Format of the + resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :paramtype split_source: str + """ + super().__init__(**kwargs) + self.split_destinations = split_destinations + self.split_source = split_source + + +class ReservationsProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes + """The properties of the reservations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar reserved_resource_type: The type of the resource that is being reserved. Known values + are: "VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", + "VMwareCloudSimple", "RedHatOsa", "Databricks", "AppService", "ManagedDisk", "BlockBlob", + "RedisCache", "AzureDataExplorer", "MySql", "MariaDb", "PostgreSql", "DedicatedHost", + "SapHana", "SqlAzureHybridBenefit", "AVS", "DataFactory", "NetAppStorage", "AzureFiles", + "SqlEdge", and "VirtualMachineSoftware". + :vartype reserved_resource_type: str or ~azure.mgmt.reservations.models.ReservedResourceType + :ivar instance_flexibility: Allows reservation discount to be applied across skus within the + same Autofit group. Not all skus support instance size flexibility. Known values are: "On" and + "Off". + :vartype instance_flexibility: str or ~azure.mgmt.reservations.models.InstanceFlexibility + :ivar display_name: Friendly name for user to easily identify the reservation. + :vartype display_name: str + :ivar applied_scopes: The list of applied scopes. + :vartype applied_scopes: list[str] + :ivar applied_scope_type: The applied scope type. Known values are: "Single" and "Shared". + :vartype applied_scope_type: str or ~azure.mgmt.reservations.models.AppliedScopeType + :ivar archived: Indicates if the reservation is archived. + :vartype archived: bool + :ivar capabilities: Capabilities of the reservation. + :vartype capabilities: str + :ivar quantity: Quantity of the SKUs that are part of the Reservation. + :vartype quantity: int + :ivar provisioning_state: Current state of the reservation. Known values are: "Creating", + "PendingResourceHold", "ConfirmedResourceHold", "PendingBilling", "ConfirmedBilling", + "Created", "Succeeded", "Cancelled", "Expired", "BillingFailed", "Failed", "Split", and + "Merged". + :vartype provisioning_state: str or ~azure.mgmt.reservations.models.ProvisioningState + :ivar effective_date_time: DateTime of the Reservation starting when this version is effective + from. + :vartype effective_date_time: ~datetime.datetime + :ivar benefit_start_time: This is the DateTime when the reservation benefit started. + :vartype benefit_start_time: ~datetime.datetime + :ivar last_updated_date_time: DateTime of the last time the Reservation was updated. + :vartype last_updated_date_time: ~datetime.datetime + :ivar expiry_date: This is the date when the Reservation will expire. + :vartype expiry_date: ~datetime.date + :ivar sku_description: Description of the SKU in english. + :vartype sku_description: str + :ivar extended_status_info: The message giving detailed information about the status code. + :vartype extended_status_info: ~azure.mgmt.reservations.models.ExtendedStatusInfo + :ivar billing_plan: The billing plan options available for this SKU. Known values are: + "Upfront" and "Monthly". + :vartype billing_plan: str or ~azure.mgmt.reservations.models.ReservationBillingPlan + :ivar display_provisioning_state: The provisioning state of the reservation for display, e.g. + Succeeded. + :vartype display_provisioning_state: str + :ivar provisioning_sub_state: The provisioning state of the reservation, e.g. Succeeded. + :vartype provisioning_sub_state: str + :ivar purchase_date: This is the date when the Reservation was purchased. + :vartype purchase_date: ~datetime.date + :ivar split_properties: + :vartype split_properties: ~azure.mgmt.reservations.models.ReservationSplitProperties + :ivar merge_properties: + :vartype merge_properties: ~azure.mgmt.reservations.models.ReservationMergeProperties + :ivar billing_scope_id: Subscription that will be charged for purchasing Reservation. + :vartype billing_scope_id: str + :ivar renew: Setting this to true will automatically purchase a new reservation on the + expiration date time. + :vartype renew: bool + :ivar renew_source: Reservation Id of the reservation from which this reservation is renewed. + Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :vartype renew_source: str + :ivar renew_destination: Reservation Id of the reservation which is purchased because of renew. + Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :vartype renew_destination: str + :ivar renew_properties: + :vartype renew_properties: ~azure.mgmt.reservations.models.RenewPropertiesResponse + :ivar term: Represent the term of Reservation. Known values are: "P1Y", "P3Y", and "P5Y". + :vartype term: str or ~azure.mgmt.reservations.models.ReservationTerm + :ivar user_friendly_applied_scope_type: The applied scope type of the reservation for display, + e.g. Shared. + :vartype user_friendly_applied_scope_type: str + :ivar user_friendly_renew_state: The renew state of the reservation for display, e.g. On. + :vartype user_friendly_renew_state: str + :ivar utilization: Reservation utilization. + :vartype utilization: ~azure.mgmt.reservations.models.ReservationsPropertiesUtilization + """ + + _validation = { + "last_updated_date_time": {"readonly": True}, + "display_provisioning_state": {"readonly": True}, + "provisioning_sub_state": {"readonly": True}, + "user_friendly_applied_scope_type": {"readonly": True}, + "user_friendly_renew_state": {"readonly": True}, + "utilization": {"readonly": True}, + } + + _attribute_map = { + "reserved_resource_type": {"key": "reservedResourceType", "type": "str"}, + "instance_flexibility": {"key": "instanceFlexibility", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "applied_scopes": {"key": "appliedScopes", "type": "[str]"}, + "applied_scope_type": {"key": "appliedScopeType", "type": "str"}, + "archived": {"key": "archived", "type": "bool"}, + "capabilities": {"key": "capabilities", "type": "str"}, + "quantity": {"key": "quantity", "type": "int"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "effective_date_time": {"key": "effectiveDateTime", "type": "iso-8601"}, + "benefit_start_time": {"key": "benefitStartTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "expiry_date": {"key": "expiryDate", "type": "date"}, + "sku_description": {"key": "skuDescription", "type": "str"}, + "extended_status_info": {"key": "extendedStatusInfo", "type": "ExtendedStatusInfo"}, + "billing_plan": {"key": "billingPlan", "type": "str"}, + "display_provisioning_state": {"key": "displayProvisioningState", "type": "str"}, + "provisioning_sub_state": {"key": "provisioningSubState", "type": "str"}, + "purchase_date": {"key": "purchaseDate", "type": "date"}, + "split_properties": {"key": "splitProperties", "type": "ReservationSplitProperties"}, + "merge_properties": {"key": "mergeProperties", "type": "ReservationMergeProperties"}, + "billing_scope_id": {"key": "billingScopeId", "type": "str"}, + "renew": {"key": "renew", "type": "bool"}, + "renew_source": {"key": "renewSource", "type": "str"}, + "renew_destination": {"key": "renewDestination", "type": "str"}, + "renew_properties": {"key": "renewProperties", "type": "RenewPropertiesResponse"}, + "term": {"key": "term", "type": "str"}, + "user_friendly_applied_scope_type": {"key": "userFriendlyAppliedScopeType", "type": "str"}, + "user_friendly_renew_state": {"key": "userFriendlyRenewState", "type": "str"}, + "utilization": {"key": "utilization", "type": "ReservationsPropertiesUtilization"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + reserved_resource_type: Optional[Union[str, "_models.ReservedResourceType"]] = None, + instance_flexibility: Optional[Union[str, "_models.InstanceFlexibility"]] = None, + display_name: Optional[str] = None, + applied_scopes: Optional[List[str]] = None, + applied_scope_type: Optional[Union[str, "_models.AppliedScopeType"]] = None, + archived: Optional[bool] = None, + capabilities: Optional[str] = None, + quantity: Optional[int] = None, + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None, + effective_date_time: Optional[datetime.datetime] = None, + benefit_start_time: Optional[datetime.datetime] = None, + expiry_date: Optional[datetime.date] = None, + sku_description: Optional[str] = None, + extended_status_info: Optional["_models.ExtendedStatusInfo"] = None, + billing_plan: Optional[Union[str, "_models.ReservationBillingPlan"]] = None, + purchase_date: Optional[datetime.date] = None, + split_properties: Optional["_models.ReservationSplitProperties"] = None, + merge_properties: Optional["_models.ReservationMergeProperties"] = None, + billing_scope_id: Optional[str] = None, + renew: bool = False, + renew_source: Optional[str] = None, + renew_destination: Optional[str] = None, + renew_properties: Optional["_models.RenewPropertiesResponse"] = None, + term: Optional[Union[str, "_models.ReservationTerm"]] = None, + **kwargs + ): + """ + :keyword reserved_resource_type: The type of the resource that is being reserved. Known values + are: "VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", + "VMwareCloudSimple", "RedHatOsa", "Databricks", "AppService", "ManagedDisk", "BlockBlob", + "RedisCache", "AzureDataExplorer", "MySql", "MariaDb", "PostgreSql", "DedicatedHost", + "SapHana", "SqlAzureHybridBenefit", "AVS", "DataFactory", "NetAppStorage", "AzureFiles", + "SqlEdge", and "VirtualMachineSoftware". + :paramtype reserved_resource_type: str or ~azure.mgmt.reservations.models.ReservedResourceType + :keyword instance_flexibility: Allows reservation discount to be applied across skus within the + same Autofit group. Not all skus support instance size flexibility. Known values are: "On" and + "Off". + :paramtype instance_flexibility: str or ~azure.mgmt.reservations.models.InstanceFlexibility + :keyword display_name: Friendly name for user to easily identify the reservation. + :paramtype display_name: str + :keyword applied_scopes: The list of applied scopes. + :paramtype applied_scopes: list[str] + :keyword applied_scope_type: The applied scope type. Known values are: "Single" and "Shared". + :paramtype applied_scope_type: str or ~azure.mgmt.reservations.models.AppliedScopeType + :keyword archived: Indicates if the reservation is archived. + :paramtype archived: bool + :keyword capabilities: Capabilities of the reservation. + :paramtype capabilities: str + :keyword quantity: Quantity of the SKUs that are part of the Reservation. + :paramtype quantity: int + :keyword provisioning_state: Current state of the reservation. Known values are: "Creating", + "PendingResourceHold", "ConfirmedResourceHold", "PendingBilling", "ConfirmedBilling", + "Created", "Succeeded", "Cancelled", "Expired", "BillingFailed", "Failed", "Split", and + "Merged". + :paramtype provisioning_state: str or ~azure.mgmt.reservations.models.ProvisioningState + :keyword effective_date_time: DateTime of the Reservation starting when this version is + effective from. + :paramtype effective_date_time: ~datetime.datetime + :keyword benefit_start_time: This is the DateTime when the reservation benefit started. + :paramtype benefit_start_time: ~datetime.datetime + :keyword expiry_date: This is the date when the Reservation will expire. + :paramtype expiry_date: ~datetime.date + :keyword sku_description: Description of the SKU in english. + :paramtype sku_description: str + :keyword extended_status_info: The message giving detailed information about the status code. + :paramtype extended_status_info: ~azure.mgmt.reservations.models.ExtendedStatusInfo + :keyword billing_plan: The billing plan options available for this SKU. Known values are: + "Upfront" and "Monthly". + :paramtype billing_plan: str or ~azure.mgmt.reservations.models.ReservationBillingPlan + :keyword purchase_date: This is the date when the Reservation was purchased. + :paramtype purchase_date: ~datetime.date + :keyword split_properties: + :paramtype split_properties: ~azure.mgmt.reservations.models.ReservationSplitProperties + :keyword merge_properties: + :paramtype merge_properties: ~azure.mgmt.reservations.models.ReservationMergeProperties + :keyword billing_scope_id: Subscription that will be charged for purchasing Reservation. + :paramtype billing_scope_id: str + :keyword renew: Setting this to true will automatically purchase a new reservation on the + expiration date time. + :paramtype renew: bool + :keyword renew_source: Reservation Id of the reservation from which this reservation is + renewed. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :paramtype renew_source: str + :keyword renew_destination: Reservation Id of the reservation which is purchased because of + renew. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :paramtype renew_destination: str + :keyword renew_properties: + :paramtype renew_properties: ~azure.mgmt.reservations.models.RenewPropertiesResponse + :keyword term: Represent the term of Reservation. Known values are: "P1Y", "P3Y", and "P5Y". + :paramtype term: str or ~azure.mgmt.reservations.models.ReservationTerm + """ + super().__init__(**kwargs) + self.reserved_resource_type = reserved_resource_type + self.instance_flexibility = instance_flexibility + self.display_name = display_name + self.applied_scopes = applied_scopes + self.applied_scope_type = applied_scope_type + self.archived = archived + self.capabilities = capabilities + self.quantity = quantity + self.provisioning_state = provisioning_state + self.effective_date_time = effective_date_time + self.benefit_start_time = benefit_start_time + self.last_updated_date_time = None + self.expiry_date = expiry_date + self.sku_description = sku_description + self.extended_status_info = extended_status_info + self.billing_plan = billing_plan + self.display_provisioning_state = None + self.provisioning_sub_state = None + self.purchase_date = purchase_date + self.split_properties = split_properties + self.merge_properties = merge_properties + self.billing_scope_id = billing_scope_id + self.renew = renew + self.renew_source = renew_source + self.renew_destination = renew_destination + self.renew_properties = renew_properties + self.term = term + self.user_friendly_applied_scope_type = None + self.user_friendly_renew_state = None + self.utilization = None + + +class ReservationsPropertiesUtilization(_serialization.Model): + """Reservation utilization. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar trend: The number of days trend for a reservation. + :vartype trend: str + :ivar aggregates: The array of aggregates of a reservation's utilization. + :vartype aggregates: list[~azure.mgmt.reservations.models.ReservationUtilizationAggregates] + """ + + _validation = { + "trend": {"readonly": True}, + } + + _attribute_map = { + "trend": {"key": "trend", "type": "str"}, + "aggregates": {"key": "aggregates", "type": "[ReservationUtilizationAggregates]"}, + } + + def __init__(self, *, aggregates: Optional[List["_models.ReservationUtilizationAggregates"]] = None, **kwargs): + """ + :keyword aggregates: The array of aggregates of a reservation's utilization. + :paramtype aggregates: list[~azure.mgmt.reservations.models.ReservationUtilizationAggregates] + """ + super().__init__(**kwargs) + self.trend = None + self.aggregates = aggregates + + +class ReservationSummary(_serialization.Model): + """The roll up count summary of reservations in each state. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar succeeded_count: The number of reservation in Succeeded state. + :vartype succeeded_count: float + :ivar failed_count: The number of reservation in Failed state. + :vartype failed_count: float + :ivar expiring_count: The number of reservation in Expiring state. + :vartype expiring_count: float + :ivar expired_count: The number of reservation in Expired state. + :vartype expired_count: float + :ivar pending_count: The number of reservation in Pending state. + :vartype pending_count: float + :ivar cancelled_count: The number of reservation in Cancelled state. + :vartype cancelled_count: float + :ivar processing_count: The number of reservation in Processing state. + :vartype processing_count: float + """ + + _validation = { + "succeeded_count": {"readonly": True}, + "failed_count": {"readonly": True}, + "expiring_count": {"readonly": True}, + "expired_count": {"readonly": True}, + "pending_count": {"readonly": True}, + "cancelled_count": {"readonly": True}, + "processing_count": {"readonly": True}, + } + + _attribute_map = { + "succeeded_count": {"key": "succeededCount", "type": "float"}, + "failed_count": {"key": "failedCount", "type": "float"}, + "expiring_count": {"key": "expiringCount", "type": "float"}, + "expired_count": {"key": "expiredCount", "type": "float"}, + "pending_count": {"key": "pendingCount", "type": "float"}, + "cancelled_count": {"key": "cancelledCount", "type": "float"}, + "processing_count": {"key": "processingCount", "type": "float"}, + } + + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.succeeded_count = None + self.failed_count = None + self.expiring_count = None + self.expired_count = None + self.pending_count = None + self.cancelled_count = None + self.processing_count = None + + +class ReservationToExchange(_serialization.Model): + """Reservation refund details. + + :ivar reservation_id: Fully qualified id of the Reservation being returned. + :vartype reservation_id: str + :ivar quantity: Quantity to be returned. + :vartype quantity: int + :ivar billing_refund_amount: + :vartype billing_refund_amount: ~azure.mgmt.reservations.models.Price + :ivar billing_information: billing information. + :vartype billing_information: ~azure.mgmt.reservations.models.BillingInformation + """ + + _attribute_map = { + "reservation_id": {"key": "reservationId", "type": "str"}, + "quantity": {"key": "quantity", "type": "int"}, + "billing_refund_amount": {"key": "billingRefundAmount", "type": "Price"}, + "billing_information": {"key": "billingInformation", "type": "BillingInformation"}, + } + + def __init__( + self, + *, + reservation_id: Optional[str] = None, + quantity: Optional[int] = None, + billing_refund_amount: Optional["_models.Price"] = None, + billing_information: Optional["_models.BillingInformation"] = None, + **kwargs + ): + """ + :keyword reservation_id: Fully qualified id of the Reservation being returned. + :paramtype reservation_id: str + :keyword quantity: Quantity to be returned. + :paramtype quantity: int + :keyword billing_refund_amount: + :paramtype billing_refund_amount: ~azure.mgmt.reservations.models.Price + :keyword billing_information: billing information. + :paramtype billing_information: ~azure.mgmt.reservations.models.BillingInformation + """ + super().__init__(**kwargs) + self.reservation_id = reservation_id + self.quantity = quantity + self.billing_refund_amount = billing_refund_amount + self.billing_information = billing_information + + +class ReservationToPurchaseCalculateExchange(_serialization.Model): + """Reservation purchase details. + + :ivar properties: + :vartype properties: ~azure.mgmt.reservations.models.PurchaseRequest + :ivar billing_currency_total: + :vartype billing_currency_total: ~azure.mgmt.reservations.models.Price + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "PurchaseRequest"}, + "billing_currency_total": {"key": "billingCurrencyTotal", "type": "Price"}, + } + + def __init__( + self, + *, + properties: Optional["_models.PurchaseRequest"] = None, + billing_currency_total: Optional["_models.Price"] = None, + **kwargs + ): + """ + :keyword properties: + :paramtype properties: ~azure.mgmt.reservations.models.PurchaseRequest + :keyword billing_currency_total: + :paramtype billing_currency_total: ~azure.mgmt.reservations.models.Price + """ + super().__init__(**kwargs) + self.properties = properties + self.billing_currency_total = billing_currency_total + + +class ReservationToPurchaseExchange(_serialization.Model): + """Reservation purchase details. + + :ivar reservation_order_id: Fully qualified id of the ReservationOrder being purchased. + :vartype reservation_order_id: str + :ivar reservation_id: Fully qualified id of the Reservation being purchased. This value is only + guaranteed to be non-null if the purchase is successful. + :vartype reservation_id: str + :ivar properties: + :vartype properties: ~azure.mgmt.reservations.models.PurchaseRequest + :ivar billing_currency_total: + :vartype billing_currency_total: ~azure.mgmt.reservations.models.Price + :ivar status: Status of the individual operation. Known values are: "Succeeded", "Failed", + "Cancelled", and "Pending". + :vartype status: str or ~azure.mgmt.reservations.models.OperationStatus + """ + + _attribute_map = { + "reservation_order_id": {"key": "reservationOrderId", "type": "str"}, + "reservation_id": {"key": "reservationId", "type": "str"}, + "properties": {"key": "properties", "type": "PurchaseRequest"}, + "billing_currency_total": {"key": "billingCurrencyTotal", "type": "Price"}, + "status": {"key": "status", "type": "str"}, + } + + def __init__( + self, + *, + reservation_order_id: Optional[str] = None, + reservation_id: Optional[str] = None, + properties: Optional["_models.PurchaseRequest"] = None, + billing_currency_total: Optional["_models.Price"] = None, + status: Optional[Union[str, "_models.OperationStatus"]] = None, + **kwargs + ): + """ + :keyword reservation_order_id: Fully qualified id of the ReservationOrder being purchased. + :paramtype reservation_order_id: str + :keyword reservation_id: Fully qualified id of the Reservation being purchased. This value is + only guaranteed to be non-null if the purchase is successful. + :paramtype reservation_id: str + :keyword properties: + :paramtype properties: ~azure.mgmt.reservations.models.PurchaseRequest + :keyword billing_currency_total: + :paramtype billing_currency_total: ~azure.mgmt.reservations.models.Price + :keyword status: Status of the individual operation. Known values are: "Succeeded", "Failed", + "Cancelled", and "Pending". + :paramtype status: str or ~azure.mgmt.reservations.models.OperationStatus + """ + super().__init__(**kwargs) + self.reservation_order_id = reservation_order_id + self.reservation_id = reservation_id + self.properties = properties + self.billing_currency_total = billing_currency_total + self.status = status + + +class ReservationToReturn(_serialization.Model): + """Reservation to return. + + :ivar reservation_id: Fully qualified identifier of the Reservation being returned. + :vartype reservation_id: str + :ivar quantity: Quantity to be returned. Must be greater than zero. + :vartype quantity: int + """ + + _attribute_map = { + "reservation_id": {"key": "reservationId", "type": "str"}, + "quantity": {"key": "quantity", "type": "int"}, + } + + def __init__(self, *, reservation_id: Optional[str] = None, quantity: Optional[int] = None, **kwargs): + """ + :keyword reservation_id: Fully qualified identifier of the Reservation being returned. + :paramtype reservation_id: str + :keyword quantity: Quantity to be returned. Must be greater than zero. + :paramtype quantity: int + """ + super().__init__(**kwargs) + self.reservation_id = reservation_id + self.quantity = quantity + + +class ReservationToReturnForExchange(_serialization.Model): + """Reservation refund details. + + :ivar reservation_id: Fully qualified id of the Reservation being returned. + :vartype reservation_id: str + :ivar quantity: Quantity to be returned. + :vartype quantity: int + :ivar billing_refund_amount: + :vartype billing_refund_amount: ~azure.mgmt.reservations.models.Price + :ivar billing_information: billing information. + :vartype billing_information: ~azure.mgmt.reservations.models.BillingInformation + :ivar status: Status of the individual operation. Known values are: "Succeeded", "Failed", + "Cancelled", and "Pending". + :vartype status: str or ~azure.mgmt.reservations.models.OperationStatus + """ + + _attribute_map = { + "reservation_id": {"key": "reservationId", "type": "str"}, + "quantity": {"key": "quantity", "type": "int"}, + "billing_refund_amount": {"key": "billingRefundAmount", "type": "Price"}, + "billing_information": {"key": "billingInformation", "type": "BillingInformation"}, + "status": {"key": "status", "type": "str"}, + } + + def __init__( + self, + *, + reservation_id: Optional[str] = None, + quantity: Optional[int] = None, + billing_refund_amount: Optional["_models.Price"] = None, + billing_information: Optional["_models.BillingInformation"] = None, + status: Optional[Union[str, "_models.OperationStatus"]] = None, + **kwargs + ): + """ + :keyword reservation_id: Fully qualified id of the Reservation being returned. + :paramtype reservation_id: str + :keyword quantity: Quantity to be returned. + :paramtype quantity: int + :keyword billing_refund_amount: + :paramtype billing_refund_amount: ~azure.mgmt.reservations.models.Price + :keyword billing_information: billing information. + :paramtype billing_information: ~azure.mgmt.reservations.models.BillingInformation + :keyword status: Status of the individual operation. Known values are: "Succeeded", "Failed", + "Cancelled", and "Pending". + :paramtype status: str or ~azure.mgmt.reservations.models.OperationStatus + """ + super().__init__(**kwargs) + self.reservation_id = reservation_id + self.quantity = quantity + self.billing_refund_amount = billing_refund_amount + self.billing_information = billing_information + self.status = status + + +class ReservationUtilizationAggregates(_serialization.Model): + """The aggregate values of reservation utilization. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar grain: The grain of the aggregate. + :vartype grain: float + :ivar grain_unit: The grain unit of the aggregate. + :vartype grain_unit: str + :ivar value: The aggregate value. + :vartype value: float + :ivar value_unit: The aggregate value unit. + :vartype value_unit: str + """ + + _validation = { + "grain": {"readonly": True}, + "grain_unit": {"readonly": True}, + "value": {"readonly": True}, + "value_unit": {"readonly": True}, + } + + _attribute_map = { + "grain": {"key": "grain", "type": "float"}, + "grain_unit": {"key": "grainUnit", "type": "str"}, + "value": {"key": "value", "type": "float"}, + "value_unit": {"key": "valueUnit", "type": "str"}, + } + + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.grain = None + self.grain_unit = None + self.value = None + self.value_unit = None + + +class ResourceName(_serialization.Model): + """Resource name provided by the resource provider. Use this property for quotaRequest parameter. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: Resource name. + :vartype value: str + :ivar localized_value: Resource display localized name. + :vartype localized_value: str + """ + + _validation = { + "localized_value": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "str"}, + "localized_value": {"key": "localizedValue", "type": "str"}, + } + + def __init__(self, *, value: Optional[str] = None, **kwargs): + """ + :keyword value: Resource name. + :paramtype value: str + """ + super().__init__(**kwargs) + self.value = value + self.localized_value = None + + +class ScopeProperties(_serialization.Model): + """ScopeProperties. + + :ivar scope: + :vartype scope: str + :ivar valid: + :vartype valid: bool + """ + + _attribute_map = { + "scope": {"key": "scope", "type": "str"}, + "valid": {"key": "valid", "type": "bool"}, + } + + def __init__(self, *, scope: Optional[str] = None, valid: Optional[bool] = None, **kwargs): + """ + :keyword scope: + :paramtype scope: str + :keyword valid: + :paramtype valid: bool + """ + super().__init__(**kwargs) + self.scope = scope + self.valid = valid + + +class ServiceError(_serialization.Model): + """The API error details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message text. + :vartype message: str + :ivar details: The list of error details. + :vartype details: list[~azure.mgmt.reservations.models.ServiceErrorDetail] + """ + + _validation = { + "details": {"readonly": True}, + } + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "details": {"key": "details", "type": "[ServiceErrorDetail]"}, + } + + def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs): + """ + :keyword code: The error code. + :paramtype code: str + :keyword message: The error message text. + :paramtype message: str + """ + super().__init__(**kwargs) + self.code = code + self.message = message + self.details = None + + +class ServiceErrorDetail(_serialization.Model): + """The error details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + "code": {"readonly": True}, + "message": {"readonly": True}, + } + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + } + + def __init__(self, **kwargs): + """ """ + super().__init__(**kwargs) + self.code = None + self.message = None + + +class SkuCapability(_serialization.Model): + """SkuCapability. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, + } + + def __init__(self, *, name: Optional[str] = None, value: Optional[str] = None, **kwargs): + """ + :keyword name: An invariant to describe the feature. + :paramtype name: str + :keyword value: An invariant if the feature is measured by quantity. + :paramtype value: str + """ + super().__init__(**kwargs) + self.name = name + self.value = value + + +class SkuName(_serialization.Model): + """SkuName. + + :ivar name: + :vartype name: str + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + } + + def __init__(self, *, name: Optional[str] = None, **kwargs): + """ + :keyword name: + :paramtype name: str + """ + super().__init__(**kwargs) + self.name = name + + +class SkuProperty(_serialization.Model): + """SkuProperty. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, + } + + def __init__(self, *, name: Optional[str] = None, value: Optional[str] = None, **kwargs): + """ + :keyword name: An invariant to describe the feature. + :paramtype name: str + :keyword value: An invariant if the feature is measured by quantity. + :paramtype value: str + """ + super().__init__(**kwargs) + self.name = name + self.value = value + + +class SkuRestriction(_serialization.Model): + """SkuRestriction. + + :ivar type: The type of restrictions. + :vartype type: str + :ivar values: The value of restrictions. If the restriction type is set to location. This would + be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar reason_code: The reason for restriction. + :vartype reason_code: str + """ + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "values": {"key": "values", "type": "[str]"}, + "reason_code": {"key": "reasonCode", "type": "str"}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + values: Optional[List[str]] = None, + reason_code: Optional[str] = None, + **kwargs + ): + """ + :keyword type: The type of restrictions. + :paramtype type: str + :keyword values: The value of restrictions. If the restriction type is set to location. This + would be different locations where the SKU is restricted. + :paramtype values: list[str] + :keyword reason_code: The reason for restriction. + :paramtype reason_code: str + """ + super().__init__(**kwargs) + self.type = type + self.values = values + self.reason_code = reason_code + + +class SplitRequest(_serialization.Model): + """SplitRequest. + + :ivar quantities: List of the quantities in the new reservations to create. + :vartype quantities: list[int] + :ivar reservation_id: Resource id of the reservation to be split. Format of the resource id + should be + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :vartype reservation_id: str + """ + + _attribute_map = { + "quantities": {"key": "properties.quantities", "type": "[int]"}, + "reservation_id": {"key": "properties.reservationId", "type": "str"}, + } + + def __init__(self, *, quantities: Optional[List[int]] = None, reservation_id: Optional[str] = None, **kwargs): + """ + :keyword quantities: List of the quantities in the new reservations to create. + :paramtype quantities: list[int] + :keyword reservation_id: Resource id of the reservation to be split. Format of the resource id + should be + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :paramtype reservation_id: str + """ + super().__init__(**kwargs) + self.quantities = quantities + self.reservation_id = reservation_id + + +class SubRequest(_serialization.Model): + """The sub-request submitted with the quota request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar limit: Quota (resource limit). + :vartype limit: int + :ivar name: The resource name. + :vartype name: ~azure.mgmt.reservations.models.ResourceName + :ivar resource_type: Resource type for which the quota check was made. + :vartype resource_type: str + :ivar unit: The limit units, such as **count** and **bytes**. Use the unit field provided in + the response of the GET quota operation. + :vartype unit: str + :ivar provisioning_state: The quota request status. Known values are: "Accepted", "Invalid", + "Succeeded", "Failed", and "InProgress". + :vartype provisioning_state: str or ~azure.mgmt.reservations.models.QuotaRequestState + :ivar message: User-friendly status message. + :vartype message: str + :ivar sub_request_id: Sub request ID for individual request. + :vartype sub_request_id: str + """ + + _validation = { + "limit": {"readonly": True}, + "resource_type": {"readonly": True}, + "message": {"readonly": True}, + "sub_request_id": {"readonly": True}, + } + + _attribute_map = { + "limit": {"key": "limit", "type": "int"}, + "name": {"key": "name", "type": "ResourceName"}, + "resource_type": {"key": "resourceType", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "sub_request_id": {"key": "subRequestId", "type": "str"}, + } + + def __init__( + self, + *, + name: Optional["_models.ResourceName"] = None, + unit: Optional[str] = None, + provisioning_state: Optional[Union[str, "_models.QuotaRequestState"]] = None, + **kwargs + ): + """ + :keyword name: The resource name. + :paramtype name: ~azure.mgmt.reservations.models.ResourceName + :keyword unit: The limit units, such as **count** and **bytes**. Use the unit field provided in + the response of the GET quota operation. + :paramtype unit: str + :keyword provisioning_state: The quota request status. Known values are: "Accepted", "Invalid", + "Succeeded", "Failed", and "InProgress". + :paramtype provisioning_state: str or ~azure.mgmt.reservations.models.QuotaRequestState + """ + super().__init__(**kwargs) + self.limit = None + self.name = name + self.resource_type = None + self.unit = unit + self.provisioning_state = provisioning_state + self.message = None + self.sub_request_id = None + + +class SubscriptionScopeProperties(_serialization.Model): + """SubscriptionScopeProperties. + + :ivar scopes: + :vartype scopes: list[~azure.mgmt.reservations.models.ScopeProperties] + """ + + _attribute_map = { + "scopes": {"key": "scopes", "type": "[ScopeProperties]"}, + } + + def __init__(self, *, scopes: Optional[List["_models.ScopeProperties"]] = None, **kwargs): + """ + :keyword scopes: + :paramtype scopes: list[~azure.mgmt.reservations.models.ScopeProperties] + """ + super().__init__(**kwargs) + self.scopes = scopes + + +class SystemData(_serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or ~azure.mgmt.reservations.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.reservations.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + "created_by": {"key": "createdBy", "type": "str"}, + "created_by_type": {"key": "createdByType", "type": "str"}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, + "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, + "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :paramtype created_by_type: str or ~azure.mgmt.reservations.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Known + values are: "User", "Application", "ManagedIdentity", and "Key". + :paramtype last_modified_by_type: str or ~azure.mgmt.reservations.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ + super().__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/models/_patch.py b/src/reservation/azext_reservation/vendored_sdks/reservations/models/_patch.py new file mode 100644 index 00000000000..f7dd3251033 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/models/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/operations/__init__.py b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/__init__.py new file mode 100644 index 00000000000..7ae269dcb4f --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/__init__.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._reservation_operations import ReservationOperations +from ._azure_reservation_api_operations import AzureReservationAPIOperationsMixin +from ._reservation_order_operations import ReservationOrderOperations +from ._operation_operations import OperationOperations +from ._calculate_refund_operations import CalculateRefundOperations +from ._return_operations_operations import ReturnOperations +from ._calculate_exchange_operations import CalculateExchangeOperations +from ._exchange_operations import ExchangeOperations +from ._quota_operations import QuotaOperations +from ._quota_request_status_operations import QuotaRequestStatusOperations + +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ReservationOperations", + "AzureReservationAPIOperationsMixin", + "ReservationOrderOperations", + "OperationOperations", + "CalculateRefundOperations", + "ReturnOperations", + "CalculateExchangeOperations", + "ExchangeOperations", + "QuotaOperations", + "QuotaRequestStatusOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_azure_reservation_api_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_azure_reservation_api_operations.py new file mode 100644 index 00000000000..d1984c2b847 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_azure_reservation_api_operations.py @@ -0,0 +1,248 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, List, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import MixinABC, _convert_request, _format_url_section + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_get_catalog_request( + subscription_id: str, + *, + reserved_resource_type: Optional[str] = None, + location: Optional[str] = None, + publisher_id: Optional[str] = None, + offer_id: Optional[str] = None, + plan_id: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/catalogs") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if reserved_resource_type is not None: + _params["reservedResourceType"] = _SERIALIZER.query("reserved_resource_type", reserved_resource_type, "str") + if location is not None: + _params["location"] = _SERIALIZER.query("location", location, "str") + if publisher_id is not None: + _params["publisherId"] = _SERIALIZER.query("publisher_id", publisher_id, "str") + if offer_id is not None: + _params["offerId"] = _SERIALIZER.query("offer_id", offer_id, "str") + if plan_id is not None: + _params["planId"] = _SERIALIZER.query("plan_id", plan_id, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_applied_reservation_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/appliedReservations" + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class AzureReservationAPIOperationsMixin(MixinABC): + @distributed_trace + def get_catalog( + self, + subscription_id: str, + reserved_resource_type: Optional[str] = None, + location: Optional[str] = None, + publisher_id: Optional[str] = None, + offer_id: Optional[str] = None, + plan_id: Optional[str] = None, + **kwargs: Any + ) -> List[_models.Catalog]: + """Get the regions and skus that are available for RI purchase for the specified Azure + subscription. + + Get the regions and skus that are available for RI purchase for the specified Azure + subscription. + + :param subscription_id: Id of the subscription. Required. + :type subscription_id: str + :param reserved_resource_type: The type of the resource for which the skus should be provided. + Default value is None. + :type reserved_resource_type: str + :param location: Filters the skus based on the location specified in this parameter. This can + be an azure region or global. Default value is None. + :type location: str + :param publisher_id: Publisher id used to get the third party products. Default value is None. + :type publisher_id: str + :param offer_id: Offer id used to get the third party products. Default value is None. + :type offer_id: str + :param plan_id: Plan id used to get the third party products. Default value is None. + :type plan_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of Catalog or the result of cls(response) + :rtype: list[~azure.mgmt.reservations.models.Catalog] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[List[_models.Catalog]] + + request = build_get_catalog_request( + subscription_id=subscription_id, + reserved_resource_type=reserved_resource_type, + location=location, + publisher_id=publisher_id, + offer_id=offer_id, + plan_id=plan_id, + api_version=api_version, + template_url=self.get_catalog.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("[Catalog]", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_catalog.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/catalogs"} # type: ignore + + @distributed_trace + def get_applied_reservation_list(self, subscription_id: str, **kwargs: Any) -> _models.AppliedReservations: + """Get list of applicable ``Reservation``\ s. + + Get applicable ``Reservation``\ s that are applied to this subscription or a resource group + under this subscription. + + :param subscription_id: Id of the subscription. Required. + :type subscription_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppliedReservations or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.AppliedReservations + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.AppliedReservations] + + request = build_get_applied_reservation_list_request( + subscription_id=subscription_id, + api_version=api_version, + template_url=self.get_applied_reservation_list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AppliedReservations", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_applied_reservation_list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/appliedReservations"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_calculate_exchange_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_calculate_exchange_operations.py new file mode 100644 index 00000000000..0633ff15c3c --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_calculate_exchange_operations.py @@ -0,0 +1,276 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import MixinABC, _convert_request + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_post_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Capacity/calculateExchange") + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class CalculateExchangeOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.AzureReservationAPI`'s + :attr:`calculate_exchange` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _post_initial( + self, body: Union[_models.CalculateExchangeRequest, IO], **kwargs: Any + ) -> Optional[_models.CalculateExchangeOperationResultResponse]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.CalculateExchangeOperationResultResponse]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "CalculateExchangeRequest") + + request = build_post_request( + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._post_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("CalculateExchangeOperationResultResponse", pipeline_response) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _post_initial.metadata = {"url": "/providers/Microsoft.Capacity/calculateExchange"} # type: ignore + + @overload + def begin_post( + self, body: _models.CalculateExchangeRequest, *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.CalculateExchangeOperationResultResponse]: + """Calculates the refund amounts and price of the new purchases. + + Calculates price for exchanging ``Reservations`` if there are no policy errors. + + :param body: Request containing purchases and refunds that need to be executed. Required. + :type body: ~azure.mgmt.reservations.models.CalculateExchangeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CalculateExchangeOperationResultResponse + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.CalculateExchangeOperationResultResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_post( + self, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.CalculateExchangeOperationResultResponse]: + """Calculates the refund amounts and price of the new purchases. + + Calculates price for exchanging ``Reservations`` if there are no policy errors. + + :param body: Request containing purchases and refunds that need to be executed. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CalculateExchangeOperationResultResponse + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.CalculateExchangeOperationResultResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_post( + self, body: Union[_models.CalculateExchangeRequest, IO], **kwargs: Any + ) -> LROPoller[_models.CalculateExchangeOperationResultResponse]: + """Calculates the refund amounts and price of the new purchases. + + Calculates price for exchanging ``Reservations`` if there are no policy errors. + + :param body: Request containing purchases and refunds that need to be executed. Is either a + model type or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.CalculateExchangeRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CalculateExchangeOperationResultResponse + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.CalculateExchangeOperationResultResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CalculateExchangeOperationResultResponse] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._post_initial( # type: ignore + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CalculateExchangeOperationResultResponse", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_post.metadata = {"url": "/providers/Microsoft.Capacity/calculateExchange"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_calculate_refund_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_calculate_refund_operations.py new file mode 100644 index 00000000000..6585e56e250 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_calculate_refund_operations.py @@ -0,0 +1,207 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import MixinABC, _convert_request, _format_url_section + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_post_request(reservation_order_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/calculateRefund" + ) + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class CalculateRefundOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.AzureReservationAPI`'s + :attr:`calculate_refund` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + def post( + self, + reservation_order_id: str, + body: _models.CalculateRefundRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CalculateRefundResponse: + """Calculate the refund amount of a reservation order. + + Calculate price for returning ``Reservations`` if there are no policy errors. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for calculating refund of a reservation. Required. + :type body: ~azure.mgmt.reservations.models.CalculateRefundRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CalculateRefundResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CalculateRefundResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def post( + self, reservation_order_id: str, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CalculateRefundResponse: + """Calculate the refund amount of a reservation order. + + Calculate price for returning ``Reservations`` if there are no policy errors. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for calculating refund of a reservation. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CalculateRefundResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CalculateRefundResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def post( + self, reservation_order_id: str, body: Union[_models.CalculateRefundRequest, IO], **kwargs: Any + ) -> _models.CalculateRefundResponse: + """Calculate the refund amount of a reservation order. + + Calculate price for returning ``Reservations`` if there are no policy errors. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for calculating refund of a reservation. Is either a model type + or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.CalculateRefundRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CalculateRefundResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CalculateRefundResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CalculateRefundResponse] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "CalculateRefundRequest") + + request = build_post_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.post.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CalculateRefundResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + post.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/calculateRefund"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_exchange_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_exchange_operations.py new file mode 100644 index 00000000000..fbb74173e8f --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_exchange_operations.py @@ -0,0 +1,276 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import MixinABC, _convert_request + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_post_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Capacity/exchange") + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class ExchangeOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.AzureReservationAPI`'s + :attr:`exchange` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _post_initial( + self, body: Union[_models.ExchangeRequest, IO], **kwargs: Any + ) -> Optional[_models.ExchangeOperationResultResponse]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ExchangeOperationResultResponse]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "ExchangeRequest") + + request = build_post_request( + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._post_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("ExchangeOperationResultResponse", pipeline_response) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _post_initial.metadata = {"url": "/providers/Microsoft.Capacity/exchange"} # type: ignore + + @overload + def begin_post( + self, body: _models.ExchangeRequest, *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.ExchangeOperationResultResponse]: + """Exchange Reservation(s). + + Returns one or more ``Reservations`` in exchange for one or more ``Reservation`` purchases. + + :param body: Request containing the refunds and purchases that need to be executed. Required. + :type body: ~azure.mgmt.reservations.models.ExchangeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExchangeOperationResultResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.ExchangeOperationResultResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_post( + self, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.ExchangeOperationResultResponse]: + """Exchange Reservation(s). + + Returns one or more ``Reservations`` in exchange for one or more ``Reservation`` purchases. + + :param body: Request containing the refunds and purchases that need to be executed. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExchangeOperationResultResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.ExchangeOperationResultResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_post( + self, body: Union[_models.ExchangeRequest, IO], **kwargs: Any + ) -> LROPoller[_models.ExchangeOperationResultResponse]: + """Exchange Reservation(s). + + Returns one or more ``Reservations`` in exchange for one or more ``Reservation`` purchases. + + :param body: Request containing the refunds and purchases that need to be executed. Is either a + model type or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.ExchangeRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExchangeOperationResultResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.ExchangeOperationResultResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ExchangeOperationResultResponse] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._post_initial( # type: ignore + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ExchangeOperationResultResponse", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_post.metadata = {"url": "/providers/Microsoft.Capacity/exchange"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_operation_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_operation_operations.py new file mode 100644 index 00000000000..fea7c9d1854 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_operation_operations.py @@ -0,0 +1,144 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import MixinABC, _convert_request + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Capacity/operations") + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class OperationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.AzureReservationAPI`'s + :attr:`operation` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> Iterable["_models.OperationResponse"]: + """Get operations. + + List all the operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationResponse or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.reservations.models.OperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.OperationList] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("OperationList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/providers/Microsoft.Capacity/operations"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_patch.py b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_patch.py new file mode 100644 index 00000000000..f7dd3251033 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_quota_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_quota_operations.py new file mode 100644 index 00000000000..b9b99c472f6 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_quota_operations.py @@ -0,0 +1,888 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import MixinABC, _convert_request, _format_url_section + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_get_request( + subscription_id: str, provider_id: str, location: str, resource_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerId": _SERIALIZER.url("provider_id", provider_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + subscription_id: str, provider_id: str, location: str, resource_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerId": _SERIALIZER.url("provider_id", provider_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_update_request( + subscription_id: str, provider_id: str, location: str, resource_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerId": _SERIALIZER.url("provider_id", provider_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_request(subscription_id: str, provider_id: str, location: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerId": _SERIALIZER.url("provider_id", provider_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class QuotaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.AzureReservationAPI`'s + :attr:`quota` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, subscription_id: str, provider_id: str, location: str, resource_name: str, **kwargs: Any + ) -> _models.CurrentQuotaLimitBase: + """Get the current quota (service limit) and usage of a resource. You can use the response from + the GET operation to submit quota update request. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CurrentQuotaLimitBase or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CurrentQuotaLimitBase + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.CurrentQuotaLimitBase] + + request = build_get_request( + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + resource_name=resource_name, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("CurrentQuotaLimitBase", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + get.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}"} # type: ignore + + def _create_or_update_initial( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: Union[_models.CurrentQuotaLimitBase, IO], + **kwargs: Any + ) -> Union[_models.CurrentQuotaLimitBase, _models.QuotaRequestSubmitResponse201]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop( + "cls", None + ) # type: ClsType[Union[_models.CurrentQuotaLimitBase, _models.QuotaRequestSubmitResponse201]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_quota_request, (IO, bytes)): + _content = create_quota_request + else: + _json = self._serialize.body(create_quota_request, "CurrentQuotaLimitBase") + + request = build_create_or_update_request( + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + resource_name=resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("CurrentQuotaLimitBase", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("QuotaRequestSubmitResponse201", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}"} # type: ignore + + @overload + def begin_create_or_update( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: _models.CurrentQuotaLimitBase, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Union[LROPoller[_models.CurrentQuotaLimitBase], LROPoller[_models.QuotaRequestSubmitResponse201]]: + """Create or update the quota (service limits) of a resource to the requested value. + Steps: + + + #. Make the Get request to get the quota information for specific resource. + #. To increase the quota, update the limit field in the response from Get request to new value. + #. Submit the JSON to the quota request API to update the quota. + The Create quota request may be constructed as follows. The PUT operation can be used to + update the quota. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :param create_quota_request: Quota requests payload. Required. + :type create_quota_request: ~azure.mgmt.reservations.models.CurrentQuotaLimitBase + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CurrentQuotaLimitBase or An instance of + LROPoller that returns either QuotaRequestSubmitResponse201 or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] or + ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.QuotaRequestSubmitResponse201] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Union[LROPoller[_models.CurrentQuotaLimitBase], LROPoller[_models.QuotaRequestSubmitResponse201]]: + """Create or update the quota (service limits) of a resource to the requested value. + Steps: + + + #. Make the Get request to get the quota information for specific resource. + #. To increase the quota, update the limit field in the response from Get request to new value. + #. Submit the JSON to the quota request API to update the quota. + The Create quota request may be constructed as follows. The PUT operation can be used to + update the quota. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :param create_quota_request: Quota requests payload. Required. + :type create_quota_request: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CurrentQuotaLimitBase or An instance of + LROPoller that returns either QuotaRequestSubmitResponse201 or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] or + ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.QuotaRequestSubmitResponse201] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: Union[_models.CurrentQuotaLimitBase, IO], + **kwargs: Any + ) -> Union[LROPoller[_models.CurrentQuotaLimitBase], LROPoller[_models.QuotaRequestSubmitResponse201]]: + """Create or update the quota (service limits) of a resource to the requested value. + Steps: + + + #. Make the Get request to get the quota information for specific resource. + #. To increase the quota, update the limit field in the response from Get request to new value. + #. Submit the JSON to the quota request API to update the quota. + The Create quota request may be constructed as follows. The PUT operation can be used to + update the quota. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :param create_quota_request: Quota requests payload. Is either a model type or a IO type. + Required. + :type create_quota_request: ~azure.mgmt.reservations.models.CurrentQuotaLimitBase or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CurrentQuotaLimitBase or An instance of + LROPoller that returns either QuotaRequestSubmitResponse201 or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] or + ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.QuotaRequestSubmitResponse201] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CurrentQuotaLimitBase] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( # type: ignore + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + resource_name=resource_name, + create_quota_request=create_quota_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CurrentQuotaLimitBase", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "original-uri"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}"} # type: ignore + + def _update_initial( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: Union[_models.CurrentQuotaLimitBase, IO], + **kwargs: Any + ) -> Union[_models.CurrentQuotaLimitBase, _models.QuotaRequestSubmitResponse201]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop( + "cls", None + ) # type: ClsType[Union[_models.CurrentQuotaLimitBase, _models.QuotaRequestSubmitResponse201]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(create_quota_request, (IO, bytes)): + _content = create_quota_request + else: + _json = self._serialize.body(create_quota_request, "CurrentQuotaLimitBase") + + request = build_update_request( + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + resource_name=resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("CurrentQuotaLimitBase", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("QuotaRequestSubmitResponse201", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}"} # type: ignore + + @overload + def begin_update( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: _models.CurrentQuotaLimitBase, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Union[LROPoller[_models.CurrentQuotaLimitBase], LROPoller[_models.QuotaRequestSubmitResponse201]]: + """Update the quota (service limits) of this resource to the requested value. + • To get the quota information for specific resource, send a GET request. + • To increase the quota, update the limit field from the GET response to a new value. + • To update the quota value, submit the JSON response to the quota request API to update the + quota. + • To update the quota. use the PATCH operation. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :param create_quota_request: Payload for the quota request. Required. + :type create_quota_request: ~azure.mgmt.reservations.models.CurrentQuotaLimitBase + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CurrentQuotaLimitBase or An instance of + LROPoller that returns either QuotaRequestSubmitResponse201 or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] or + ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.QuotaRequestSubmitResponse201] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Union[LROPoller[_models.CurrentQuotaLimitBase], LROPoller[_models.QuotaRequestSubmitResponse201]]: + """Update the quota (service limits) of this resource to the requested value. + • To get the quota information for specific resource, send a GET request. + • To increase the quota, update the limit field from the GET response to a new value. + • To update the quota value, submit the JSON response to the quota request API to update the + quota. + • To update the quota. use the PATCH operation. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :param create_quota_request: Payload for the quota request. Required. + :type create_quota_request: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CurrentQuotaLimitBase or An instance of + LROPoller that returns either QuotaRequestSubmitResponse201 or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] or + ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.QuotaRequestSubmitResponse201] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + subscription_id: str, + provider_id: str, + location: str, + resource_name: str, + create_quota_request: Union[_models.CurrentQuotaLimitBase, IO], + **kwargs: Any + ) -> Union[LROPoller[_models.CurrentQuotaLimitBase], LROPoller[_models.QuotaRequestSubmitResponse201]]: + """Update the quota (service limits) of this resource to the requested value. + • To get the quota information for specific resource, send a GET request. + • To increase the quota, update the limit field from the GET response to a new value. + • To update the quota value, submit the JSON response to the quota request API to update the + quota. + • To update the quota. use the PATCH operation. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param resource_name: The resource name for a resource provider, such as SKU name for + Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices. + Required. + :type resource_name: str + :param create_quota_request: Payload for the quota request. Is either a model type or a IO + type. Required. + :type create_quota_request: ~azure.mgmt.reservations.models.CurrentQuotaLimitBase or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CurrentQuotaLimitBase or An instance of + LROPoller that returns either QuotaRequestSubmitResponse201 or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] or + ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.QuotaRequestSubmitResponse201] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CurrentQuotaLimitBase] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( # type: ignore + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + resource_name=resource_name, + create_quota_request=create_quota_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CurrentQuotaLimitBase", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "original-uri"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}"} # type: ignore + + @distributed_trace + def list( + self, subscription_id: str, provider_id: str, location: str, **kwargs: Any + ) -> Iterable["_models.CurrentQuotaLimitBase"]: + """Gets a list of current quotas (service limits) and usage for all resources. The response from + the list quota operation can be leveraged to request quota updates. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CurrentQuotaLimitBase or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.reservations.models.CurrentQuotaLimitBase] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.QuotaLimits] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("QuotaLimits", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_quota_request_status_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_quota_request_status_operations.py new file mode 100644 index 00000000000..bea0ba0c5f0 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_quota_request_status_operations.py @@ -0,0 +1,303 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import MixinABC, _convert_request, _format_url_section + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_get_request(subscription_id: str, provider_id: str, location: str, id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests/{id}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerId": _SERIALIZER.url("provider_id", provider_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "id": _SERIALIZER.url("id", id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_request( + subscription_id: str, + provider_id: str, + location: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skiptoken: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerId": _SERIALIZER.url("provider_id", provider_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) + if skiptoken is not None: + _params["$skiptoken"] = _SERIALIZER.query("skiptoken", skiptoken, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class QuotaRequestStatusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.AzureReservationAPI`'s + :attr:`quota_request_status` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, subscription_id: str, provider_id: str, location: str, id: str, **kwargs: Any + ) -> _models.QuotaRequestDetails: + """For the specified Azure region (location), get the details and status of the quota request by + the quota request ID for the resources of the resource provider. The PUT request for the quota + (service limit) returns a response with the requestId parameter. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param id: Quota Request ID. Required. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: QuotaRequestDetails or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.QuotaRequestDetails + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.QuotaRequestDetails] + + request = build_get_request( + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + id=id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("QuotaRequestDetails", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests/{id}"} # type: ignore + + @distributed_trace + def list( + self, + subscription_id: str, + provider_id: str, + location: str, + filter: Optional[str] = None, + top: Optional[int] = None, + skiptoken: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.QuotaRequestDetails"]: + """For the specified Azure region (location), subscription, and resource provider, get the history + of the quota requests for the past year. To select specific quota requests, use the oData + filter. + + :param subscription_id: Azure subscription ID. Required. + :type subscription_id: str + :param provider_id: Azure resource provider ID. Required. + :type provider_id: str + :param location: Azure region. Required. + :type location: str + :param filter: .. list-table:: + :header-rows: 1 + + * - Field + - Supported operators + * - requestSubmitTime + - ge, le, eq, gt, lt. Default value is None. + :type filter: str + :param top: Number of records to return. Default value is None. + :type top: int + :param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element includes a + skiptoken parameter that specifies a starting point to use for subsequent calls. Default value + is None. + :type skiptoken: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either QuotaRequestDetails or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.reservations.models.QuotaRequestDetails] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-10-25")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.QuotaRequestDetailsList] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=subscription_id, + provider_id=provider_id, + location=location, + filter=filter, + top=top, + skiptoken=skiptoken, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("QuotaRequestDetailsList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_reservation_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_reservation_operations.py new file mode 100644 index 00000000000..a4a06feff7a --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_reservation_operations.py @@ -0,0 +1,1630 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import MixinABC, _convert_request, _format_url_section + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_available_scopes_request(reservation_order_id: str, reservation_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes", + ) # pylint: disable=line-too-long + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + "reservationId": _SERIALIZER.url("reservation_id", reservation_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_split_request(reservation_order_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split") + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_merge_request(reservation_order_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge") + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_request(reservation_order_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations" + ) + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + reservation_id: str, reservation_order_id: str, *, expand: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "reservationId": _SERIALIZER.url("reservation_id", reservation_id, "str"), + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if expand is not None: + _params["expand"] = _SERIALIZER.query("expand", expand, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_update_request(reservation_order_id: str, reservation_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + "reservationId": _SERIALIZER.url("reservation_id", reservation_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_archive_request(reservation_order_id: str, reservation_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/archive", + ) # pylint: disable=line-too-long + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + "reservationId": _SERIALIZER.url("reservation_id", reservation_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_unarchive_request(reservation_order_id: str, reservation_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive", + ) # pylint: disable=line-too-long + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + "reservationId": _SERIALIZER.url("reservation_id", reservation_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_revisions_request(reservation_id: str, reservation_order_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/revisions", + ) # pylint: disable=line-too-long + path_format_arguments = { + "reservationId": _SERIALIZER.url("reservation_id", reservation_id, "str"), + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_all_request( + *, + filter: Optional[str] = None, + orderby: Optional[str] = None, + refresh_summary: Optional[str] = None, + skiptoken: Optional[float] = None, + selected_state: Optional[str] = None, + take: Optional[float] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Capacity/reservations") + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if orderby is not None: + _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") + if refresh_summary is not None: + _params["refreshSummary"] = _SERIALIZER.query("refresh_summary", refresh_summary, "str") + if skiptoken is not None: + _params["$skiptoken"] = _SERIALIZER.query("skiptoken", skiptoken, "float") + if selected_state is not None: + _params["selectedState"] = _SERIALIZER.query("selected_state", selected_state, "str") + if take is not None: + _params["take"] = _SERIALIZER.query("take", take, "float") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class ReservationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.AzureReservationAPI`'s + :attr:`reservation` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _available_scopes_initial( + self, + reservation_order_id: str, + reservation_id: str, + body: Union[_models.AvailableScopeRequest, IO], + **kwargs: Any + ) -> _models.AvailableScopeProperties: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AvailableScopeProperties] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "AvailableScopeRequest") + + request = build_available_scopes_request( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._available_scopes_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("AvailableScopeProperties", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _available_scopes_initial.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes"} # type: ignore + + @overload + def begin_available_scopes( + self, + reservation_order_id: str, + reservation_id: str, + body: _models.AvailableScopeRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AvailableScopeProperties]: + """Get Available Scopes for ``Reservation``. + + Get Available Scopes for ``Reservation``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param body: Required. + :type body: ~azure.mgmt.reservations.models.AvailableScopeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AvailableScopeProperties or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.AvailableScopeProperties] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_available_scopes( + self, + reservation_order_id: str, + reservation_id: str, + body: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AvailableScopeProperties]: + """Get Available Scopes for ``Reservation``. + + Get Available Scopes for ``Reservation``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param body: Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AvailableScopeProperties or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.AvailableScopeProperties] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_available_scopes( + self, + reservation_order_id: str, + reservation_id: str, + body: Union[_models.AvailableScopeRequest, IO], + **kwargs: Any + ) -> LROPoller[_models.AvailableScopeProperties]: + """Get Available Scopes for ``Reservation``. + + Get Available Scopes for ``Reservation``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param body: Is either a model type or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.AvailableScopeRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AvailableScopeProperties or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.AvailableScopeProperties] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AvailableScopeProperties] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._available_scopes_initial( # type: ignore + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("AvailableScopeProperties", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_available_scopes.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes"} # type: ignore + + def _split_initial( + self, reservation_order_id: str, body: Union[_models.SplitRequest, IO], **kwargs: Any + ) -> Optional[List[_models.ReservationResponse]]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[List[_models.ReservationResponse]]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "SplitRequest") + + request = build_split_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._split_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("[ReservationResponse]", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _split_initial.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split"} # type: ignore + + @overload + def begin_split( + self, + reservation_order_id: str, + body: _models.SplitRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[List[_models.ReservationResponse]]: + """Split the ``Reservation``. + + Split a ``Reservation`` into two ``Reservation``\ s with specified quantity distribution. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed to Split a reservation item. Required. + :type body: ~azure.mgmt.reservations.models.SplitRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either list of ReservationResponse or the result + of cls(response) + :rtype: + ~azure.core.polling.LROPoller[list[~azure.mgmt.reservations.models.ReservationResponse]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_split( + self, reservation_order_id: str, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[List[_models.ReservationResponse]]: + """Split the ``Reservation``. + + Split a ``Reservation`` into two ``Reservation``\ s with specified quantity distribution. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed to Split a reservation item. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either list of ReservationResponse or the result + of cls(response) + :rtype: + ~azure.core.polling.LROPoller[list[~azure.mgmt.reservations.models.ReservationResponse]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_split( + self, reservation_order_id: str, body: Union[_models.SplitRequest, IO], **kwargs: Any + ) -> LROPoller[List[_models.ReservationResponse]]: + """Split the ``Reservation``. + + Split a ``Reservation`` into two ``Reservation``\ s with specified quantity distribution. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed to Split a reservation item. Is either a model type or a IO + type. Required. + :type body: ~azure.mgmt.reservations.models.SplitRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either list of ReservationResponse or the result + of cls(response) + :rtype: + ~azure.core.polling.LROPoller[list[~azure.mgmt.reservations.models.ReservationResponse]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[List[_models.ReservationResponse]] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._split_initial( # type: ignore + reservation_order_id=reservation_order_id, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("[ReservationResponse]", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_split.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split"} # type: ignore + + def _merge_initial( + self, reservation_order_id: str, body: Union[_models.MergeRequest, IO], **kwargs: Any + ) -> Optional[List[_models.ReservationResponse]]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[List[_models.ReservationResponse]]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "MergeRequest") + + request = build_merge_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._merge_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("[ReservationResponse]", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _merge_initial.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge"} # type: ignore + + @overload + def begin_merge( + self, + reservation_order_id: str, + body: _models.MergeRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[List[_models.ReservationResponse]]: + """Merges two ``Reservation``\ s. + + Merge the specified ``Reservation``\ s into a new ``Reservation``. The two ``Reservation``\ s + being merged must have same properties. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for commercial request for a reservation. Required. + :type body: ~azure.mgmt.reservations.models.MergeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either list of ReservationResponse or the result + of cls(response) + :rtype: + ~azure.core.polling.LROPoller[list[~azure.mgmt.reservations.models.ReservationResponse]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_merge( + self, reservation_order_id: str, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[List[_models.ReservationResponse]]: + """Merges two ``Reservation``\ s. + + Merge the specified ``Reservation``\ s into a new ``Reservation``. The two ``Reservation``\ s + being merged must have same properties. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for commercial request for a reservation. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either list of ReservationResponse or the result + of cls(response) + :rtype: + ~azure.core.polling.LROPoller[list[~azure.mgmt.reservations.models.ReservationResponse]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_merge( + self, reservation_order_id: str, body: Union[_models.MergeRequest, IO], **kwargs: Any + ) -> LROPoller[List[_models.ReservationResponse]]: + """Merges two ``Reservation``\ s. + + Merge the specified ``Reservation``\ s into a new ``Reservation``. The two ``Reservation``\ s + being merged must have same properties. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for commercial request for a reservation. Is either a model + type or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.MergeRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either list of ReservationResponse or the result + of cls(response) + :rtype: + ~azure.core.polling.LROPoller[list[~azure.mgmt.reservations.models.ReservationResponse]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[List[_models.ReservationResponse]] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._merge_initial( # type: ignore + reservation_order_id=reservation_order_id, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("[ReservationResponse]", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_merge.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge"} # type: ignore + + @distributed_trace + def list(self, reservation_order_id: str, **kwargs: Any) -> Iterable["_models.ReservationResponse"]: + """Get ``Reservation``\ s in a given reservation Order. + + List ``Reservation``\ s within a single ``ReservationOrder``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ReservationResponse or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.reservations.models.ReservationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationList] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ReservationList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations"} # type: ignore + + @distributed_trace + def get( + self, reservation_id: str, reservation_order_id: str, expand: Optional[str] = None, **kwargs: Any + ) -> _models.ReservationResponse: + """Get ``Reservation`` details. + + Get specific ``Reservation`` details. + + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param expand: Supported value of this query is renewProperties. Default value is None. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ReservationResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.ReservationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationResponse] + + request = build_get_request( + reservation_id=reservation_id, + reservation_order_id=reservation_order_id, + expand=expand, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ReservationResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}"} # type: ignore + + def _update_initial( + self, reservation_order_id: str, reservation_id: str, parameters: Union[_models.Patch, IO], **kwargs: Any + ) -> Optional[_models.ReservationResponse]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ReservationResponse]] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IO, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "Patch") + + request = build_update_request( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize("ReservationResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}"} # type: ignore + + @overload + def begin_update( + self, + reservation_order_id: str, + reservation_id: str, + parameters: _models.Patch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ReservationResponse]: + """Updates a ``Reservation``. + + Updates the applied scopes of the ``Reservation``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param parameters: Information needed to patch a reservation item. Required. + :type parameters: ~azure.mgmt.reservations.models.Patch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ReservationResponse or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.ReservationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + reservation_order_id: str, + reservation_id: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ReservationResponse]: + """Updates a ``Reservation``. + + Updates the applied scopes of the ``Reservation``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param parameters: Information needed to patch a reservation item. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ReservationResponse or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.ReservationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, reservation_order_id: str, reservation_id: str, parameters: Union[_models.Patch, IO], **kwargs: Any + ) -> LROPoller[_models.ReservationResponse]: + """Updates a ``Reservation``. + + Updates the applied scopes of the ``Reservation``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param parameters: Information needed to patch a reservation item. Is either a model type or a + IO type. Required. + :type parameters: ~azure.mgmt.reservations.models.Patch or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ReservationResponse or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.ReservationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationResponse] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( # type: ignore + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ReservationResponse", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}"} # type: ignore + + @distributed_trace + def archive( # pylint: disable=inconsistent-return-statements + self, reservation_order_id: str, reservation_id: str, **kwargs: Any + ) -> None: + """Archive a ``Reservation``. + + Archiving a ``Reservation`` moves it to ``Archived`` state. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_archive_request( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + api_version=api_version, + template_url=self.archive.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + archive.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/archive"} # type: ignore + + @distributed_trace + def unarchive( # pylint: disable=inconsistent-return-statements + self, reservation_order_id: str, reservation_id: str, **kwargs: Any + ) -> None: + """Unarchive a ``Reservation``. + + Unarchiving a ``Reservation`` moves it to the state it was before archiving. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_unarchive_request( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + api_version=api_version, + template_url=self.unarchive.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + unarchive.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive"} # type: ignore + + @distributed_trace + def list_revisions( + self, reservation_id: str, reservation_order_id: str, **kwargs: Any + ) -> Iterable["_models.ReservationResponse"]: + """Get ``Reservation`` revisions. + + List of all the revisions for the ``Reservation``. + + :param reservation_id: Id of the Reservation Item. Required. + :type reservation_id: str + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ReservationResponse or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.reservations.models.ReservationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationList] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_revisions_request( + reservation_id=reservation_id, + reservation_order_id=reservation_order_id, + api_version=api_version, + template_url=self.list_revisions.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ReservationList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_revisions.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/revisions"} # type: ignore + + @distributed_trace + def list_all( + self, + filter: Optional[str] = None, + orderby: Optional[str] = None, + refresh_summary: Optional[str] = None, + skiptoken: Optional[float] = None, + selected_state: Optional[str] = None, + take: Optional[float] = None, + **kwargs: Any + ) -> Iterable["_models.ReservationResponse"]: + """List the reservations and the roll up counts of reservations group by provisioning states that + the user has access to in the current tenant. + + :param filter: May be used to filter by reservation properties. The filter supports 'eq', 'or', + and 'and'. It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'. Reservation + properties include sku/name, properties/{appliedScopeType, archived, displayName, + displayProvisioningState, effectiveDateTime, expiryDate, provisioningState, quantity, renew, + reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState}. Default + value is None. + :type filter: str + :param orderby: May be used to sort order by reservation properties. Default value is None. + :type orderby: str + :param refresh_summary: To indicate whether to refresh the roll up counts of the reservations + group by provisioning states. Default value is None. + :type refresh_summary: str + :param skiptoken: The number of reservations to skip from the list before returning results. + Default value is None. + :type skiptoken: float + :param selected_state: The selected provisioning state. Default value is None. + :type selected_state: str + :param take: To number of reservations to return. Default value is None. + :type take: float + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ReservationResponse or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.reservations.models.ReservationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationsListResult] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_all_request( + filter=filter, + orderby=orderby, + refresh_summary=refresh_summary, + skiptoken=skiptoken, + selected_state=selected_state, + take=take, + api_version=api_version, + template_url=self.list_all.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ReservationsListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_all.metadata = {"url": "/providers/Microsoft.Capacity/reservations"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_reservation_order_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_reservation_order_operations.py new file mode 100644 index 00000000000..21b1a5f1655 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_reservation_order_operations.py @@ -0,0 +1,752 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import MixinABC, _convert_request, _format_url_section + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_calculate_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Capacity/calculatePrice") + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Capacity/reservationOrders") + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_purchase_request(reservation_order_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}") + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request(reservation_order_id: str, *, expand: Optional[str] = None, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}") + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if expand is not None: + _params["$expand"] = _SERIALIZER.query("expand", expand, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_change_directory_request(reservation_order_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/changeDirectory" + ) + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class ReservationOrderOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.AzureReservationAPI`'s + :attr:`reservation_order` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + def calculate( + self, body: _models.PurchaseRequest, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CalculatePriceResponse: + """Calculate price for a ``ReservationOrder``. + + Calculate price for placing a ``ReservationOrder``. + + :param body: Information needed for calculate or purchase reservation. Required. + :type body: ~azure.mgmt.reservations.models.PurchaseRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CalculatePriceResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CalculatePriceResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def calculate( + self, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CalculatePriceResponse: + """Calculate price for a ``ReservationOrder``. + + Calculate price for placing a ``ReservationOrder``. + + :param body: Information needed for calculate or purchase reservation. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CalculatePriceResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CalculatePriceResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def calculate(self, body: Union[_models.PurchaseRequest, IO], **kwargs: Any) -> _models.CalculatePriceResponse: + """Calculate price for a ``ReservationOrder``. + + Calculate price for placing a ``ReservationOrder``. + + :param body: Information needed for calculate or purchase reservation. Is either a model type + or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.PurchaseRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CalculatePriceResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.CalculatePriceResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CalculatePriceResponse] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "PurchaseRequest") + + request = build_calculate_request( + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.calculate.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CalculatePriceResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + calculate.metadata = {"url": "/providers/Microsoft.Capacity/calculatePrice"} # type: ignore + + @distributed_trace + def list(self, **kwargs: Any) -> Iterable["_models.ReservationOrderResponse"]: + """Get all ``ReservationOrder``\ s. + + List of all the ``ReservationOrder``\ s that the user has access to in the current tenant. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ReservationOrderResponse or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.reservations.models.ReservationOrderResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationOrderList] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ReservationOrderList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders"} # type: ignore + + def _purchase_initial( + self, reservation_order_id: str, body: Union[_models.PurchaseRequest, IO], **kwargs: Any + ) -> _models.ReservationOrderResponse: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationOrderResponse] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "PurchaseRequest") + + request = build_purchase_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._purchase_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("ReservationOrderResponse", pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize("ReservationOrderResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _purchase_initial.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}"} # type: ignore + + @overload + def begin_purchase( + self, + reservation_order_id: str, + body: _models.PurchaseRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ReservationOrderResponse]: + """Purchase ``ReservationOrder``. + + Purchase ``ReservationOrder`` and create resource under the specified URI. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for calculate or purchase reservation. Required. + :type body: ~azure.mgmt.reservations.models.PurchaseRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ReservationOrderResponse or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.ReservationOrderResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_purchase( + self, reservation_order_id: str, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.ReservationOrderResponse]: + """Purchase ``ReservationOrder``. + + Purchase ``ReservationOrder`` and create resource under the specified URI. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for calculate or purchase reservation. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ReservationOrderResponse or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.ReservationOrderResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_purchase( + self, reservation_order_id: str, body: Union[_models.PurchaseRequest, IO], **kwargs: Any + ) -> LROPoller[_models.ReservationOrderResponse]: + """Purchase ``ReservationOrder``. + + Purchase ``ReservationOrder`` and create resource under the specified URI. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for calculate or purchase reservation. Is either a model type + or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.PurchaseRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ReservationOrderResponse or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.reservations.models.ReservationOrderResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationOrderResponse] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] + if cont_token is None: + raw_result = self._purchase_initial( # type: ignore + reservation_order_id=reservation_order_id, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ReservationOrderResponse", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_purchase.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}"} # type: ignore + + @distributed_trace + def get( + self, reservation_order_id: str, expand: Optional[str] = None, **kwargs: Any + ) -> _models.ReservationOrderResponse: + """Get a specific ``ReservationOrder``. + + Get the details of the ``ReservationOrder``. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param expand: May be used to expand the planInformation. Default value is None. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ReservationOrderResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.ReservationOrderResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ReservationOrderResponse] + + request = build_get_request( + reservation_order_id=reservation_order_id, + expand=expand, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ReservationOrderResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}"} # type: ignore + + @overload + def change_directory( + self, + reservation_order_id: str, + body: _models.ChangeDirectoryRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ChangeDirectoryResponse: + """Change directory of ``ReservationOrder``. + + Change directory (tenant) of ``ReservationOrder`` and all ``Reservation`` under it to specified + tenant id. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed to change directory of reservation order. Required. + :type body: ~azure.mgmt.reservations.models.ChangeDirectoryRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ChangeDirectoryResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.ChangeDirectoryResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def change_directory( + self, reservation_order_id: str, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ChangeDirectoryResponse: + """Change directory of ``ReservationOrder``. + + Change directory (tenant) of ``ReservationOrder`` and all ``Reservation`` under it to specified + tenant id. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed to change directory of reservation order. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ChangeDirectoryResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.ChangeDirectoryResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def change_directory( + self, reservation_order_id: str, body: Union[_models.ChangeDirectoryRequest, IO], **kwargs: Any + ) -> _models.ChangeDirectoryResponse: + """Change directory of ``ReservationOrder``. + + Change directory (tenant) of ``ReservationOrder`` and all ``Reservation`` under it to specified + tenant id. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed to change directory of reservation order. Is either a model + type or a IO type. Required. + :type body: ~azure.mgmt.reservations.models.ChangeDirectoryRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ChangeDirectoryResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.ChangeDirectoryResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.ChangeDirectoryResponse] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "ChangeDirectoryRequest") + + request = build_change_directory_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.change_directory.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ChangeDirectoryResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + change_directory.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/changeDirectory"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_return_operations_operations.py b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_return_operations_operations.py new file mode 100644 index 00000000000..ac22a2f6b15 --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/operations/_return_operations_operations.py @@ -0,0 +1,208 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import MixinABC, _convert_request, _format_url_section + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_post_request(reservation_order_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/return") + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class ReturnOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.reservations.AzureReservationAPI`'s + :attr:`return_operations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + def post( + self, + reservation_order_id: str, + body: _models.RefundRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.RefundResponse: + """Return a reservation. + + Return a reservation. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for returning reservation. Required. + :type body: ~azure.mgmt.reservations.models.RefundRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RefundResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.RefundResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def post( + self, reservation_order_id: str, body: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.RefundResponse: + """Return a reservation. + + Return a reservation. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for returning reservation. Required. + :type body: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RefundResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.RefundResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def post( + self, reservation_order_id: str, body: Union[_models.RefundRequest, IO], **kwargs: Any + ) -> _models.RefundResponse: + """Return a reservation. + + Return a reservation. + + :param reservation_order_id: Order Id of the reservation. Required. + :type reservation_order_id: str + :param body: Information needed for returning reservation. Is either a model type or a IO type. + Required. + :type body: ~azure.mgmt.reservations.models.RefundRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RefundResponse or the result of cls(response) + :rtype: ~azure.mgmt.reservations.models.RefundResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.RefundResponse] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _json = self._serialize.body(body, "RefundRequest") + + request = build_post_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.post.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = self._deserialize("RefundResponse", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + post.metadata = {"url": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/return"} # type: ignore diff --git a/src/reservation/azext_reservation/vendored_sdks/reservations/py.typed b/src/reservation/azext_reservation/vendored_sdks/reservations/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/reservation/azext_reservation/vendored_sdks/reservations/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/reservation/setup.cfg b/src/reservation/setup.cfg new file mode 100644 index 00000000000..2fdd96e5d39 --- /dev/null +++ b/src/reservation/setup.cfg @@ -0,0 +1 @@ +#setup.cfg \ No newline at end of file diff --git a/src/reservation/setup.py b/src/reservation/setup.py new file mode 100644 index 00000000000..e8d50610eb6 --- /dev/null +++ b/src/reservation/setup.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +from codecs import open +from setuptools import setup, find_packages + +# TODO: Confirm this is the right version number you want and it matches your +# HISTORY.rst entry. +VERSION = '0.1.0' + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', +] + +# TODO: Add any additional SDK dependencies here +DEPENDENCIES = [] + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='reservation', + version=VERSION, + description='Microsoft Azure Command-Line Tools Reservation Extension', + # TODO: Update author and email, if applicable + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions/tree/main/src/reservation', + long_description=README + '\n\n' + HISTORY, + license='MIT', + classifiers=CLASSIFIERS, + packages=find_packages(), + install_requires=DEPENDENCIES, + package_data={'azext_reservation': ['azext_metadata.json']}, +) diff --git a/src/service_name.json b/src/service_name.json index a0f044be451..64a7c6a4487 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -628,5 +628,15 @@ "Command": "az nginx", "AzureServiceName": "Nginx for Azure", "URL": "https://docs.microsoft.com/en-us/azure/partner-solutions/nginx/nginx-overview" - } + }, + { + "Command": "az elastic-san", + "AzureServiceName": "Azure Elastic SAN", + "URL": "" + }, + { + "Command": "az reservations", + "AzureServiceName": "Azure Reservations", + "URL": "https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations" + } ]